Proxies in Python FTP application

前端 未结 6 630
青春惊慌失措
青春惊慌失措 2020-12-15 11:42

I\'m developing an FTP client in Python ftplib. How do I add proxies support to it (most FTP apps I have seen seem to have it)? I\'m especially thinking about SOCKS proxies,

6条回答
  •  情歌与酒
    2020-12-15 12:16

    I had the same problem and needed to use the ftplib module (not to rewrite all my scripts with URLlib2).

    I have managed to write a script that installs transparent HTTP tunneling on the socket layer (used by ftplib).

    Now, I can do FTP over HTTP transparently !

    You can get it there: http://code.activestate.com/recipes/577643-transparent-http-tunnel-for-python-sockets-to-be-u/

提交回复
热议问题