home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 42,534 of 42,547   
   Marion to Marion   
   Re: Tutorial: Build a one-click Windows    
   29 Oct 25 11:58:22   
   
   XPost: alt.comp.os.windows-10, alt.comp.os.windows-11   
   From: mariond@facts.com   
      
   Marion wrote:   
   > Hence, after posting this proxy-testing script, I will post a much simpler   
   > proxy test, which outputs a formatted PASS/FAIL to whether or not your IP   
   > address is proxied through Tor/Psiphon free no-registration proxy servers.   
      
   Here is a vastly simpler pass/fail script to test if your IP is truly tunneled.   
      
   Note that if the proxy is as good as my setup, it's difficult to skirt past it.   
   But it can be done. As shown below. Using direct DNS queries, for example.   
      
     @echo off   
     REM C:\data\sys\batch\checkip.bat 20251029   
     REM This is version 1p2   
     REM  Designed to be a simple proxy check to compare ISP vs Psiphon exit IP   
     REM  Outputs:       Proxy OK: ISP= Psiphon=   
     REM  Or it outputs: Proxy FAIL: both=   
     REM v1p0 20251029   
     REM  compares IP addresses with & without proxy   
     REM  Drat. The proxy is well entrenced. Curl just can't get around it.   
     REM  This failed: curl -s https://api.ipify.org   
     REM   because, while curl doesn't use WinINET/WinHTTP,   
     REM   curl was being proxied by proxybridge.   
     REM  This failed: curl -s --noproxy "*" https://api.ipify.org   
     REM   because --noproxy only tells curl to ignore configured proxies.   
     REM   It doesn't bypass ProxyBridge's process-level interception   
     REM   The --noproxy doesn't bypass ProxyBridge's interception.   
     REM  This failed: curl -s --proxy 127.0.0.1:34010   
     REM   because the local ProxyBridge relay port is then proxied by Psiphon.   
     REM   That just pointed curl at ProxyBridge's local relay,   
     REM   which itself forwards into Psiphon. So we still got Psiphon's IP.   
     REM  This failed: powershell -Command "(Invoke-WebRequest -UseBasicParsing   
     REM   https://api.ipify.org -Proxy $null).Content"   
     REM   because ProxyBridge was still intercepting PowerShell's HTTP traffic,   
     REM   so even the classic PowerShell "no proxy" call was being tunneled.   
     REM v1p1 20261029   
     REM  added nslookup to slip around a well-entrenched proxy which worked   
     REM  because ProxyBridge/Psiphon doesn't proxy UDP DNS queries,   
     REM  so nslookup was finally able to slip around the tunnel.   
     REM  That nslookup DNS trick bypasses ProxyBridge/Psiphon because   
     REM  it's a raw DNS query, not HTTP, to get the true IP.   
     REM  DNS query gives a guaranteed "direct" view of the ISP IP address.   
     REM v1p2 20261029   
     REM  modified to make the output a single line for simplicity   
     REM  a 1st "for /f" grabs the real ISP IP from the DNS trick.   
     REM  a 2nd "for /f" grabs the Psiphon exit IP via SOCKS5   
     REM  then it compares them for an OK vs FAIL outpout.   
      
     @echo off   
     for /f "tokens=2 delims= " %%A in ('nslookup myip.opendns.com    
   esolver1.opendns.com ^| findstr /R "Address:"') do set ISPIP=%%A   
     for /f %%A in ('curl -s --socks5 127.0.0.1:1080 https://api.ipify.org') do   
   set PROXYIP=%%A   
      
     if "%ISPIP%"=="%PROXYIP%" (   
       echo Proxy FAIL: both=%ISPIP%   
     ) else (   
       echo Proxy OK: ISP=%ISPIP% Psiphon=%PROXYIP%   
     )   
     pause   
      
     :: end of C:\data\sys\batch\checkip.bat   
   --   
   I am not here for my ego; nor for my amusement; but to teach & learn.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca