[Pkg-privacy-commits] [obfsproxy] 210/353: Clean up code to filter server transport options

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:02:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository obfsproxy.

commit 84071a274cf74c85540fd7dceb0c783c6ef7ac7b
Author: David Stainton <dstainton415 at gmail.com>
Date:   Wed Nov 27 15:14:27 2013 -0800

    Clean up code to filter server transport options
---
 obfsproxy/managed/server.py | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/obfsproxy/managed/server.py b/obfsproxy/managed/server.py
index 31f05fe..6dad098 100644
--- a/obfsproxy/managed/server.py
+++ b/obfsproxy/managed/server.py
@@ -81,18 +81,22 @@ def do_managed_server():
 
         # Potentially filter the transport options
         # with the transport's get_public_options() method
-        filtered_options = transport_class.get_public_options(transport_options)
-        optlist          = []
-        for k, v in filtered_options.items():
-            optlist.append("%s=%s" % (k,v))
-        public_options   = ",".join(optlist)
+        public_options_dict = transport_class.get_public_options(transport_options)
+        public_options_str  = None
 
-        log.debug("\n\ndo_managed_server: public_options: %s\n\n" % public_options)
+        # if we have filter
+        if public_options_dict is not None:
+            optlist            = []
+            for k, v in public_options_dict.items():
+                optlist.append("%s=%s" % (k,v))
+            public_options_str = ",".join(optlist)
+
+            log.debug("do_managed_server: sending only public_options to tor: %s" % public_options_str)
 
         # Report success for this transport.
-        # If public_options is None then all of the
+        # If public_options_str is None then all of the
         # transport options from ptserver are used instead.
-        ptserver.reportMethodSuccess(transport, addrport, public_options)
+        ptserver.reportMethodSuccess(transport, addrport, public_options_str)
 
     ptserver.reportMethodsEnd()
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfsproxy.git



More information about the Pkg-privacy-commits mailing list