diff options
author | d3v11 <d3v11@d3v11.ano> | 2012-11-04 13:43:31 +0000 |
---|---|---|
committer | d3v11 <d3v11@d3v11.ano> | 2012-11-04 13:43:31 +0000 |
commit | da853b4a6df161e640e0a5af63b2b4de10adae84 (patch) | |
tree | a612658a68dd49d01525ab71068c5cb74a190e30 /contrib | |
parent | 61adeb2c97ef6a62dae0f2890139253faf00994c (diff) | |
download | resdb-da853b4a6df161e640e0a5af63b2b4de10adae84.tar.gz resdb-da853b4a6df161e640e0a5af63b2b4de10adae84.zip |
[quicktun.socks4a] bugfix
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/quicktun.socks4a/quicktun.socks4a | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/quicktun.socks4a/quicktun.socks4a b/contrib/quicktun.socks4a/quicktun.socks4a index 65fa86f..f5329b2 100755 --- a/contrib/quicktun.socks4a/quicktun.socks4a +++ b/contrib/quicktun.socks4a/quicktun.socks4a @@ -27,8 +27,8 @@ udp_poll = select.poll( ) 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 @@ if REMOTE_FLOAT==0: 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 @@ while REMOTE_FLOAT==1: 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 @@ fcntl.fcntl(tun_stdout,fcntl.F_SETFL,fcntl.fcntl( tun = subprocess.Popen( ['/usr/sbin/quicktun.'+PROTOCOL], stdout = subprocess.PIPE, -stdin = subprocess.PIPE ) +stdin = subprocess.PIPE, ) recvq = str( ) sendq = str( ) |