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,462 of 42,547    |
|    Marion to Marion    |
|    Re: Is there a de-mozzilla'd FIrefox (si    |
|    22 Aug 25 09:46:49    |
   
   XPost: alt.comp.software.firefox, alt.privacy   
   From: marion@facts.com   
      
   On Thu, 21 Aug 2025 04:11:10 -0000 (UTC), Marion wrote :   
      
      
   > Chromium ==> respects Windows proxy settings (which Psiphon sets for you)   
   > Mozilla ==> ignores Windows proxy settings (but has their own settings)   
      
   UPDATE:   
      
   Aurgh. There are layers to this Windows socks5 stuff such that some apps   
   use one layer while other apps use a different layer. Who knew? Not me!   
      
   Everything in Windows having to do with privacy seems to have more layers.   
      
   I started checking whether non-browser apps used Windows proxy settings,   
   where it turns out pgms like Telegram & CoPilot are different than   
   browsers are (which themselves are different in how each handle proxy).   
      
   Running the previously posted "proxy.bat" showed that Psiphon modified the   
   WinINET (user apps, browsers) proxy (127.0.0.1:17561 / socks at   
   127.0.0.1:1080) but not the WinHTTP (system/background services) proxy.   
      
   Sigh. Half a solution is not a full solution.   
   In fact, even with Psiphon, WinHTTP was was set to direct access (no   
   proxy).   
      
   The fix is to always copy the WinINET proxy config into WinHTTP.   
    Win+R > cmd {ctrl+shift+enter}   
    C:\> netsh winhttp import proxy source=ie   
    Now system services (which often ignore WinINET) will use   
    Psiphon's proxy as well. It also set a bypass list so that   
    local/private subnets avoid the proxy.   
      
   This is needed so that any Windows component that uses WinHTTP (like parts   
   of Copilot, Windows Update, some Microsoft Store traffic) will respect the   
   Psiphon proxy, matching the existing Psiphon browser/app proxy settings.   
      
   To test:   
   a. Temporarily clear WinHTTP proxy:   
    C:\> netsh winhttp reset proxy   
      
   b. Run Win+R > proxy   
    The proxy.bat script should detect 'No WinHTTP proxy set'   
    and it should then import settings from WinINET automatically.   
   c. Set a custom WinHTTP proxy:   
    C:\> netsh winhttp set proxy proxy-server="http=1.2.3.4:8080"   
      
   d. Run Win+R > proxy   
    The proxy.bat script should detect an existing WinHTTP proxy   
    and therefore it should NOT overwrite it.   
      
   Below is the improved proxy.bat script to accomplish the sync above.   
      
    ===< cut here for improved proxy.bat which handles more programs >===   
    @echo off   
    REM proxy.bat 20250820 v1.2   
    REM Use model: "Win+R > proxy" (diagnostic + proxy import if WinHTTP is   
   unset)   
    REM Unified Windows proxy diagnostic tool with WinHTTP sync safeguard   
    REM "Win+R > proxy /sync imports WinINET proxy directly into WinHTTP   
    REM Reports: WinINET manual proxy, WinHTTP proxy, PAC/AutoDetect   
    REM HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\proxy.exe   
    REM Default=C:\sys\batch\proxy.bat   
    REM That App Paths key creates the convenient "Win+R > proxy" command   
    REM   
    setlocal   
      
    :: --- Quick /sync mode ---   
    if /i "%~1"=="/sync" (   
    echo Syncing WinINET proxy into WinHTTP...   
    netsh winhttp import proxy source=ie   
    echo Done.   
    pause   
    exit /b   
    )   
      
    set KEY="HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings"   
      
    echo ==============================================   
    echo WINDOWS PROXY CONFIGURATION SET/CHECK/FIX   
    echo ==============================================   
      
    REM --- WinINET (manual proxy) ---   
    echo.   
    echo [1] WinINET / Internet Settings   
    for /f "tokens=2,* skip=2" %%A in ('reg query %KEY% /v ProxyEnable   
   2^>nul') do set ProxyEnable=%%B   
    for /f "tokens=2,* skip=2" %%A in ('reg query %KEY% /v ProxyServer   
   2^>nul') do set ProxyServer=%%B   
    if "%ProxyEnable%"=="0x1" (   
    echo Proxy is ENABLED   
    echo Proxy server: %ProxyServer%   
    ) else (   
    echo Proxy is DISABLED   
    )   
      
    REM --- WinHTTP proxy ---   
    echo.   
    echo [2] WinHTTP proxy (system/background services)   
      
    REM Get current WinHTTP proxy setting   
    for /f "tokens=1,* delims=:" %%A in ('netsh winhttp show proxy ^| findstr   
   /R /C:"Proxy Server(s)"') do set curWinHTTP=%%B   
      
    REM Trim leading/trailing spaces   
    set curWinHTTP=%curWinHTTP:~1%   
      
    if "%curWinHTTP%"=="" (   
    echo No WinHTTP proxy set - importing from WinINET...   
    netsh winhttp import proxy source=ie >nul 2>&1   
    ) else (   
    echo WinHTTP proxy already set - leaving as is.   
    )   
      
    REM Show current WinHTTP proxy after check/import   
    netsh winhttp show proxy   
      
    REM --- PAC (Proxy Auto-Config) & AutoDetect ---   
    echo.   
    echo [3] PAC / AutoDetect   
    for /f "tokens=2,* skip=2" %%A in ('reg query %KEY% /v AutoConfigURL   
   2^>nul') do set PACurl=%%B   
    for /f "tokens=2,* skip=2" %%A in ('reg query %KEY% /v AutoDetect 2^>nul')   
   do set AutoDetect=%%B   
      
    if defined PACurl (   
    echo PAC script set: %PACurl%   
    ) else (   
    echo No PAC script URL found.   
    )   
      
    if "%AutoDetect%"=="0x1" (   
    echo Auto-detect is ENABLED   
    ) else (   
    echo Auto-detect is DISABLED   
    )   
      
    echo.   
    echo ==============================================   
    echo Windows proxy set/check/fix complete.   
    echo ==============================================   
      
    endlocal   
    pause   
      
    ===< cut here for improved proxy.bat which handles more programs >===   
      
   --- 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