On Fri, Jun 28, 2024 at 12:19:51PM -0000, jensen@fixes.hk wrote:
Hi Peter,
Thanks for your response. The purpose of the stunnel config is to have my connection encrypted using ssl while connecting to tinyproxy.
we have 1 server in HK that needs to connect to OpenAI API (HK region will not get support anymore on 9 July 2024). so I think to setup new server in supported region as proxy server, use tinyproxy for proxy server and make sure the connection is secure by using stunnel. so this way our HK server can still call OpenAI API by using the new proxy server (stunnel + tinyproxy).
on above err log, I use this curl command to connect to the proxy server curl --proxy "https://address:8443" https://www.google.com -v
the command above is working fine on my other server except Ubuntu16.04.
OK, now I understand what you're trying to do, and I think I know what the problem is. The support for HTTPS proxies in cURL was only added in version 7.52, while Ubuntu 16.04 only has cURL 7.47. So if you're running cURL from the same host that runs stunnel, Ubuntu 16.04's cURL will not send the correct request. Try running cURL from another host, or testing with `openssl s_client -connect address:8443` and then typing in an HTTP CONNECT request by hand.
Hope that helps!
G'luck, Peter