[ https://issues.apache.org/jira/browse/NET-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16341839#comment-16341839 ]
Matthew McGillis commented on NET-650: -------------------------------------- > If the remote does not have a mapping, you have to use/remember the IP > address. It would be nice to be able to define the IP as a local mapping. I'm not sure that gets very confusing in a number of contexts. I might like it in some cases but not sure I would want it on default. Have you actually tested that a name existing in both places but different ends up always using the local one? To my thinking I want the remote name mapping first. Maybe if it doesn't exist remotely then look locally. I haven't looked at the actual InetSocketAddress code but some code does now about the proxy and InetSocketAddress may also know this or it may not if you have looked at the code and nothing about the proxy is in it OK but the proxy as I have outlined it is easly knowable simply by checking the property setting. Also keep in mind where this ticket came from which was adding support for something in common-net to know about a proxy so you could specifically configure it in the code. I'm sort of wondering if that has been done consistently with property settings what happens if they overlap. > IMAPClient over proxy doesn't properly resolve DNS > -------------------------------------------------- > > Key: NET-650 > URL: https://issues.apache.org/jira/browse/NET-650 > Project: Commons Net > Issue Type: Bug > Components: IMAP > Affects Versions: 3.6 > Reporter: Matthew McGillis > Priority: Major > Attachments: imapproxy.java, imapproxy2.java, socketproxy.java > > > IMAPClient when configured to use a socks proxy is not able to resolve DNS > names through the proxy. > See attached sample code, if I use it with: > {noformat} > $ java -DsocksProxyHost=localhost -DsocksProxyPort=16003 -cp > .:./commons-net-3.6.jar imapproxy imap.server.test.com user1 userpass > connect error: java.net.UnknownHostException: imap.server.test.com: unknown > error > {noformat} > vs if I use it with the appropriate IP: > {noformat} > $ java -DsocksProxyHost=localhost -DsocksProxyPort=16003 -cp > .:./commons-net-3.6.jar imapproxy 10.250.3.127 user1 userpass > * OK IMAP4rev1 proxy server ready > IMAP: 10.250.3.127 143 > AAAA LOGIN ******* > AAAA OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE > ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ > LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR > SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN > completed > AAAB LOGOUT > * BYE 10.250.3.127 Zimbra IMAP4rev1 server closing connection > AAAB OK LOGOUT completed > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)