From 25e9c131d4aecf19528e0e8dba4beb3df307ce74 Mon Sep 17 00:00:00 2001 From: BreakWa11 Date: Fri, 29 Jul 2016 21:38:05 +0800 Subject: [PATCH] change err return --- shadowsocks/obfsplugin/http_simple.py | 6 +++--- shadowsocks/obfsplugin/obfs_tls.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/shadowsocks/obfsplugin/http_simple.py b/shadowsocks/obfsplugin/http_simple.py index 6783a32..6937213 100644 --- a/shadowsocks/obfsplugin/http_simple.py +++ b/shadowsocks/obfsplugin/http_simple.py @@ -145,7 +145,7 @@ class http_simple(plain.plain): self.has_sent_header = True self.has_recv_header = True if self.method == 'http_simple': - return (b'E', False, False) + return (b'E'*64, False, False) return (buf, True, False) def server_decode(self, buf): @@ -212,7 +212,7 @@ class http_post(http_simple): self.has_sent_header = True self.has_recv_header = True if self.method == 'http_post': - return (b'E', False, False) + return (b'E'*64, False, False) return (buf, True, False) def server_decode(self, buf): @@ -292,7 +292,7 @@ class random_head(plain.plain): if crc != 0xffffffff: self.has_sent_header = True if self.method == 'random_head': - return (b'E', False, False) + return (b'E'*64, False, False) return (buf, True, False) # (buffer_to_recv, is_need_decrypt, is_need_to_encode_and_send_back) return (b'', False, True) diff --git a/shadowsocks/obfsplugin/obfs_tls.py b/shadowsocks/obfsplugin/obfs_tls.py index 529444e..e217d12 100644 --- a/shadowsocks/obfsplugin/obfs_tls.py +++ b/shadowsocks/obfsplugin/obfs_tls.py @@ -104,7 +104,7 @@ class tls_simple(plain.plain): def decode_error_return(self, buf): self.has_sent_header = True if self.method == 'tls_simple': - return (b'E', False, False) + return (b'E'*64, False, False) return (buf, True, False) def server_decode(self, buf): @@ -205,7 +205,7 @@ class tls_auth(plain.plain): self.raw_trans_sent = True self.raw_trans_recv = True if self.method == 'tls1.0_session_auth': - return (b'E', False, False) + return (b'E'*64, False, False) return (buf, True, False) def server_decode(self, buf): @@ -384,7 +384,7 @@ class tls_ticket_auth(plain.plain): def decode_error_return(self, buf): self.handshake_status = -1 if self.method == 'tls1.2_session_auth': - return (b'E', False, False) + return (b'E'*64, False, False) return (buf, True, False) def server_decode(self, buf):