Nazo
2[H]4U
- Joined
- Apr 2, 2002
- Messages
- 3,672
So I have a fairly cheap VPN. It's not blazing fast, but beggars can't be choosers as they say. However, I have found that if I use a Squid proxy it suddenly performs almost as well as if there were no VPN at all. So what I've done is setup a Raspberry Pi 2 that isn't doing anything else to act as a simple system on the LAN to connect to the VPN automatically on startup and then I can run my browser through Squid on it. This keeps things very simple and efficient and ensures that non-browser things like my games bypass the VPN (I just want the browser to go through -- I don't want the slow speeds and high latency this would cause in games.) Actually, I had done all of this once before, but sadly the memory card went bad and I had to start over from scratch.
Unfortunately there is a caveat. Some websites block my VPN's address range on principle alone. I'm aware some people misuse VPNs (though many misuse their local connections, so I think it's kind of silly to block whole ranges outright with such an assumption.) In some cases they'll let me in if I verify that I'm human via a captcha or whatever, but a few won't. Unfortunately a couple of these include some services I have to use. But then these particular sites are fine for directly connecting anyway. Unfortunately, normally it's all or nothing. However, for a very very long time now a system has been in place for automatic proxy configuration scripts. Last time I googled around and figured it out and had it working. Unfortunately I apparently am either thinking of the wrong search terms or not finding the right stuff somehow otherwise because I'm not able to come up with a fully working script. I have the most basics in place and I managed to get it working before on sites when a subdomain (eg www.whatever.com) is specified, but not without the subdomain (eg whatever.com) and I really would rather have both working. First of all, here is what I've cobbled together after a fair bit of googling:
I've tried a bunch of different ways of actually doing the part that bypasses for specific sites and one will work but requires subdomains. This one seems to work ok with subdomains but not without. (I actually once tried removing that dot, but it made it bypass the proxy for everything...) BTW, I presume it doesn't actually need the else since it has the final overarching default return proxy at the end, but all the code samples I copied from had that and when things weren't working I put that in just to dot my 'i's.
I seem to recall that whatever I had before had to actually have duplicates for each site -- one to make it work with subdomains and one to work even without them and that much is ok. Unfortunately I just can't remember the specifics. I do want to (if at all possible) keep each site on a separate line like that so it's easy to come in and add or even remove one since I don't even know what all I need to do this for. (For one, I've lost the list of sites I needed it on since of course that all died with the old memory card. For another some sites are very tricky and give you an error that completely throws you off. One even basically implied there were server issues and it had nothing to do with my side at all that it wouldn't load pages... Very few outright state that they're blocking the IP range and if it weren't for those few I wouldn't even have known what was going on. Sometimes I have to add a site to the bypass list just to test and see if that's what's going on.)
PS. This time if I get it working again I'm backing this thing up...
Unfortunately there is a caveat. Some websites block my VPN's address range on principle alone. I'm aware some people misuse VPNs (though many misuse their local connections, so I think it's kind of silly to block whole ranges outright with such an assumption.) In some cases they'll let me in if I verify that I'm human via a captcha or whatever, but a few won't. Unfortunately a couple of these include some services I have to use. But then these particular sites are fine for directly connecting anyway. Unfortunately, normally it's all or nothing. However, for a very very long time now a system has been in place for automatic proxy configuration scripts. Last time I googled around and figured it out and had it working. Unfortunately I apparently am either thinking of the wrong search terms or not finding the right stuff somehow otherwise because I'm not able to come up with a fully working script. I have the most basics in place and I managed to get it working before on sites when a subdomain (eg www.whatever.com) is specified, but not without the subdomain (eg whatever.com) and I really would rather have both working. First of all, here is what I've cobbled together after a fair bit of googling:
Code:
var direct = "DIRECT";
var proxy = "PROXY 192.168.1.100:3128";
var deny = "PROXY 127.0.0.1:65535";
function FindProxyForURL(url, host) {
if (isInNet(host, "192.168.0.0", "255.255.0.0") ||
isInNet(host, "10.0.0.0", "255.0.0.0") ||
isInNet(host, "127.0.0.1", "255.255.255.0"))
{
return direct;
}
// Bypass proxy for these sites
if (
dnsDomainIs(host, ".site1.com") ||
dnsDomainIs(host, ".site2.com") ||
dnsDomainIs(host, ".site3.com"))
{
return direct;
}
else
{
return proxy;
}
{ return proxy; }
}
I seem to recall that whatever I had before had to actually have duplicates for each site -- one to make it work with subdomains and one to work even without them and that much is ok. Unfortunately I just can't remember the specifics. I do want to (if at all possible) keep each site on a separate line like that so it's easy to come in and add or even remove one since I don't even know what all I need to do this for. (For one, I've lost the list of sites I needed it on since of course that all died with the old memory card. For another some sites are very tricky and give you an error that completely throws you off. One even basically implied there were server issues and it had nothing to do with my side at all that it wouldn't load pages... Very few outright state that they're blocking the IP range and if it weren't for those few I wouldn't even have known what was going on. Sometimes I have to add a site to the bypass list just to test and see if that's what's going on.)
PS. This time if I get it working again I'm backing this thing up...