[Pkg-privacy-commits] [obfsproxy] 264/353: Fix the last issues asn found

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:02:08 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 3264e76b3189e6bbbde607d423834914ae984c1e
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Tue Mar 11 03:38:05 2014 +0000

    Fix the last issues asn found
    
     * ACCEPTABLE_CMDS now only contains CONNECT, since that is the only command
       used and actually implemented.
     * Removed trailing whitespace from the socks5 tests.
---
 obfsproxy/network/socks.py    | 4 ----
 obfsproxy/network/socks5.py   | 2 --
 obfsproxy/test/test_socks5.py | 8 ++++----
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/obfsproxy/network/socks.py b/obfsproxy/network/socks.py
index 528c724..842e4a5 100644
--- a/obfsproxy/network/socks.py
+++ b/obfsproxy/network/socks.py
@@ -81,10 +81,6 @@ class OBFSSOCKSv5Protocol(socks5.SOCKSv5Protocol, network.GenericProtocol):
         network.GenericProtocol.__init__(self, circuit)
         socks5.SOCKSv5Protocol.__init__(self)
 
-        # Disable the unsupported commands
-        self.ACCEPTABLE_CMDS.remove(socks5._SOCKS_CMD_BIND)
-        self.ACCEPTABLE_CMDS.remove(socks5._SOCKS_CMD_UDP_ASSOCIATE)
-
     def connectionLost(self, reason):
         network.GenericProtocol.connectionLost(self, reason)
 
diff --git a/obfsproxy/network/socks5.py b/obfsproxy/network/socks5.py
index 1f821b8..a02759a 100644
--- a/obfsproxy/network/socks5.py
+++ b/obfsproxy/network/socks5.py
@@ -133,8 +133,6 @@ class SOCKSv5Protocol(protocol.Protocol):
     # Commands
     ACCEPTABLE_CMDS = [
         _SOCKS_CMD_CONNECT,
-        _SOCKS_CMD_BIND,
-        _SOCKS_CMD_UDP_ASSOCIATE
     ]
 
     def __init__(self, reactor=reactor):
diff --git a/obfsproxy/test/test_socks5.py b/obfsproxy/test/test_socks5.py
index 8c710c0..5dc3ca9 100644
--- a/obfsproxy/test/test_socks5.py
+++ b/obfsproxy/test/test_socks5.py
@@ -127,7 +127,7 @@ class SOCKSv5Protocol_testMethodSelect(unittest.TestCase):
 
         # VER = 05, NMETHODS = 01, METHODS = ['00'], Garbage= deadbabe
         self._sendMsg("050100deadbabe")
-       
+
         self.assertFalse(self.tr.connected)
 
 class SOCKSv5Protocol_testRfc1929Auth(unittest.TestCase):
@@ -343,7 +343,7 @@ class SOCKSv5Protocol_testRequest(unittest.TestCase):
         self._recvFailureResponse(socks5.SOCKSv5Reply.AddressTypeNotSupported)
         self.assertFalse(self.tr.connected)
 
-    def test_CmdBind(self): 
+    def test_CmdBind(self):
         """
         Test Request with a BIND CMD.
         """
@@ -354,7 +354,7 @@ class SOCKSv5Protocol_testRequest(unittest.TestCase):
         self._recvFailureResponse(socks5.SOCKSv5Reply.CommandNotSupported)
         self.assertFalse(self.tr.connected)
 
-    def test_CmdUdpAssociate(self): 
+    def test_CmdUdpAssociate(self):
         """
         Test Request with a UDP ASSOCIATE CMD.
         """
@@ -407,7 +407,7 @@ class SOCKSv5Protocol_testRequest(unittest.TestCase):
         # VER = 05, CMD = 01, RSV = 00, ATYPE = 04, DST.ADDR = example.com, DST.PORT = 9050
         self._sendMsg("050100030b6578616d706c652e636f6d235a")
         self.connectDeferred.callback(self)
-        
+
         # VER = 05, REP = 00, RSV = 00, ATYPE = 01, BND.ADDR = 127.0.0.1, BND.PORT = 9050
         self._recvMsg("050000017f000001235a")
         self.assertEqual(self.proto.state, self.proto.ST_ESTABLISHED)

-- 
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