On 03/11/2021 15:31, Paul Tansom wrote:
On 29/10/2021 17:39, Mark Rogers wrote:
On Fri, 22 Oct 2021 at 09:34, Paul Tansom paul@aptanet.com wrote:
You can use a standard ssh install to create the Socks proxy, so no need for extra software installs. The incantation is something along the lines of:
ssh -i ~/.ssh/id_rsa -D 1080 -f -C -q -N user@hostname.tld
Where: [...]
Ah, that's pretty much perfect, thank you!
For Firefox just go to the bottom section of the Settings where you have Network Settings and a button to configure things.
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.
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. What I really need is my Wireguard VPN back up and running, but that's another story! [1]
One possibly, but rather clunky, option would be to use different web browsers, and if you want to use the same one (working on Firefox as my example) either use profiles or alternative installs. Firefox profiles requires a close and restart of the browser (so possibly no easier than flipping to the settings and enabling/disabling the proxy; which thankfully remembers the values for the disabled option), but I'm not sure if the profiles in other browsers can handle different proxy setups (you would hope), or a Socks proxy. If you're on Ubuntu, or other Snap supporting distro you can install the deb and Snap packages at the same time, or try an Appimage (not sure how up to date it is kept) or Flatpak (not tried, but would require a few extra bits to get it running).
If I manage to come up with a solution I'll post another reply.
... and here it is :-)
There's a Firefox plug-in called FoxyProxy which does exactly what is needed, and seems to have been around and is flagged as recommended as well. Once installed configure a proxy as follows:
Add a new one, with a suitable description, remove the whitelist pattern for all URLs and configure your proxy, so as I run my Socks on port 9080 (to avoid needing to use sudo or root) I have a SOCKS5 proxy type, using localhost and port 9080 (with no user credentials). Save and edit patterns.
The patterns should be empty, so add a white pattern with a suitable name with the pattern matching your IP address range (e.g. 192.168.0.[1-254]) and ensure the type is Reg Exp. I've stuck with all for the HTTP/s bit and obviously it needs to be enabled. I've also got one for accessing my my local DNS (since I have DNS heading across the proxy too), which is a wildcard along the lines of *.home.tld.uk in there (I also have a couple of IPs where I have restricted access to the remote port of a couple of routers to my static IP addresses so need to bounce of my own connection - these seem to work best as Reg Exp even though I'm just quoting the IP).
Once this is setup you can use the FoxyProxy icon in the top bar and set it to "Use enabled proxies by pattern and order". It indicates which proxy you are using over the icon (or no proxy). It seems to work pretty well so far. It is also quite handy for setting up other proxies and being able to switch easily between them. I should have looked before!