We now have a server that works... some of the time.

There still seem to be some weird timing and/or closing-related bugs, since
I can't load the eqldata project correctly unless I use --noserver.
This commit is contained in:
Avery Pennarun
2010-05-02 00:52:06 -04:00
parent d435c41bdb
commit 915a96b0ec
5 changed files with 146 additions and 38 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
import sys, os, re
import options, client, iptables
import options, client, iptables, server
# list of:
@ -58,10 +58,7 @@ o = options.Options('sshuttle', optspec)
(opt, flags, extra) = o.parse(sys.argv[1:])
if opt.server:
#o.fatal('server mode not implemented yet')
os.dup2(2,1)
os.execvp('hd', ['hd'])
sys.exit(1)
sys.exit(server.main())
elif opt.iptables:
if len(extra) < 1:
o.fatal('at least one argument expected')