commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew McGillis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NET-650) IMAPClient over proxy doesn't properly resolve DNS
Date Fri, 26 Jan 2018 23:56:00 GMT

    [ https://issues.apache.org/jira/browse/NET-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16341812#comment-16341812
] 

Matthew McGillis commented on NET-650:
--------------------------------------

> There may be no remote mapping, so you might want to add your own local definition.

I would want to know that the remote does not know haw to resolve the name.

> Also the code may not know that a proxy is being used.

But I do and because I told it I wanted it to use the proxy. If I don't want to use the proxy
I won't specify it.

> As it stands, the constructor new InetSocketAddress(host, port) will use the local definition
if there is one.
To force the use of the remote mapping, one would need to use InetSocketAddress. InetSocketAddress(host,port)

Not following the above you sure you wrote it correctly.

> 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)

Mime
View raw message