[tor-commits] [flashproxy/master] fix flashproxy-client registration
infinity0 at torproject.org
infinity0 at torproject.org
Mon Jul 7 08:55:34 UTC 2014
commit e6b07f1d84fd5735a9ba3afae96ff8626e7cd9a2
Author: Ximin Luo <infinity0 at torproject.org>
Date: Thu Feb 13 16:43:17 2014 +0000
fix flashproxy-client registration
- this ought to have been grouped together with c323a11f "migrate flashproxy-client to argparse" but it had already been reviewed, so I kept this extra commit
---
flashproxy-client | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/flashproxy-client b/flashproxy-client
index af20dcf..9e198a4 100755
--- a/flashproxy-client
+++ b/flashproxy-client
@@ -54,10 +54,7 @@ class options(object):
managed = True
- address_family = socket.AF_UNSPEC
daemonize = False
- facilitator_url = None
- facilitator_pubkey_filename = None
log_filename = None
log_file = sys.stdout
pid_filename = None
@@ -66,8 +63,13 @@ class options(object):
port_forwarding_external = None
register = False
register_commands = []
+
+ # registration options
+ address_family = socket.AF_UNSPEC
transport = DEFAULT_TRANSPORT
safe_logging = True
+ facilitator_url = None
+ facilitator_pubkey_filename = None
def safe_str(s):
"""Return "[scrubbed]" if options.safe_logging is true, and s otherwise."""
@@ -1087,13 +1089,17 @@ If you need to pass more options, use TODO #9976.""")
% DEFAULT_REMOTE_PORT, default="", nargs="?")
ns = parser.parse_args(sys.argv[1:])
+ # set registration options
options.address_family = ns.address_family or socket.AF_UNSPEC
if options.address_family != socket.AF_UNSPEC:
getaddrinfo = socket.getaddrinfo
def getaddrinfo_replacement(host, port, family, *args, **kwargs):
return getaddrinfo(host, port, options.address_family, *args, **kwargs)
socket.getaddrinfo = getaddrinfo_replacement
+ options.transport = ns.transport
options.safe_logging = not ns.unsafe_logging
+ options.facilitator_url = ns.facilitator
+ options.facilitator_pubkey_filename = ns.facilitator_pubkey
options.managed = not ns.external
More information about the tor-commits
mailing list