|
2 | 2 | from pproxy import proto |
3 | 3 |
|
4 | 4 | __title__ = 'pproxy' |
5 | | -__version__ = "1.6" |
| 5 | +__version__ = "1.6.2" |
6 | 6 | __description__ = "Proxy server that can tunnel among remote servers by regex rules." |
7 | 7 | __author__ = "Qian Wenjie" |
8 | 8 | __license__ = "MIT License" |
@@ -213,15 +213,15 @@ def main(): |
213 | 213 | parser.add_argument('-r', dest='rserver', default=[], action='append', type=ProxyURI.compile_relay, help='remote server setting uri (default: direct)') |
214 | 214 | parser.add_argument('-b', dest='block', type=pattern_compile, help='block regex rules') |
215 | 215 | parser.add_argument('-a', dest='alived', default=0, type=int, help='interval to check remote alive (default: no check)') |
216 | | - parser.add_argument('-v', dest='v', action='store_true', help='print verbose output') |
| 216 | + parser.add_argument('-v', dest='v', action='count', help='print verbose output') |
217 | 217 | parser.add_argument('--ssl', dest='sslfile', help='certfile[,keyfile] if server listen in ssl mode') |
218 | | - parser.add_argument('--pac', dest='pac', help='http PAC path') |
| 218 | + parser.add_argument('--pac', help='http PAC path') |
219 | 219 | parser.add_argument('--get', dest='gets', default=[], action='append', help='http custom {path,file}') |
220 | | - parser.add_argument('--test', dest='testurl', help='test this url for all remote proxies and exit') |
| 220 | + parser.add_argument('--test', help='test this url for all remote proxies and exit') |
221 | 221 | parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}') |
222 | 222 | args = parser.parse_args() |
223 | | - if args.testurl: |
224 | | - asyncio.run(test_url(args.testurl, args.rserver)) |
| 223 | + if args.test: |
| 224 | + asyncio.run(test_url(args.test, args.rserver)) |
225 | 225 | return |
226 | 226 | if not args.listen: |
227 | 227 | args.listen.append(ProxyURI.compile_relay('http+socks://:8080/')) |
@@ -251,7 +251,7 @@ def main(): |
251 | 251 | loop = asyncio.get_event_loop() |
252 | 252 | if args.v: |
253 | 253 | from pproxy import verbose |
254 | | - verbose.setup(loop, args) |
| 254 | + verbose.setup(loop, args, args.v) |
255 | 255 | servers = [] |
256 | 256 | for option in args.listen: |
257 | 257 | print('Serving on', option.bind, 'by', ",".join(i.name for i in option.protos) + ('(SSL)' if option.sslclient else ''), '({}{})'.format(option.cipher.name, ' '+','.join(i.name() for i in option.cipher.plugins) if option.cipher and option.cipher.plugins else '') if option.cipher else '') |
|
0 commit comments