From Newsgroup: alt.comp.os.windows-11
README.TXT 20251202
===========
Overview
This directory contains scripts and configuration files that work
together to launch, manage and stop a Psiphon based SOCKS5 proxy
environment on Windows. The setup uses Mongoose to serve a PAC file,
batch scripts to apply and reset proxy settings, ProxyBridge to enforce
process specific rules, and supporting files to control behavior. The
goal is to route browser and selected application traffic through
Psiphon while leaving system services and critical networking functions
direct.
Files
-----
psiphon.bat
This batch script launches Mongoose to serve proxy.pac, verifies
availability of the PAC file, then launches Psiphon in SOCKS mode. It
applies PAC logic to WinINET applications such as browsers, forces
registry keys to persist AutoConfigURL and AutoDetect, and syncs WinINET
proxy settings into WinHTTP. It logs activity to proxy.log. It warns
that WinHTTP applications such as Windows Update do not honor PAC or
SOCKS. It suggests using Privoxy or Polipo to bridge SOCKS to HTTP if
WinHTTP apps must be tunneled.
launchmongoose.vbs
This VBScript starts mongoose.exe silently if not already running. It
serves proxy.pac at
http://127.0.0.1/proxy.pac. It logs launch attempts
to mongoose.log. It ensures the working directory is set so proxy.pac is
served correctly. It includes tutorial comments for loading PAC files
directly into Firefox using file:/// URLs. It notes that WPAD auto
discovery requires the file to be named wpad.dat and served at
http://wpad.domain/wpad.dat. Localhost proxy.pac works only with manual
configuration.
proxy.pac
This PAC file defines proxy rules. It bypasses Gmail, Google, Amazon,
and Copilot domains with DIRECT connections. All other traffic is routed
through SOCKS 127.0.0.1:1080. This works for WinINET based applications
such as Chrome, Edge, and IE. WinHTTP applications ignore PAC and SOCKS.
The file includes version history and comments explaining split tunnel
behavior. It notes that WPAD clients expect wpad.dat not proxy.pac.
pac.cmd
This script is a helper called automatically from psiphon.bat. It
enforces PAC logic silently. It logs its run, detects if it was called
from psiphon.bat, and then calls proxy.cmd to perform actual
configuration. It checks current PAC URL and AutoDetect status, applies
changes if needed, forces registry keys, and re captures status for
display. It ensures that proxy.cmd reflects correct status immediately.
It is a wrapper around proxy.cmd designed for automation.
proxy.cmd
This script is the diagnostic and configuration tool for proxy settings.
It can be run directly by the user or indirectly by pac.cmd. It supports
flags such as /help, /sync, /nopac, /status, /reset, /silent, or a PAC
URL. It manipulates registry keys under HKCU\Software\Microsoft\Windows\
CurrentVersion\Internet Settings. It can set or clear PAC URLs, enable
or disable AutoDetect, enable or disable static proxy servers. It syncs
WinINET into WinHTTP if needed. It displays detailed status of WinINET,
WinHTTP, and PAC configuration. It logs every invocation to proxy.log.
It is the heavy duty tool that pac.cmd relies on.
psiphonstop.bat
This batch script stops Psiphon and Mongoose if running, resets WinINET
and WinHTTP proxy settings, flushes DNS, resets IP stack, and attempts
Winsock reset with retry logic. It logs shutdown events to proxy.log and
mongoose.log. It exports registry keys before deletion for backup. It
sets ProxyEnable to 0 to force direct access. It clears ProxyOverride.
It resets WinHTTP proxy with netsh winhttp reset proxy. It checks Wi Fi
adapter state before Winsock reset. It logs environment proxy variables.
It reminds the user to clear browser cache and disable proxy extensions.
It ends with a beep to signal completion.
pb.bat
This batch script launches ProxyBridge CLI with rules defined in
rules.txt. It checks for administrator privileges, sets up logging,
reads rules.txt, strips comments, builds arguments, and runs ProxyBridge.
It ensures only one console window is used and that Ctrl+C stops
ProxyBridge cleanly. It logs output to timestamped files. It is designed
to enforce process specific proxy rules using Psiphon or Tor SOCKS5
listeners. It is a wrapper around ProxyBridge CLI for usability and
persistence.
rules.txt
This file defines ProxyBridge rules. It sets Psiphon SOCKS5 at
127.0.0.1:1080 as the default proxy. It forces browsers such as Brave,
Chrome, and Firefox to use the proxy for TCP traffic and blocks UDP
QUIC. It blocks telemetry processes such as OneDrive and CompatTelRunner.
It bypasses core system processes such as svchost.exe, services.exe, and
system to ensure DNS, DHCP, ARP, and TAP setup traffic go direct. It
proxies OpenVPN TCP 443 traffic through Psiphon but allows UDP tunnel
traffic direct. It logs at verbose level 3. It notes that UDP based VPN
configs must run direct without Psiphon.
Note that VPN can be run either before or after ProxyBridge now, i.e.,
VPN + {Psiphon/SOCKS5 + ProxyBridge/rules.txt} always worked fine
{Psiphon/SOCKS5 + ProxyBridge/rules.ext} + VPN now also works fine
Behavior Summary
----------------
Browsers using WinINET such as Chrome, Edge, IE, and Opera will honor
proxy.pac and route traffic through Psiphon SOCKS except for domains
explicitly bypassed. Firefox requires manual configuration or use of
system proxy settings. WinHTTP applications such as Windows Update and
Microsoft Store do not honor PAC or SOCKS and will connect direct unless
an HTTP to SOCKS bridge is used. Command line tools (such as curl and git)
ignore WinINET PAC unless configured with environment variables.
ProxyBridge enforces process specific rules to ensure selected apps are
tunneled while system services remain direct.
Limitations
-----------
WinHTTP does not support PAC or SOCKS. Windows Update and other system
services will not use Psiphon under this setup. UDP traffic cannot be
proxied through Psiphon SOCKS. WPAD auto discovery requires wpad.dat
served at
http://wpad.domain/wpad.dat. Localhost proxy.pac works only
with manual configuration. Environment variables such as HTTP_PROXY may
still affect command line tools unless cleared. ProxyBridge rules must
explicitly list each application to be tunneled. Applications not listed
will connect direct.
Conclusion
----------
This environment provides a controlled way to route browser and selected
application traffic through Psiphon while leaving system services direct.
It uses Mongoose to serve PAC, batch scripts pac.cmd and proxy.cmd to
apply and reset proxy settings, and ProxyBridge with rules.txt to enforce
process specific behavior. For full coverage, including WinHTTP programs,
an HTTP to SOCKS bridge (such as Privoxy or Polipo) is likely required.
--- Synchronet 3.21a-Linux NewsLink 1.2