commit 5646f506d068c03e2db30a2ea836d4b3c44b6a34 Author: David Fifield david@bamsoftware.com Date: Wed Oct 9 23:38:46 2013 -0700
Alphabetize options and make options structs match. --- doc/flashproxy-client.1.txt | 20 ++++++++++---------- flashproxy-client | 24 ++++++++++++------------ flashproxy-reg-appspot | 2 +- flashproxy-reg-email | 9 +++++---- flashproxy-reg-http | 3 ++- 5 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/doc/flashproxy-client.1.txt b/doc/flashproxy-client.1.txt index 786fa99..6c41fbc 100644 --- a/doc/flashproxy-client.1.txt +++ b/doc/flashproxy-client.1.txt @@ -69,16 +69,6 @@ OPTIONS **--pidfile** __FILENAME__:: Write PID to __FILENAME__ after daemonizing.
-**-r**, **--register**:: - Register with the facilitator. - -**--register-addr**=__ADDR__:: - Register the given address (in case it differs from REMOTE). Implies --register. - -**--register-methods**=__METHOD__[,__METHOD__]:: - Register using the given comma-separated list of methods. Implies --register. - Possible methods are: appspot, email, http. Default is "appspot,email,http". - **--port-forwarding**:: Attempt to forward __REMOTE__ port.
@@ -90,6 +80,16 @@ OPTIONS Forward the external __PORT__ to __REMOTE__ on the local host (default same as REMOTE). Implies --port-forwarding.
+**-r**, **--register**:: + Register with the facilitator. + +**--register-addr**=__ADDR__:: + Register the given address (in case it differs from REMOTE). Implies --register. + +**--register-methods**=__METHOD__[,__METHOD__]:: + Register using the given comma-separated list of methods. Implies --register. + Possible methods are: appspot, email, http. Default is "appspot,email,http". + **--unsafe-logging**:: Don't scrub IP addresses from logs.
diff --git a/flashproxy-client b/flashproxy-client index cf16437..08dff54 100755 --- a/flashproxy-client +++ b/flashproxy-client @@ -49,22 +49,22 @@ class options(object): local_addrs = [] remote_addrs = [] register_addr = None - facilitator_url = None - facilitator_pubkey_filename = None
managed = True
+ address_family = socket.AF_UNSPEC + daemonize = False + facilitator_url = None + facilitator_pubkey_filename = None log_filename = None log_file = sys.stdout - daemonize = False - register = False - register_commands = [] pid_filename = None port_forwarding = False port_forwarding_helper = DEFAULT_PORT_FORWARDING_HELPER port_forwarding_external = None + register = False + register_commands = [] safe_logging = True - address_family = socket.AF_UNSPEC
# We accept up to this many bytes from a socket not yet matched with a partner # before disconnecting it. @@ -108,6 +108,12 @@ omitted, it uses a public default. -h, --help show this help. -l, --log FILENAME write log to FILENAME (default stdout). --pidfile FILENAME write PID to FILENAME after daemonizing. + --port-forwarding attempt to forward REMOTE port. + --port-forwarding-helper=PROGRAM use the given PROGRAM to forward ports + (default "%(port_forwarding_helper)s"). Implies --port-forwarding. + --port-forwarding-external=PORT forward the external PORT to REMOTE on + the local host (default same as REMOTE). Implies + --port-forwarding. -r, --register register with the facilitator. --register-addr=ADDR register the given address (in case it differs from REMOTE). Implies --register. @@ -116,12 +122,6 @@ omitted, it uses a public default. methods. Implies --register. Possible methods are appspot email http Default is "%(reg_methods)s". - --port-forwarding attempt to forward REMOTE port. - --port-forwarding-helper=PROGRAM use the given PROGRAM to forward ports - (default "%(port_forwarding_helper)s"). Implies --port-forwarding. - --port-forwarding-external=PORT forward the external PORT to REMOTE on - the local host (default same as REMOTE). Implies - --port-forwarding. --unsafe-logging don't scrub IP addresses from logs.\ """ % { "progname": sys.argv[0], diff --git a/flashproxy-reg-appspot b/flashproxy-reg-appspot index c84f9e7..bcdab6b 100755 --- a/flashproxy-reg-appspot +++ b/flashproxy-reg-appspot @@ -73,8 +73,8 @@ PUBKEY_SHA1 = (
class options(object): address_family = socket.AF_UNSPEC - facilitator_pubkey_filename = None use_certificate_pin = True + facilitator_pubkey_filename = None safe_logging = True
def usage(f = sys.stdout): diff --git a/flashproxy-reg-email b/flashproxy-reg-email index 3cb3c1e..ab39390 100755 --- a/flashproxy-reg-email +++ b/flashproxy-reg-email @@ -86,12 +86,13 @@ gwIDAQAB
class options(object): remote_addr = None - email_addr = None - smtp_addr = None - debug = False + address_family = socket.AF_UNSPEC - facilitator_pubkey_filename = None + debug = False use_certificate_pin = True + email_addr = None + facilitator_pubkey_filename = None + smtp_addr = None safe_logging = True
def usage(f = sys.stdout): diff --git a/flashproxy-reg-http b/flashproxy-reg-http index 2a0c405..8d6a700 100755 --- a/flashproxy-reg-http +++ b/flashproxy-reg-http @@ -14,8 +14,9 @@ DEFAULT_FACILITATOR_URL = "https://fp-facilitator.org/"
class options(object): remote_addr = None - facilitator_url = None + address_family = socket.AF_UNSPEC + facilitator_url = None safe_logging = True
def usage(f = sys.stdout):
tor-commits@lists.torproject.org