Sometimes when you doing CTFs/bug bounties/etc, you face the need to send the traffic to a certain site through a local proxy (or remote proxy for other cases) while keeping other websites access internet directly.
This is how you can do it through a PAC file.
This is how you can do it through a PAC file.
Step 1:
Start your local proxy (I have started a burpsuite proxy in localhost (127.0.0.1) on port 8080 in this case).Step 2:
Create a PAC filefunction FindProxyForURL(url, host) {
host = host.toLowerCase();
if (dnsDomainIs(host, "ac8120303e848cf980e4d1d0.web-security-academy.net"))
return "PROXY 127.0.0.1:8080"; // (IP:port)
return "DIRECT";
}