feat: initial SOCKS5 proxy with chain support

Asyncio-based SOCKS5 server that tunnels connections through
configurable chains of SOCKS5, SOCKS4/4a, and HTTP CONNECT proxies.
Tor integration via standard SOCKS5 hop.
This commit is contained in:
user
2026-02-15 03:10:25 +01:00
commit 0710dda8da
21 changed files with 1117 additions and 0 deletions

15
config/example.yaml Normal file
View File

@@ -0,0 +1,15 @@
# s5p configuration
listen: 127.0.0.1:1080
timeout: 10
log_level: info
# Proxy chain -- connections tunnel through each hop in order.
# Supported protocols: socks5://, socks4://, http://
#
# Example: route through Tor, then an external SOCKS5 proxy
chain:
- socks5://127.0.0.1:9050 # Tor
# - socks5://user:pass@proxy:1080 # authenticated SOCKS5
# - socks4://proxy:1080 # SOCKS4/4a
# - http://user:pass@proxy:8080 # HTTP CONNECT