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

Matthew McGillis commented on NET-468:
--------------------------------------

This is close but it does not resolve name lookups through the proxy so unless 
some how your local machine also knows the proper dns information through the 
proxy it does not work.

My testing is with IMAPClient. See the attached imapproxy.java for my test 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}

If I use it with:

{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}

> Request for native support for socks proxy routing with Commons net FTP
> -----------------------------------------------------------------------
>
>                 Key: NET-468
>                 URL: https://issues.apache.org/jira/browse/NET-468
>             Project: Commons Net
>          Issue Type: Improvement
>          Components: FTP
>    Affects Versions: 1.4, 2.0, 3.0.1, 3.1, 3.4
>         Environment: We use commons net  in out products for all 
> communication to an FTP server. OS : All. No other environment specifications.
>            Reporter: Ramya Rajendiran
>         Attachments: imapproxy.java, sockclient-proxy3.diff, 
> sockclient-proxy4.diff, sockclient-proxy5.diff, sockclient-proxy6.diff, 
> sockclient-proxy7.diff
>
>
> Commons net currently does not natively support connection to an FTP server 
> via a socks proxy. The only way of achieving this would be to work at the 
> socket level as observed here 
> http://wiki.apache.org/commons/Net/FrequentlyAskedQuestions. (by setting JVM 
> properties socksProxyPort and socksProxyPortHost)
> However, a major side effect of this all connections on this JVM will go 
> through the socks proxy since this setting is at the JVM level. This is 
> sometimes undesirable as the business requirements are such that only certain 
> applications on the JVM need to go through the socks proxy. There are no 
> existing workarounds to conditionally prevent other applications to not be 
> routed through the socks proxy. This makes our application which consumes the 
> commons net unusable for such businesses.
> Providing native support for socks proxy with commons net for FTP, will go a 
> long way in supporting such common scenarios and business continuity. 
> Therefore raising this enhancement request. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to