chhsiao90 / nitmproxy

Proxy server based on netty
MIT License
151 stars 67 forks source link

http tunnel implementation question #109

Open phiysng opened 2 years ago

phiysng commented 2 years ago

When it comes to HTTP Tunnel , nitmproxy decode the payload of the CONNECT payload , which seems not what a tunnel should do.A tunnel should not case about what was in the payload , In theory , at least in my knowledge.

In this approach , http tunnel is not much different from the http proxy.

Meanwhile , It can not pass the tls check when I try to connect to a https website with http tunnel with curl. becase whe key it get is from the proxy server , not the origin website we wanna go.

curl  --proxytunnel -x http://127.0.0.1:8080 https://www.baidu.com
>>> curl: (77) schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325)

correct me if I get it wrony. thanks.

abbasvalliani commented 2 years ago

Did you actually add the NITMP proxy cert to your CA store? Generate a certificate, start NITM with a certificate and add the .cer file as a CA cert on your machine. This error should go away. You may be able to provide the self-signed cert directly in curl but read the docs.