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:
46
docs/CHEATSHEET.md
Normal file
46
docs/CHEATSHEET.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# s5p -- Cheatsheet
|
||||
|
||||
## CLI
|
||||
|
||||
```
|
||||
s5p # direct, listen :1080
|
||||
s5p -C socks5://127.0.0.1:9050 # through Tor
|
||||
s5p -C socks5://tor:9050,http://px:8080 # Tor + HTTP proxy
|
||||
s5p -c config/example.yaml # from config file
|
||||
s5p -l 0.0.0.0:9999 # custom listen address
|
||||
s5p -t 30 # 30s per-hop timeout
|
||||
s5p -v # debug logging
|
||||
s5p -q # errors only
|
||||
```
|
||||
|
||||
## Proxy URLs
|
||||
|
||||
```
|
||||
socks5://host:port
|
||||
socks5://user:pass@host:port
|
||||
socks4://host:port
|
||||
http://host:port
|
||||
http://user:pass@host:port
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
# Check exit IP
|
||||
curl -x socks5h://127.0.0.1:1080 https://httpbin.org/ip
|
||||
|
||||
# Verbose curl
|
||||
curl -v -x socks5h://127.0.0.1:1080 https://example.com
|
||||
|
||||
# With timeout
|
||||
curl --max-time 30 -x socks5h://127.0.0.1:1080 https://example.com
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Symptom | Check |
|
||||
|---------|-------|
|
||||
| Connection refused | Is Tor running? `ss -tlnp \| grep 9050` |
|
||||
| Timeout | Increase `-t`, check proxy reachability |
|
||||
| DNS leak | Use `socks5h://` (not `socks5://`) in client |
|
||||
| Auth failed | Verify credentials in proxy URL |
|
||||
Reference in New Issue
Block a user