Browse Source

fix "chr"

dev
BreakWa11 9 years ago
parent
commit
e76939981a
  1. 4
      shadowsocks/obfsplugin/http_simple.py

4
shadowsocks/obfsplugin/http_simple.py

@ -29,7 +29,7 @@ import random
from shadowsocks import common from shadowsocks import common
from shadowsocks.obfsplugin import plain from shadowsocks.obfsplugin import plain
from shadowsocks.common import to_bytes, to_str, ord from shadowsocks.common import to_bytes, to_str, ord, chr
def create_http_obfs(method): def create_http_obfs(method):
return http_simple(method) return http_simple(method)
@ -79,7 +79,7 @@ class http_simple(plain.plain):
def encode_head(self, buf): def encode_head(self, buf):
ret = b'' ret = b''
for ch in buf: for ch in buf:
ret += '%' + binascii.hexlify(ch) ret += '%' + binascii.hexlify(chr(ch))
return ret return ret
def client_encode(self, buf): def client_encode(self, buf):

Loading…
Cancel
Save