You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ninadmnaik <nn...@gmail.com> on 2013/07/16 19:59:18 UTC

Ftp connection through SOCKS Proxy.

In our project, we need to establish FTP connection through a SOCKS proxy.
Since Camel uses Apache Commons Net API underneath for FTP connections, I
tried looking into how Commons Net API supports this. Till last year, the
only way to achieve this was to set Java's System Properties as explained
here:

http://wiki.apache.org/commons/Net/FrequentlyAskedQuestions

But according to Java docs
(http://docs.oracle.com/javase/6/docs/technotes/guides/net/properties.html):
"If socksProxyHost is specified then all TCP sockets will use the SOCKS
proxy server to establish a connection or accept one."

The following patch seems to address this problem by using the Proxy class
in Java 6
http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html

Patch to apache commons net:
https://issues.apache.org/jira/browse/NET-468

So is there a way in Camel to achieve this?
The FTP component link:
http://camel.apache.org/ftp.html and the book: "Camel In Action" don't
indicate that this feature is available in Camel yet. 

Can you please advice on this?

Thanks, 
Ninad.






--
View this message in context: http://camel.465427.n5.nabble.com/Ftp-connection-through-SOCKS-Proxy-tp5735735.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Ftp connection through SOCKS Proxy.

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jul 18, 2013 at 10:08 PM, ninadmnaik <nn...@gmail.com> wrote:
> Thanks Willem ! The NET-468 patch was released as a part of the issue:
>  https://issues.apache.org/jira/browse/NET-468
> I guess the ticket is still open because they might need some more unit
> tests.
>
> I modified camel-fTP component to support setting the proxy object as well
> as setting up authentication info for a socks server. Seems to work.
> When I create a Jira can I upload my patch for consideration?
>

Sounds great. We love contributions and patches.

See details here how to contribute
http://camel.apache.org/contributing.html



>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Ftp-connection-through-SOCKS-Proxy-tp5735735p5735873.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Ftp connection through SOCKS Proxy.

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Any update on your contribution?

On Thu, Jul 18, 2013 at 10:08 PM, ninadmnaik <nn...@gmail.com> wrote:
> Thanks Willem ! The NET-468 patch was released as a part of the issue:
>  https://issues.apache.org/jira/browse/NET-468
> I guess the ticket is still open because they might need some more unit
> tests.
>
> I modified camel-fTP component to support setting the proxy object as well
> as setting up authentication info for a socks server. Seems to work.
> When I create a Jira can I upload my patch for consideration?
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Ftp-connection-through-SOCKS-Proxy-tp5735735p5735873.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Ftp connection through SOCKS Proxy.

Posted by ninadmnaik <nn...@gmail.com>.
Thanks Willem ! The NET-468 patch was released as a part of the issue:
 https://issues.apache.org/jira/browse/NET-468
I guess the ticket is still open because they might need some more unit
tests. 

I modified camel-fTP component to support setting the proxy object as well
as setting up authentication info for a socks server. Seems to work. 
When I create a Jira can I upload my patch for consideration?





--
View this message in context: http://camel.465427.n5.nabble.com/Ftp-connection-through-SOCKS-Proxy-tp5735735p5735873.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Ftp connection through SOCKS Proxy.

Posted by Willem jiang <wi...@gmail.com>.
As you know current camel-ftp is based of common net API, if the NET-468 patch is released, I think we can easily as the support of setting the Proxy object.
Please feel free to fill a JIRA[1] and we can keep it in mind :)

[1]https://issues.apache.org/jira/browse/CAMEL  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Wednesday, July 17, 2013 at 1:59 AM, ninadmnaik wrote:

> In our project, we need to establish FTP connection through a SOCKS proxy.
> Since Camel uses Apache Commons Net API underneath for FTP connections, I
> tried looking into how Commons Net API supports this. Till last year, the
> only way to achieve this was to set Java's System Properties as explained
> here:
>  
> http://wiki.apache.org/commons/Net/FrequentlyAskedQuestions
>  
> But according to Java docs
> (http://docs.oracle.com/javase/6/docs/technotes/guides/net/properties.html):
> "If socksProxyHost is specified then all TCP sockets will use the SOCKS
> proxy server to establish a connection or accept one."
>  
> The following patch seems to address this problem by using the Proxy class
> in Java 6
> http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html
>  
> Patch to apache commons net:
> https://issues.apache.org/jira/browse/NET-468
>  
> So is there a way in Camel to achieve this?
> The FTP component link:
> http://camel.apache.org/ftp.html and the book: "Camel In Action" don't
> indicate that this feature is available in Camel yet.  
>  
> Can you please advice on this?
>  
> Thanks,  
> Ninad.
>  
>  
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Ftp-connection-through-SOCKS-Proxy-tp5735735.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).