Proxy settings

I’d like to share a simple proxy.pac file that can be used in order to avoid continuous enable/disable proxy and/or change intercept on/off when dealing with Burp.

function FindProxyForURL(url, host)
	if (shExpMatch(url, "*//*"))
	   {return "DIRECT";}

	if (shExpMatch(url, "*.htb/*"))
	   {return "PROXY";}

	if (shExpMatch(url, "*.htb:*"))
	   {return "PROXY";}

	if (shExpMatch(url, "*//10.10.10.*"))
	   {return "PROXY";}

	return "DIRECT";

As you can see *.htb and 10.10.10/24 are sent to localhost:8080 with an exception ( All “normal” traffic (google, etc) is sent directly to the local gateway.

In order to use it, save it as proxy.pac in any directory you like and set up you browser’s connection settings.

In Firefox ESR:
preference >> advanced >> connection >> settings

Automatic proxy configuration URL:

hi mate, so if i set this up would i need to edit the file before i started a new box? ie changing to whatever the new ip of the box im trying to get into is?
constantly messing with the proxy settiings in fire fox to get burp to run is painful to say the least. thanks for this!



Please note: you don’t need to change to the new box’s ip. All the traffic to 10.10.10.* is already sent to Burp by the last if:

       {return "PROXY";}```so the also the traffic to new box will be already sent to Burp, if this pac is used.

The first `if` is used if you want to *force* direct transmission (*without Burb*) for a specific box. If you need a direct connection with the new box, you should change the `if`or add another one before the others:
```if (shExpMatch(url, "*//_NEW_IP_ADDR*"))
       {return "DIRECT";}```

it works well mate using it now.

Hey guys, sorry to revisit this so late after you guys sorted it, but I’ve been having a similar issue. (I think).

My Foxy Proxy extension is showing as disabled with the red cross through it.

I created the proxy.pac file, using the stuff you guys said above using the data given and the relevant file path in the Firefox network settings, but the foxy proxy extension had the big. red line through. it, with no option to see any of the options to use Burp, only the 3 options saying: ‘Options’, ‘Whats my IP?’ - and ‘Log’.

Is there something I need to change in Burpsuite too?

I’m still relatively new so I may be missing something basic, but thought I’d check it seemed to work for Malvo.

Would appreciate some help.