Oops, forgot to hook up myIpAddress().

This commit is contained in:
Michael Bayne
2019-06-05 15:44:06 -07:00
parent e376dff945
commit 157b12dbfa
3 changed files with 14 additions and 0 deletions
+2
View File
@@ -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 @@ public class ProxyUtilTest {
// 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");
}
}