- Portals
- The Current Year
- ED in the News
- Admins
- Help ED Rebuild
- Archive
- ED Bookmarklet
- Donate Bitcoin
Contact an admin on Discord or EDF if you want an account. Also fuck bots.
User:Doxcat/proxy autoconfig
Jump to navigation
Jump to search
i created this 1 a long time ago at my first job in order to bypass their network security
after getting the password in on my iPod for the wireless network, i found that i still could not browse porn
this is bad. so i started an ssh tunnel to a remote host, but used my local machine as a socks proxy
i had been doing this. however, i realized that i can do this to create a dynamic proxy, so i could use my phone unfiltered from anywhere.
here's le saws:
<?php header("Content-type: application/x-ns-proxy-autoconfig"); $get = $_GET['ip']; $port = $_GET['port']; ?> function FindProxyForURL(url,host) { return "SOCKS <?php echo $get; ?>:<?php echo $port; ?>"; } ?>
i use these two lines in .htaccess 4 prettified urls:
RewriteRule ^proxy/(\d+)\.(\d+)\.(\d+)\.(\d+)\.pac$ proxy.php?ip=$1.$2.$3.$4&port=1080 RewriteRule ^proxy/(\d+)\.(\d+)\.(\d+)\.(\d+):(\d+)\.pac$ proxy.php?ip=$1.$2.$3.$4&port=$5