java - How to resolve DNS name to IP if internet connection has a manual proxy settings? -
java - How to resolve DNS name to IP if internet connection has a manual proxy settings? -
i want resolve dns name appropriate ip using next code:
seek { inetaddress address = inetaddress.getbyname("www.google.com"); byte []addr = address.getaddress(); } catch(unknownhostexception e) { }
this code works if utilize wifi connection without proxy settings. if utilize wifi connection has proxy settings unknownhostexception in same time can browse "www.google.com" while beingness behind proxy.
please explain me why happens , how overcome issue.
when using http proxy server, dns lookup of domain names of web requests handled proxy.
more likely, when on network requires proxy server, network blocks other net traffic not going through proxy, including access dns port 53. hence, web browser , apps using http libraries works. apps using socket libraries typically fail work.
i suspect network requiring proxy setting @ work while network without proxy setting @ home. enterprise firewall configurations such proxies, such in work place, typically restrain network traffic "web only".
java android dns
Comments
Post a Comment