From Newsgroup: comp.mobile.android
Hank Rogers wrote:
It can really be bad.
I don't care that a disgusting Slootweg troll hates me.
I don't even care that the disgusting Slootweg troll is stupid.
It's entire life, it has been told by everyone that it is stupid.
So be it.
What I care about is the disgusting trolls ruin Usenet for everyone.
As we have to waste our time dealing with this infestation of trolls.
Every infestation of these disgusting trolls ruins Usenet for all of us.
Please never write about or to me ever again until YOU write a tutorial.
Just one is more value than disgusting trolls added in their entire life.
Here is the latest revision with the vast improvement in usability.
This script enables ANYONE to block or proxy any Windows TCP/UDP binary.
Many thanks to Allan Higdon for informing me yesterday that ProxyBridge exists, as in just a dozen hours we've made a quantum leap in privacy!
@echo off
REM ============================================================
REM C:\app\network\proxy\proxybridge\pb.bat 20251022
REM This is version 2p7
REM ============================================================
REM Runs FOSS ProxyBridge to proxy any desired Windows program
REM <github.com/InterceptSuite/ProxyBridge/releases/tag/v2.0>
REM Requires existing proxy server (e.g., Psiphon SOCKS5 proxy)
REM <
https://psiphon.ca/en/download-store.html>
REM ============================================================
REM v1p0 20251022 15L
REM Launches ProxyBridge CLI using Psiphon SOCKS5 proxy.
REM Uses the CLI to apply rules for Brave, Chromium & stunnel.
REM Exits with control-C
REM v1p1 20251022 22L
REM Added process:hosts:ports:protocol:action format.
REM EXAMPLE: --rule stunnel.exe:*:119,563:TCP:PROXY
REM Test with curl
https://icanhazip.com
REM v1p2 20251022 39L
REM Added "--dns-via-proxy" & "--verbose 3" flags.
REM v1p3 20251022 52L
REM Added a prompt for UAC since ProxyBridges requires admin.
REM v1p4 20251022 65L
REM Added automatic external IP check via curl after launch.
REM v1p5 20251022 108L
REM Added logging of all output to with timestamped files.
REM But exiting out of multiple consoles is inefficient.
REM v1p6 20251022 115L
REM Simplified: single console window, inline ProxyBridge run,
REM Added a graceful quit with Ctrl+C, with logging intact.
REM v1p7 20251022 94L
REM Further simplified: one Ctrl+C stops ProxyBridge and exits,
REM removed pause and post-run commands for clean quit.
REM Cleaned up the formatting to remove blank lines.
REM v1p8 20251022 107L
REM Added cleanup section to ensure ProxyBridge is killed.
REM v1p9 20251022 101L
REM Simplified logging: one log file per run, no tmp clutter,
REM Modified the flow so one Ctrl+C stops everything cleanly.
REM v2p0 20251022 107L
REM Corrected logging: live console + single log file,
REM one Ctrl+C exits cleanly, cleanup guaranteed.
REM v2p1 20251022 103L
REM Live streaming fixed by having PowerShell read
REM stdout/stderr in real time, mirrors to console
REM and appends to one log file.
REM v2p2 20251022 74L
REM This became a mess so I started over with version 1p3
REM Changed ProxyBridge launch to "start /wait" so one Ctrl+C
REM stops ProxyBridge cleanly without the Y/N batch prompt.
REM v2p3 20251022 92L (whew, got it working again by backtracking)
REM Added timestamped log file with live console output.
REM One console, one Ctrl+C to stop ProxyBridge.
REM v2p4 20251022
REM Added back UAC elevation block
REM v2p5 20251023
REM Moved rules to a rules.txt file for easier maintenance
REM Added a safety check to ensure rules.txt exists
REM Maintained logging and UAC elevation
REM Preserved the single-console, Ctrl+C exit behavior
REM PowerShell invocation uses %PBARGS% instead of a
REM nonexistent ProxyBridge --config flag to break lines up
REM v2p6 20251023
REM Modified so that only one control-C is needed (sans YES)
REM v2p7 20251023 144L
REM Added usability to include inline comments in rules.txt
REM Added common examples of block, direct, ports & proxy
REM --rule brave.exe:*:*:TCP:PROXY # Brave browser
REM --rule stunnel.exe:*:119,563:TCP:PROXY # proxy NNTP/SMTPS traffic
REM --rule svchost.exe:*:*:TCP:DIRECT # Windows services host
REM --rule CompatTelRunner.exe:*:*:TCP:BLOCK # Block telemetry uploader
REM ============================================================
:: Delayed expansion is required for building %PBARGS%
:: %PBARGS% is needed because ProxyBridge has no --config option
setlocal enabledelayedexpansion
:: --- UAC Elevation Check ---
net session >nul 2>&1
if %errorLevel% neq 0 (
echo Requesting Administrator privileges...
powershell -Command "Start-Process '%~f0' -Verb RunAs"
exit /b
)
:: --- End UAC Elevation Check ---
:: --- Logging setup ---
set "LOGDIR=C:\data\sys\log"
if not exist "%LOGDIR%" md "%LOGDIR%" 2>nul
for /f "tokens=1-4 delims=/ " %%a in ("%DATE%") do (
set YYYY=%%d
set MM=%%b
set DD=%%c
)
for /f "tokens=1-3 delims=:." %%a in ("%TIME%") do (
set HH=%%a
set Min=%%b
set Sec=%%c
)
if "%HH:~0,1%"==" " set HH=0%HH:~1,1%
set LOGSTAMP=%YYYY%%MM%%DD%_%HH%%Min%%Sec%
set "LOGFILE=%LOGDIR%\pb_%LOGSTAMP%.log"
echo Logging to %LOGFILE%
:: --- End logging setup ---
cd /d C:\app\network\proxy\proxybridge
if not exist "rules.txt" (
echo ERROR: rules.txt not found in %CD%
exit /b
)
:: In version 2p5, rules were moved to a rules.txt file
:: The loop skips blank lines & lines starting with # for comments.
:: # This is rules.txt (blank lines are ignored)
:: --proxy socks5://127.0.0.1:1080
:: --rule brave.exe:*:*:TCP:PROXY
:: --rule chrome.exe:*:*:TCP:PROXY
:: --rule dialog.exe:*:*:TCP:PROXY
:: --rule telegram.exe:*:*:TCP:PROXY
:: --rule stunnel.exe:*:119,563:TCP:PROXY
:: --rule curl.exe:*:*:TCP:PROXY
:: --dns-via-proxy
:: --verbose 3
:: --- Build arguments from rules.txt ---
set "PBARGS="
for /f "usebackq delims=" %%A in ("rules.txt") do (
set "LINE=%%A"
if not "!LINE!"=="" if /i not "!LINE:~0,1!"=="#" (
rem Strip inline comments: take everything before first #
for /f "tokens=1 delims=#" %%B in ("!LINE!") do (
set "PBARGS=!PBARGS! %%B"
)
)
)
taskkill /im ProxyBridge_CLI.exe /f >nul 2>&1
echo ProxyBridge starting... Press Ctrl+C to stop.
:: Wrapped with cmd /c to avoid "Terminate batch job (Y/N)?" prompt.
cmd /c powershell -NoLogo -NoProfile -Command "Set-Location '%CD%'; & '%CD%\ProxyBridge_CLI.exe' %PBARGS% | Tee-Object -File '%LOGFILE%'"
echo ProxyBridge exited.
endlocal
:: end of C:\app\network\proxy\proxybridge\pb.bat
--
If you wonder why my posts are different, I'm nothing like most
people who post to Usenet. Most people who post are stupid trolls.
There is more value in this one post than they can add in
their entire lives. Trolls hate that they're stupid. So be it.
--- Synchronet 3.21a-Linux NewsLink 1.2