Skip to content

Instantly share code, notes, and snippets.

@wenshin
Created December 11, 2021 06:57
Show Gist options
  • Save wenshin/58086418cd7c41ac54233fee700cae84 to your computer and use it in GitHub Desktop.
Save wenshin/58086418cd7c41ac54233fee700cae84 to your computer and use it in GitHub Desktop.
// https://noopac.com/{yourAccount}/{yourXiegongjiID}.pac
var yourXiegongjiID = 0; // number or string
var timestamp=Number(new Date().getTime()+Math.ceil(Math.random()*100)).toString(36);
var id=Number(yourXiegongjiID).toString(36);
function ip2int(ip) {
return ip.split('.').reduce(function(ipInt, octet) { return (ipInt<<8) + parseInt(octet, 10)}, 0) >>> 0;
}
function init(){
var ip="127.0.0.1";
ip=ip2int(ip).toString(36);
httpProxy="http://ssl-" + id + "-" + ip + "-" + timestamp + ".noopac.com:3389;";
httpsProxy=("https://ssl-" + id + "-" + ip + "-" + timestamp + ".noopac.com");
console.log('http proxy', httpProxy)
console.log('https proxy', httpsProxy)
}init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment