Using squid proxy, I'd like to (by)pass traffic from clients to a specific IP/domain.

No matter who is using the proxy (client IP or auth), the proxy should not be the man in the middle for any traffic from/to youtube.com.

Do proxies allow such a rule at server-side (instead of defining the bypass rule with each of the clients)?

E.g. if there was a bypass rule for the ip/domain whatismyip.com, all the clients should see their own IP there, although they have set up the proxy for their browser.

1 Answer 1


Unless you use iptables or similar in the server side or set the clients to bypass proxy, all http,ftp,etc. traffic will go thru the proxy.

Assuming that,you can set some acls that will force some specific traffic to go 'DIRECT'.

Here you can see some sample code from squid.conf:

acl directdomains dstdomain "path/to/acl/file"
http_access allow directdomains
always_direct allow directdomains

The acl file should contain something like:


One more option is to use a 'proxy autoconfiguration file' for your clients,you can even set it via dhcp.

Hope that helps.

  • maybe i misconfigured the squid proxy, but when accessing whatismyip.com (via acl serverside setting through the proxy), it shows the IP of the proxy server. will "directdomains" really be connecting the client with the target destination or will squid always remain as man in the middle?
    – ledy
    Jul 17, 2013 at 18:39
  • you can avoid this by adding: forwarded_for "truncate" to your squid.conf
    – blu3g3
    Jul 18, 2013 at 8:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .