Skip to content

Instantly share code, notes, and snippets.

@abnrk
Created January 17, 2026 22:41
Show Gist options
  • Select an option

  • Save abnrk/e27ae1e115d40988c7e246c9753f57c4 to your computer and use it in GitHub Desktop.

Select an option

Save abnrk/e27ae1e115d40988c7e246c9753f57c4 to your computer and use it in GitHub Desktop.
<?php
header("Content-Type: application/x-ns-proxy-autoconfig");
echo "var hosts = ".json_encode(explode(",",$_GET["hosts"])).";\n";
?>
function FindProxyForURL(url, host) {
if(hosts.includes(host)) {
return "PROXY 127.0.0.1:18080";
}
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment