Privoxy is a tool I use daily, and I’ve customized its rules to route different domains through different proxies. For instance, when accessing Google Gemini, I route it through a less commonly used node to reduce the chance of being flagged by security measures.
Code:
{+forward-override{forward .}}
/
{+forward-override{forward-socks5 127.0.0.1:9090 .}}
.youtube.com/
antigravity-unleash.goog/
.google.ae/
.google.com/
.googleusercontent.com/
.gstatic.com/
.withgoogle.com/
.chromeenterprise.google/
.googleapis.com/
.googlesource.com/
.googlevideo.com/
.google-analytics.com/
.googlesyndication.com/
{+forward-override{forward-socks5 127.0.0.1:8080 .}}
.forum.exetools.com/
Modifications based on the official 4.1.0 release:
1. Added DPI Awareness to prevent text in the log window from becoming blurry on high-resolution displays.
2. Added CMake project files to support MSVC + vcpkg compilation on Windows. The original code could only be compiled with Cygwin, which was inconvenient. I prefer using Visual Studio for debugging. The CMake project currently only supports Windows.
Dependencies required for setup:
Code:
vcpkg install pcre2:x64-windows-static openssl:x64-windows-static zlib:x64-windows-static
Why haven’t I submitted these changes to the official Privoxy repository?
Because the CMake project would need to support all platforms and every possible build option, which is a bit cumbersome.
The Privoxy code can also be modified into a static library and linked into software that requires proxy functionality. Pay attention to its GPLv2 license.
https://github.com/z16166/Privoxy