Mercurial > hg > anonet-resdb
changeset 1053:259a97198267 draft
[quicktun.socks4a] bugfix
author | d3v11 <d3v11@d3v11.ano> |
---|---|
date | Sun, 04 Nov 2012 13:43:31 +0000 |
parents | 004034faf019 |
children | 1bd7b953bdd3 |
files | contrib/quicktun.socks4a/quicktun.socks4a |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/quicktun.socks4a/quicktun.socks4a Sun Nov 04 12:59:01 2012 +0000 +++ b/contrib/quicktun.socks4a/quicktun.socks4a Sun Nov 04 13:43:31 2012 +0000 @@ -27,8 +27,8 @@ udp_poll.register(udp.fileno(),select.POLLIN|select.POLLPRI ) if REMOTE_FLOAT==0: - tun = subprocess.Popen ( - [ 'socat','stdio','socks4a:'+SOCKS_ADDRESS+':' + tun = subprocess.Popen ([ + 'socat','stdio','socks4a:'+SOCKS_ADDRESS+':' +DST_ADDRESS+':'+DST_PORT +',socksport='+SOCKS_PORT ], @@ -40,7 +40,7 @@ tun_poll.register ( tun.stdout.fileno(), select.POLLIN|select.POLLPRI) -while REMOTE_FLOAT==1: +if REMOTE_FLOAT==1: tcp = socket.socket( socket.AF_INET,socket.SOCK_STREAM) tcp.setsockopt (socket.SOL_SOCKET,socket.SO_REUSEADDR,1 ) @@ -50,7 +50,7 @@ tcp_poll = select.poll( ) tcp_poll.register(tcp.fileno(),select.POLLIN|select.POLLPRI ) - if len(tcp_poll.poll(65536))>0: + while len(tcp_poll.poll(65536))>0: tun = tcp.accept ()[0] tun_stdout = tun.fileno ( ) tun_stdin = tun.fileno ( ) @@ -67,7 +67,7 @@ tun = subprocess.Popen( ['/usr/sbin/quicktun.'+PROTOCOL], stdout = subprocess.PIPE, -stdin = subprocess.PIPE ) +stdin = subprocess.PIPE, ) recvq = str( ) sendq = str( )