-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathproxy-negotiate
19 lines (15 loc) · 902 Bytes
/
proxy-negotiate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
import argparse
import os
from proxy_negotiate import NegotiateProxy, __version__
parser = argparse.ArgumentParser(description='A proxy server for applications '
'that do not natively support Negotiate '
'authentication for proxies.')
parser.add_argument('proxy_host', help='Hostname of the proxy server.')
parser.add_argument('proxy_port', help='Port of the proxy server.', type=int)
parser.add_argument('--host', help='Hostname or IP to listen for connections on.', default='127.0.0.1')
parser.add_argument('--port', help='Port to listen for connections on.', type=int, default=8080)
parser.add_argument('--version', '-V', action='version', version='%(prog)s ' + __version__)
args = parser.parse_args()
proxy = NegotiateProxy((args.host, args.port), (args.proxy_host, args.proxy_port))
proxy.serve_forever()