wiki'd

by JoKeru

HTTP Proxy: Forward vs Transparent

[cc lang='bash']
# transparent
\$ curl www.google.com

GET / HTTP/1.1
User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
Host: www.google.com
Accept: */*
# the proxy will compute the absolute uri by concatenating the host header with the relative uri from the get request

# forward
\$ curl --proxy proxy_ip:proxy_port www.google.com

GET HTTP://www.google.com HTTP/1.1
User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
Host: www.google.com
Accept: */*
Proxy-Connection: Keep-Alive
# the user agent already sent the absolute uri to be retrieved by the proxy
[/cc]

Comments