Add myIpAddress() to PAC proxy environment.

Also fixed issue with dnsResolve() in same.
This commit is contained in:
Michael Bayne
2019-05-31 09:51:31 -07:00
parent 85c4a0ddc1
commit ce76832835
2 changed files with 13 additions and 1 deletions
+5
View File
@@ -1,5 +1,10 @@
# Getdown Releases
## 1.8.6 - Unreleased
* Fixed issues with PAC proxy support: added `myIpAddress()`, fixed `dnsResolve()`, fixed crash
when detecting PAC proxy.
## 1.8.5 - May 29, 2019
* Fixed issues with proxy information not getting properly passed through to app.
@@ -237,7 +237,14 @@ public final class ProxyUtil {
public static class Resolver {
public String dnsResolve (String host) {
try {
return InetAddress.getByName(host).toString();
return InetAddress.getByName(host).getHostAddress();
} catch (UnknownHostException uhe) {
return null;
}
}
public String myIpAddress () {
try {
return InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException uhe) {
return null;
}