2
I'm under a corporate, squid proxy.
It is problematic to develop under this proxy since I have to setup the proxy details for every thing I use (for example, setting npm, or terminal http_proxy)
I am looking for a way to route all my traffic to squid proxy, so that I do not have to edit all my applications' proxy settings.
I found a short tutorial to do transparent proxying with squid here using pf. However, I am not familiar with pf.
This is the pf configuration that the tutorial says is needed:
int_if="gem0"
ext_if="kue0"
rdr on $int_if inet proto tcp from any to any port www -> 127.0.0.1 port 3128
pass in on $int_if inet proto tcp from any to 127.0.0.1 port 3128 keep state
pass out on $ext_if inet proto tcp from any to any port www keep state
However, the proxy I'm under has authentication required (username and password).
How do I setup my pf so that I can tunnel all my applications to use this proxy? If the config above is ideal, then how do I change it to accept my authentication details?
That won’t work anyway. When a program supports proxies, the requests it sends to a proxy a subtly different from regular HTTP requests. That’s what your proxy expects. A transparent proxy cannot ask for authentication and has to know it is a transparent proxy, otherwise it will fail to parse the regular HTTP requests it receives. – Daniel B – 2014-12-27T19:40:03.677