fix "chr"
This commit is contained in:
parent
6576359c1c
commit
e76939981a
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue