Skip to content
Permalink
Browse files

Oops, forgot to hook up myIpAddress().

  • Loading branch information...
samskivert committed Jun 5, 2019
1 parent e376dff commit 157b12dbfa46b66e967cedf89825cb10ddda8109
@@ -4,6 +4,8 @@

* Reinstated env var support in `appbase` property.

* Fixed issue with `myIpAddress()` in PAC proxy support.

## 1.8.6 - June 4, 2019

* Fixed issues with PAC proxy support: added `myIpAddress()`, fixed `dnsResolve()`, fixed crash
@@ -23,6 +23,10 @@ function dnsResolve (host) {
return resolver.dnsResolve(host)
}

function myIpAddress () {
return resolver.myIpAddress()
}

function isInNet (addrOrHost, pattern, maskstr) {
var testRE = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
var test = testRE.exec(addrOrHost);
@@ -6,6 +6,7 @@
package com.threerings.getdown.launcher;

import java.io.StringReader;
import java.net.InetAddress;
import java.net.URL;

import org.junit.Test;
@@ -133,5 +134,12 @@ static void testPAC (String code, String url, String... expectedProxies) throws
// return 'DIRECT';
// }
// }

String MYIP =
"function FindProxyForURL(url, host) {\n" +
" return 'PROXY ' + myIpAddress() + ':8080';\n" +
"}";
String myIp = InetAddress.getLocalHost().getHostAddress();
testPAC(MYIP, "http://testurl.com/", "PROXY " + myIp + ":8080");
}
}

0 comments on commit 157b12d

Please sign in to comment.
You can’t perform that action at this time.