[Twisted-Python] Need help using FTPClient
![](https://secure.gravatar.com/avatar/0b89e6237a94681a6102febe490c8b41.jpg?s=120&d=mm&r=g)
Hi. I am new to Twisted. I am using this code: http://twistedmatrix.com/documents/current/core/examples/ftpclient.py<http://twistedmatrix.com/documents/current/core/examples/ftpclient.py> Can this example be used to connect to an FTP through a SOCKS4/5 proxy? Can somebody provide an example of how it should be done? Thanks
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
On Dec 27, 2012, at 9:33 AM, Master Corp <corpmasters@gmail.com> wrote:
Is there any reason you want to use Twisted to do your SOCKS proxying? Programs like 'socksify' typically do what you need in a general way that does not require any awareness from your application. (Twisted does have a SOCKS implementation, but it's rarely worth the trouble to plug it in.) -glyph
![](https://secure.gravatar.com/avatar/415203f2727ceaf56d8f7f5e6d5d508b.jpg?s=120&d=mm&r=g)
Well, sure; if you want your program to do the SOCKSing, Twisted has an implementation for that, so you *can*; Glyph is just suggesting that it may be easier to use Twisted only for the FTP-y bits, and rely on other software (such as socksify) to handle the SOCKS parts :) So, to rephrase the question: is there a reason you're not using an external app to do the SOCKS parts? On Fri, Dec 28, 2012 at 10:00 AM, Master Corp <corpmasters@gmail.com> wrote:
-- cheers lvh
![](https://secure.gravatar.com/avatar/fcdfff68a2c9b2d1d199e4626998c791.jpg?s=120&d=mm&r=g)
On Fri, Dec 28, 2012 at 11:21 AM, Master Corp <corpmasters@gmail.com> wrote:
There is a SOCKS5 client in a Twisted ticket, but it hasn't been merged into trunk yet (for lack of tests IIRC). I don't know whether it still works, but it did at one time. Here's the ticket: http://twistedmatrix.com/trac/ticket/1330 -- Kevin Horn
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
On Dec 27, 2012, at 9:33 AM, Master Corp <corpmasters@gmail.com> wrote:
Is there any reason you want to use Twisted to do your SOCKS proxying? Programs like 'socksify' typically do what you need in a general way that does not require any awareness from your application. (Twisted does have a SOCKS implementation, but it's rarely worth the trouble to plug it in.) -glyph
![](https://secure.gravatar.com/avatar/415203f2727ceaf56d8f7f5e6d5d508b.jpg?s=120&d=mm&r=g)
Well, sure; if you want your program to do the SOCKSing, Twisted has an implementation for that, so you *can*; Glyph is just suggesting that it may be easier to use Twisted only for the FTP-y bits, and rely on other software (such as socksify) to handle the SOCKS parts :) So, to rephrase the question: is there a reason you're not using an external app to do the SOCKS parts? On Fri, Dec 28, 2012 at 10:00 AM, Master Corp <corpmasters@gmail.com> wrote:
-- cheers lvh
![](https://secure.gravatar.com/avatar/fcdfff68a2c9b2d1d199e4626998c791.jpg?s=120&d=mm&r=g)
On Fri, Dec 28, 2012 at 11:21 AM, Master Corp <corpmasters@gmail.com> wrote:
There is a SOCKS5 client in a Twisted ticket, but it hasn't been merged into trunk yet (for lack of tests IIRC). I don't know whether it still works, but it did at one time. Here's the ticket: http://twistedmatrix.com/trac/ticket/1330 -- Kevin Horn
participants (5)
-
Glyph
-
Itamar Turner-Trauring
-
Kevin Horn
-
Laurens Van Houtven
-
Master Corp