bentonstark / starksoft-aspen

.net / mono security and cryptography library that provides client support for ftps, gnupg, smartcard, and socks / http proxies
106 stars 49 forks source link

HTTP Proxy CONNECT CMD should have ":" after HOST header #51

Open fjcbs opened 3 years ago

fjcbs commented 3 years ago

I'm getting an invalid char connecting via proxy...

According to https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 Host = "Host" ":" host [ ":" port ]

Where private const string HTTP_PROXY_CONNECT_CMD = "CONNECT {0}:{1} HTTP/{2}\r\nHOST {0}:{1}\r\n\r\n";

should be private const string HTTP_PROXY_CONNECT_CMD = "CONNECT {0}:{1} HTTP/{2}\r\nHOST: {0}:{1}\r\n\r\n";