How to pass certain URL to parent proxy in squid?

Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I would like to retrieve certain sites or domains via uplink proxy in squid. I would like to have a list of such sites. How to do that?
I see directive always_direct, but I need opposite: pass all requests directly, but only some of them -- to peer.
Is this possible?
proxy squid
bumped to the homepage by Community⦠4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |Â
up vote
3
down vote
favorite
I would like to retrieve certain sites or domains via uplink proxy in squid. I would like to have a list of such sites. How to do that?
I see directive always_direct, but I need opposite: pass all requests directly, but only some of them -- to peer.
Is this possible?
proxy squid
bumped to the homepage by Community⦠4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
The opposite ofalways_directisnever_direct. Not kidding.
â muru
Apr 25 '16 at 3:40
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I would like to retrieve certain sites or domains via uplink proxy in squid. I would like to have a list of such sites. How to do that?
I see directive always_direct, but I need opposite: pass all requests directly, but only some of them -- to peer.
Is this possible?
proxy squid
I would like to retrieve certain sites or domains via uplink proxy in squid. I would like to have a list of such sites. How to do that?
I see directive always_direct, but I need opposite: pass all requests directly, but only some of them -- to peer.
Is this possible?
proxy squid
proxy squid
edited Apr 25 '16 at 4:56
Alex
3721414
3721414
asked Apr 24 '16 at 6:53
Dims
3151728
3151728
bumped to the homepage by Community⦠4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community⦠4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
The opposite ofalways_directisnever_direct. Not kidding.
â muru
Apr 25 '16 at 3:40
add a comment |Â
1
The opposite ofalways_directisnever_direct. Not kidding.
â muru
Apr 25 '16 at 3:40
1
1
The opposite of
always_direct is never_direct. Not kidding.â muru
Apr 25 '16 at 3:40
The opposite of
always_direct is never_direct. Not kidding.â muru
Apr 25 '16 at 3:40
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
You use the cache_peer config option to define a peer or parent, and you use cache_peer_access to force all requests matching a particular squid acl to use that peer.
For example:
cache_peer squid2.example.com sibling 3128 3130
acl alwayspeer dstdomain foo.example.com bar.example.com
cache_peer_access squid2.example.com allow alwayspeer
That will force all requests for those two domains (foo.example.com and bar.example.com) to go via the peer (squid2.example.com).
NOTE: alwayspeer is just an arbitrary name I chose for this acl.
If you also want to restrict usage of that peer to ONLY the domains listed in the alwayspeer acl, add the following line:
cache_peer_access squid2.example.com deny !alwayspeer
Any squid acl type can be used, not just dstdomain. e.g. url_regex or urlpath_regex (or dstdom_regex) if you want the acl to regex match part or all of a URL (or domain).
Finally, multiple acls can be allowed or denied with cache_peer_access rules. Note that the order of rules is significant (first matching rule wins).
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You use the cache_peer config option to define a peer or parent, and you use cache_peer_access to force all requests matching a particular squid acl to use that peer.
For example:
cache_peer squid2.example.com sibling 3128 3130
acl alwayspeer dstdomain foo.example.com bar.example.com
cache_peer_access squid2.example.com allow alwayspeer
That will force all requests for those two domains (foo.example.com and bar.example.com) to go via the peer (squid2.example.com).
NOTE: alwayspeer is just an arbitrary name I chose for this acl.
If you also want to restrict usage of that peer to ONLY the domains listed in the alwayspeer acl, add the following line:
cache_peer_access squid2.example.com deny !alwayspeer
Any squid acl type can be used, not just dstdomain. e.g. url_regex or urlpath_regex (or dstdom_regex) if you want the acl to regex match part or all of a URL (or domain).
Finally, multiple acls can be allowed or denied with cache_peer_access rules. Note that the order of rules is significant (first matching rule wins).
add a comment |Â
up vote
0
down vote
You use the cache_peer config option to define a peer or parent, and you use cache_peer_access to force all requests matching a particular squid acl to use that peer.
For example:
cache_peer squid2.example.com sibling 3128 3130
acl alwayspeer dstdomain foo.example.com bar.example.com
cache_peer_access squid2.example.com allow alwayspeer
That will force all requests for those two domains (foo.example.com and bar.example.com) to go via the peer (squid2.example.com).
NOTE: alwayspeer is just an arbitrary name I chose for this acl.
If you also want to restrict usage of that peer to ONLY the domains listed in the alwayspeer acl, add the following line:
cache_peer_access squid2.example.com deny !alwayspeer
Any squid acl type can be used, not just dstdomain. e.g. url_regex or urlpath_regex (or dstdom_regex) if you want the acl to regex match part or all of a URL (or domain).
Finally, multiple acls can be allowed or denied with cache_peer_access rules. Note that the order of rules is significant (first matching rule wins).
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You use the cache_peer config option to define a peer or parent, and you use cache_peer_access to force all requests matching a particular squid acl to use that peer.
For example:
cache_peer squid2.example.com sibling 3128 3130
acl alwayspeer dstdomain foo.example.com bar.example.com
cache_peer_access squid2.example.com allow alwayspeer
That will force all requests for those two domains (foo.example.com and bar.example.com) to go via the peer (squid2.example.com).
NOTE: alwayspeer is just an arbitrary name I chose for this acl.
If you also want to restrict usage of that peer to ONLY the domains listed in the alwayspeer acl, add the following line:
cache_peer_access squid2.example.com deny !alwayspeer
Any squid acl type can be used, not just dstdomain. e.g. url_regex or urlpath_regex (or dstdom_regex) if you want the acl to regex match part or all of a URL (or domain).
Finally, multiple acls can be allowed or denied with cache_peer_access rules. Note that the order of rules is significant (first matching rule wins).
You use the cache_peer config option to define a peer or parent, and you use cache_peer_access to force all requests matching a particular squid acl to use that peer.
For example:
cache_peer squid2.example.com sibling 3128 3130
acl alwayspeer dstdomain foo.example.com bar.example.com
cache_peer_access squid2.example.com allow alwayspeer
That will force all requests for those two domains (foo.example.com and bar.example.com) to go via the peer (squid2.example.com).
NOTE: alwayspeer is just an arbitrary name I chose for this acl.
If you also want to restrict usage of that peer to ONLY the domains listed in the alwayspeer acl, add the following line:
cache_peer_access squid2.example.com deny !alwayspeer
Any squid acl type can be used, not just dstdomain. e.g. url_regex or urlpath_regex (or dstdom_regex) if you want the acl to regex match part or all of a URL (or domain).
Finally, multiple acls can be allowed or denied with cache_peer_access rules. Note that the order of rules is significant (first matching rule wins).
answered Apr 25 '16 at 1:55
cas
38k44495
38k44495
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f278688%2fhow-to-pass-certain-url-to-parent-proxy-in-squid%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
The opposite of
always_directisnever_direct. Not kidding.â muru
Apr 25 '16 at 3:40