mirror of
https://github.com/xroche/httrack.git
synced 2026-07-17 22:29:55 +03:00
proxy-https-server.py (#85) and proxy-connect-server.py (#564) were ~90% identical: the CONNECT proxy, the relay and the origin were copies, with only the origin body, the TLS wrap and the argv shape differing. Move the common half into tests/proxytestlib.py; each server is now a docstring plus a serve() call. socks5-server.py reuses the relay too, but keeps its own origin, which is specialised for keep-alive reuse and subpages. The shared origin always logs the request line (it was proxy-connect only); harmless for #85, which only asserts no Proxy-Authorization reaches it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
1.2 KiB
1.2 KiB