I have a very specific use case, which accessing self host websites in my own home lab, which are in an isolated network. Torsocks is running correctly on my linux installation.
So for my everyday use of the webservices, I’d like to set up proxy whitelists for these domains:
If I understand correctly, you are attempting to use Tor for everything but the internal domain that you wish to whitelist (bypass Tor). The script example appears to be a PAC (Proxy Auto-Configuration) file.
I think you have the logic backwards. It appears that you are testing for your internal domain, but instead of bypassing Tor, it is sending that traffic to Tor.
I have never written a PAC file, but I think you need to change those entries to a “Return Value Format” of “DIRECT”:
With all that being said, I can find no reference of bypassing “torsocks” using a PAC file.
Maybe use a second browser for your internal domain.