[bug] Proxy exceptions don't work with hosts file

Board for discussions around the Basilisk web browser.

Moderator: Basilisk-Dev

alancast

[bug] Proxy exceptions don't work with hosts file

Unread post by alancast » 2018-11-01, 05:21

I set
Advanced - Network - Connection - Settings - Manual proxy configuration
with SOCKS 5 tunnel, and

No proxy for:
127.0.0.1, localhost, smarthome

and I have a string in my hosts file:
127.0.0.1 smarthome

So when I type in URL bar
http://smarthome/cafe/boil

Basilisk should look for "smarthome" in my hosts file and connect to my local server.
Instead it goes to
http://www.smarthome.com/cafe/boil

though without proxy in Basilisk configuration it doesn't do that.

Thus, proxy exceptions don't work with the hosts file.
It's a bug.

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 938
Joined: 2017-12-14, 12:59

Re: [bug] Proxy exceptions don't work with hosts file

Unread post by gepus » 2018-11-02, 07:40

Whatever you want to accomplish, your approach is wrong.
Thus I assume that you'll get the same results with any other browser you'd test with.

- If you type in the URL bar http://smarthome/cafe/boil the browser (with proxy enabled) will try to connect to that address.
- If the proxy is disabled the browser can't connect to http://smarthome/cafe/boil since your hosts file is blocking this address by redirecting it to 127.0.0.1, your local machine where no proxy is listening anymore.

If you have a local network and you want to redirect to it from your hosts file than you'll have to try something like this:

Code: Select all

#   127.0.0.1    localhost
#         ::1    localhost
192.168.1.x      mylocalnetwork.com
However this topic is not related to Basilisk but rather to how to configure my hosts file.

yami_

Re: [bug] Proxy exceptions don't work with hosts file

Unread post by yami_ » 2018-11-02, 10:14

You probably just need to disable the browser.fixup.alternate.enabled pref.

alancast

Re: [bug] Proxy exceptions don't work with hosts file

Unread post by alancast » 2018-11-08, 19:18

yami_ thanks. It seems it was not always working, but I think it was some browser redirect malware, hard to find & clean up.

gepus, no, I was trying to say that the domain I tried to reach ("smarthome") was served from IP 127.0.0.1, and it was explicitly said in the hosts file.

As it is a valid domain found in hosts file, the browser should not go to any outer DNS servers or make substitutions.

Otherwise it's a bug.

Locked