1 var g_iteration = 0; 2 3 function FindProxyForURL(url, host) { 4 alert('iteration: ' + g_iteration++); 5 6 var ips = [ 7 myIpAddress(), 8 dnsResolve(''), 9 dnsResolveEx('host1'), 10 dnsResolve('host2'), 11 dnsResolve('host3'), 12 myIpAddress(), 13 dnsResolve('host3'), 14 dnsResolveEx('host1'), 15 myIpAddress(), 16 dnsResolve('host2'), 17 dnsResolveEx('host6'), 18 myIpAddressEx(), 19 dnsResolve('host1'), 20 ]; 21 22 for (var i = 0; i < ips.length; ++i) { 23 // Stringize everything. 24 ips[i] = '' + ips[i]; 25 } 26 27 var proxyHost = ips.join('-'); 28 proxyHost = proxyHost.replace(/[^0-9a-zA-Z.-]/g, '_'); 29 30 return "PROXY " + proxyHost + ":99"; 31 } 32