nitmproxy icon indicating copy to clipboard operation
nitmproxy copied to clipboard

http tunnel implementation question

Open phiysng opened this issue 3 years ago • 1 comments

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.

phiysng avatar Oct 17 '21 10:10 phiysng

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.

abbasvalliani avatar Oct 17 '21 18:10 abbasvalliani