25 lines
627 B
Python
Executable File
25 lines
627 B
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
import time
|
|
|
|
from optparse import OptionParser
|
|
|
|
import srvside
|
|
import cliside
|
|
|
|
parser = OptionParser(usage="%prog [options]")
|
|
parser.add_option("-l",
|
|
"--listen",
|
|
dest = "port",
|
|
help = "listen local remote port")
|
|
parser.add_option("-f",
|
|
"--forward",
|
|
dest = "forward",
|
|
help = "forward local remote ip")
|
|
(options, args) = parser.parse_args()
|
|
|
|
if options.forward:
|
|
srvside.ServerSide(options.forward, args[0]).run()
|
|
else:
|
|
cliside.ClientSide(options.port, args[0]).run()
|