omjadas / hudsucker

Intercepting HTTP/S proxy
https://crates.io/crates/hudsucker
Apache License 2.0
205 stars 34 forks source link

Failed to establish TLS connection: #77

Closed wingjson closed 1 year ago

wingjson commented 1 year ago

hello,i have some problems,when the req.uri have https.it will be successes,but if the uri like this , p1.music.126.net:443,it will fail. this is my error log

2023-08-21T14:36:32.567413Z ERROR proxy{version=HTTP/1.1 method=CONNECT uri=p1.music.126.net:443 client_addr=192.168.137.116:63216}:process_connect: hudsucker::proxy::internal: Failed to establish TLS connection: tls handshake eof 2023-08-21T14:36:32.582093Z ERROR proxy{version=HTTP/1.1 method=CONNECT uri=p1.music.126.net:443 client_addr=192.168.137.116:63217}:process_connect: hudsucker::proxy::internal: Failed to establish TLS connection: tls handshake eof 2023-08-21T14:36:32.606450Z ERROR proxy{version=HTTP/1.1 method=CONNECT uri=p1.music.126.net:443 client_addr=192.168.137.116:63218}:process_connect: hudsucker::proxy::internal: Failed to establish TLS connection: tls handshake eof 2023-08-21T14:36:32.690224Z ERROR proxy{version=HTTP/1.1 method=CONNECT

all of these uri contain :443 will be failed,how to deal this,thanks😊

omjadas commented 1 year ago

How are the requests being made?

wingjson commented 1 year ago

Hello,I have known why, The requests where made of NeteaseMusic, and some requests don't have 'https' or 'http'. I have checked requests,if those urls don't have 'https' or 'http',I would alter the url by adding 'https' and relayed to local https port and it would be successed.