-
- Downloads
First try at utls integration.
Disables proxy support: I'm using http.Transport.DialTLS to hook into utls, and http.Transport.Proxy is ignored when DialTLS is set. We'll have to manually make our own proxy connections within DialTLS. It doesn't work properly yet because the HelloChrome_Auto fingerprint we're using includes "h2" in the ALPN extension, which causes the server to think it should use HTTP/2. The client side, however, uses HTTP/1.1 because it disable automatic HTTP/2 configuration when DialTLS is set. So you have an HTTP/1.1 client talking to an HTTP/2 server, and an error message like this: error in handling request: net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x00\x00\x12\x04\x00\x00\x00\x00\x00\x00\x05\x00\x10\x00\x00\x00\x03\x00\x00\x00\xfa\x00\x06\x00\x10\x01@" As a workaround, I'm not calling UConn.Handshake() before returning the UConn from DialTLS. This seems to cause the caller to remove the ALPN extension, thereby negotiating HTTP/1.1 on both sides. The downside are the loss of HTTP/2, and the fact that a missing ALPN extension means our fingerprint doesn't match what it's supposed to.
Please register or sign in to comment