Skip to content

Instantly share code, notes, and snippets.

View davividal's full-sized avatar

Davi Koscianski Vidal davividal

View GitHub Profile
@davividal
davividal / mediahint.js
Last active August 29, 2015 14:13 — forked from raul/mediahint.js
function FindProxyForURL(url, host){
var myip = myIpAddress();
var ipbits = myip.split(".");
var myseg = parseInt(ipbits[3]);
if(myseg == Math.floor(myseg/2)*2){
proxy = 'PROXY 165.225.131.153:80; PROXY 165.225.130.193:80';
} else {
proxy = 'PROXY 165.225.130.193:80; PROXY 165.225.131.153:80';
}
if((host == 'localhost')||(shExpMatch(host, 'localhost.*'))||(shExpMatch(host, '*.local'))||(host == '127.0.0.1')){