Browse Source

fix host type in http_simple

dev
破娃酱 8 years ago
parent
commit
63a6de5d26
  1. 2
      shadowsocks/obfsplugin/http_simple.py
  2. 4
      shadowsocks/server.py

2
shadowsocks/obfsplugin/http_simple.py

@ -159,7 +159,7 @@ class http_simple(plain.plain):
if lines and len(lines) > 1: if lines and len(lines) > 1:
for line in lines: for line in lines:
if match_begin(line, b"Host: "): if match_begin(line, b"Host: "):
return line[6:] return common.to_str(line[6:])
def not_match_return(self, buf): def not_match_return(self, buf):
self.has_sent_header = True self.has_sent_header = True

4
shadowsocks/server.py

@ -96,8 +96,8 @@ def main():
protocol_param = password_obfs.get('protocol_param', protocol_param) protocol_param = password_obfs.get('protocol_param', protocol_param)
obfs = password_obfs.get('obfs', obfs) obfs = password_obfs.get('obfs', obfs)
obfs_param = password_obfs.get('obfs_param', obfs_param) obfs_param = password_obfs.get('obfs_param', obfs_param)
bind = password_obfs.get('bind', bind) bind = password_obfs.get('out_bind', bind)
bindv6 = password_obfs.get('bindv6', bindv6) bindv6 = password_obfs.get('out_bindv6', bindv6)
else: else:
password = password_obfs password = password_obfs
a_config = config.copy() a_config = config.copy()

Loading…
Cancel
Save