python-proxy
python-proxy copied to clipboard
Is it possible to listen to http/https on same port?
Is it possible to listen to http/https on same port? I could not get it to work.
/usr/local/bin/pproxy -l [scheme]://localhost:lport -r socks5://localhost:rport -vv --ssl ...
If scheme==http, https does not work. If scheme==http+ssl, http get does not work. If scheme==httponly+http+ssl, https does not work.
It is problematic because http_proxy/https_proxy is then pretty much useless. wget https:// cannot work with http+ssl; while curl/git https:// cannot work with http:// or httponly://. 3rd party shell install scripts, etc. cannot be used without significant modification.
pproxy can only listen on a port having protocols with ssl or without ssl. Guessing a protocol wrapped in ssl/tls by peeking a few bytes is impossible. It is impossible to do that in pproxy. But you can listen on the same port like "http+socks+ss://" (without ssl) or "http+socks+ss+ssl://" (with ssl). The ssl should be established and then the protocol be guessed.