Closed memory closed 4 years ago
[imrehg] This issue has attached support thread https://jel.ly.fish/#/support-thread~bc290f19-dca9-4eb2-90b8-a36f9f7cd99a
That is correct. redsocks doesn't support https and the author is not planning to add any features (https://github.com/darkk/redsocks/issues/128). There is a fork mentioned which we haven't played with until now but, checking the code, it does implement this functionality (https://github.com/semigodking/redsocks/blob/master/https-connect.c).
I'm also interested in moving to Redsocks2 as it also has integrated shadowsocks proxy support.
At least as far as I can determine, it is not possible to configure redsocks to connect to a proxy over https/tls. It can connect to SSL sites via sending HTTP CONNECT commands to a proxy, but the connection between redsocks and the proxy itself is done in cleartext.
Steps to reproduce:
A sample squid.conf with an ssl listener on port 443:
Note that this configuration sets up a globally-accessible proxy: you will want to limit access by using
htpasswd
to create/etc/squid/squid.pass
. You will also need to create an openssl key and a self-signed cert in /etc/squid.The device will not come online in this configuration: tcpdump on your proxy will reveal that it is not attempting to negotiate a TLS connection, but is instead sending plaintext HTTP CONNECT commands to port 443.
If you configure redsocks to talk to the http_port on 3128/tcp, the device will successfully come online.
In contrast, you should be able to successfully use curl to proxy requests over TSL: