Add myIpAddress() to PAC proxy environment.
Also fixed issue with dnsResolve() in same.
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
# Getdown Releases
|
# 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
|
## 1.8.5 - May 29, 2019
|
||||||
|
|
||||||
* Fixed issues with proxy information not getting properly passed through to app.
|
* 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 static class Resolver {
|
||||||
public String dnsResolve (String host) {
|
public String dnsResolve (String host) {
|
||||||
try {
|
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) {
|
} catch (UnknownHostException uhe) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user