From 63a6de5d26f5d44595187e551957b0f0957df65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Thu, 23 Mar 2017 13:16:58 +0800 Subject: [PATCH] fix host type in http_simple --- shadowsocks/obfsplugin/http_simple.py | 2 +- shadowsocks/server.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shadowsocks/obfsplugin/http_simple.py b/shadowsocks/obfsplugin/http_simple.py index 19e2a75..f84beea 100644 --- a/shadowsocks/obfsplugin/http_simple.py +++ b/shadowsocks/obfsplugin/http_simple.py @@ -159,7 +159,7 @@ class http_simple(plain.plain): if lines and len(lines) > 1: for line in lines: if match_begin(line, b"Host: "): - return line[6:] + return common.to_str(line[6:]) def not_match_return(self, buf): self.has_sent_header = True diff --git a/shadowsocks/server.py b/shadowsocks/server.py index d3ce95c..f4dfdd5 100755 --- a/shadowsocks/server.py +++ b/shadowsocks/server.py @@ -96,8 +96,8 @@ def main(): protocol_param = password_obfs.get('protocol_param', protocol_param) obfs = password_obfs.get('obfs', obfs) obfs_param = password_obfs.get('obfs_param', obfs_param) - bind = password_obfs.get('bind', bind) - bindv6 = password_obfs.get('bindv6', bindv6) + bind = password_obfs.get('out_bind', bind) + bindv6 = password_obfs.get('out_bindv6', bindv6) else: password = password_obfs a_config = config.copy()