Add myIpAddress() to PAC proxy environment.
Also fixed issue with dnsResolve() in same.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user