jenofonte
I want to use OpenVPN through an HTTP proxy. Relevant configuration for my OpenVPN client is:
proto tcp
remote myRemoteServer 443
http-proxy myProxy80 stdin basic
I've setted "remote" port to 443 as this is the only port open in the proxy (in addition to port 80).
When I try to connect to "myRemoteServer:443" using PUTTY (with proper proxy configuration) everything goes fine but when I try to connect using my OpenVPN client the proxy rejects the request. As this behavior looks strange to me I've used Wireshark and get this info:
For PUTTY:
CONNECT minervaam.dyndns.biz:443 HTTP/1.1
Host: minervaam.dyndns.biz:443
Proxy-Authorization: Basic someCodedInfo
For OpenVPN client:
CONNECT minervaam.dyndns.biz:443 HTTP/1.0
Host: minervaam.dyndns.biz
Proxy-Authorization: Basic someCodedInfo
The only difference is that "Host" HTTP header when using PUTTY contains port 443. After looking for HTTP headers information I found out that "A "host" without any trailing port information implies the default port for the service requested (e.g., "80" for an HTTP URL)". So I suppose that, when using OpenVPN client, the proxy considers port to use is 80 instead of 443 and WebSense blocks the request (I get a "blocked web page" message).
Please, could you confirm if I'm right or wrong? Is it possible to set port in order it appears in HTTP header "Host"?
Mimiko
Try using --http-proxy-option in your OpenVPN config.
jenofonte
Thanks, Mimiko, but is it possible to set any HTTP header with --http-proxy-option or just "verision" and "user-agent"? In version 2.2 only these to options are shown as available.
janjust
it's just VERSION and USERAGENT ... what http header would you like to add?
jenofonte
I'd like to add header "Host", that it is formed by an URL and a port number joined by a colon, with the possibility to set the port number.
Right now, when you use option "--http-proxy" the HTTP header "Host" is added to the CONNECT request but the problem is no port number is added so by default the proxy considers it is port 80.
The objective I'm looking to achieve is use other port than 80 when connecting through an HTTP proxy.