Oops, forgot to hook up myIpAddress().
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
* Reinstated env var support in `appbase` property.
|
* Reinstated env var support in `appbase` property.
|
||||||
|
|
||||||
|
* Fixed issue with `myIpAddress()` in PAC proxy support.
|
||||||
|
|
||||||
## 1.8.6 - June 4, 2019
|
## 1.8.6 - June 4, 2019
|
||||||
|
|
||||||
* Fixed issues with PAC proxy support: added `myIpAddress()`, fixed `dnsResolve()`, fixed crash
|
* Fixed issues with PAC proxy support: added `myIpAddress()`, fixed `dnsResolve()`, fixed crash
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ function dnsResolve (host) {
|
|||||||
return resolver.dnsResolve(host)
|
return resolver.dnsResolve(host)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function myIpAddress () {
|
||||||
|
return resolver.myIpAddress()
|
||||||
|
}
|
||||||
|
|
||||||
function isInNet (addrOrHost, pattern, maskstr) {
|
function isInNet (addrOrHost, pattern, maskstr) {
|
||||||
var testRE = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
|
var testRE = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
|
||||||
var test = testRE.exec(addrOrHost);
|
var test = testRE.exec(addrOrHost);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
package com.threerings.getdown.launcher;
|
package com.threerings.getdown.launcher;
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
|
import java.net.InetAddress;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@@ -133,5 +134,12 @@ public class ProxyUtilTest {
|
|||||||
// return 'DIRECT';
|
// 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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user