mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
22 lines
642 B
Plaintext
22 lines
642 B
Plaintext
|
#!/usr/bin/env python
|
||
|
import argparse
|
||
|
import libomnid
|
||
|
import tornado.ioloop
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
parser = argparse.ArgumentParser(description='Process some integers.')
|
||
|
parser.add_argument("-p", dest='port', default=8888, type=int, help='Port.')
|
||
|
parser.add_argument(
|
||
|
"-s", dest='staticdir', default=None, type=str,
|
||
|
help='Directory for static files.'
|
||
|
)
|
||
|
args = parser.parse_args()
|
||
|
|
||
|
libomnid.application(staticdir=args.staticdir).listen(args.port)
|
||
|
print "omnid listening on port %s"%args.port
|
||
|
try:
|
||
|
tornado.ioloop.IOLoop.instance().start()
|
||
|
except KeyboardInterrupt:
|
||
|
pass
|
||
|
|