On 03/11/2021 15:31, Paul Tansom wrote:
On 29/10/2021 17:39, Mark Rogers wrote:
Are you aware of a way to enable/require the proxy only for certain addresses? I have no need/desire to send all web traffic via my Pi.
Slow reply as life has become a tad complicated over the past couple of weeks and I'm juggling family, work and other commitments, whilst not actually being at home that much. That has, in fact, meant that I've just come across the same issue, but not actually found a solution yet. I'm wondering whether there's some sort of (regular?) expression that can be used in the area to set sites you don't want to use the proxy for that gets across "any site that isn't in this IP address range" or something like that.
My answer to a previous post should help: One way is via a Proxy Auto Configuration script (PAC).
This link below shows how to use it to switch on/off proxy depending if you are in your home network or not, but I'm fairly sure you could adapt the principles easily to route only certain traffic to a pi - you'd probably just need to work out some sort of "if" function to return true if the route should go to the pi. Look at the listed links for further info.
http://no-sheds.blogspot.com/2020/01/proxy-auto-configuration-script.html
You can use a PAC file on windows to have a system wide auto-changing proxy. I think, but am not sure, that you can do the same on Linux. You can also specify it in the web-browser.
I've had the added issue of having to mess with my hosts file, which I can't remember having done for years, to make up for the fact that I'm not on my local network to access my local Bind DNS server.
I did this initially to have an add-blocking proxy whilst at home, but when away from home, automatically switching the proxy off (because it wasn't accessible). You could use the same techniques as that website uses to achieve this.
Hope that helps
Steve