First-order integration of configargparser to add config file support

This commit is contained in:
Aldo Cortesi
2014-11-15 16:14:08 +13:00
parent 645a4a0c04
commit 24c4df07e3
6 changed files with 165 additions and 71 deletions

View File

@@ -1,4 +1,4 @@
import argparse
import configargparse
import cPickle as pickle
from ctypes import byref, windll, Structure
from ctypes.wintypes import DWORD
@@ -361,7 +361,7 @@ class TransparentProxy(object):
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Windows Transparent Proxy")
parser = configargparse.ArgumentParser(description="Windows Transparent Proxy")
parser.add_argument('--mode', choices=['forward', 'local', 'both'], default="both",
help='redirection operation mode: "forward" to only redirect forwarded packets, '
'"local" to only redirect packets originating from the local machine')