From e76939981a379c20351048a115311db9e056a6e8 Mon Sep 17 00:00:00 2001 From: BreakWa11 Date: Mon, 28 Dec 2015 20:48:14 +0800 Subject: [PATCH] fix "chr" --- shadowsocks/obfsplugin/http_simple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shadowsocks/obfsplugin/http_simple.py b/shadowsocks/obfsplugin/http_simple.py index e4dcdbe..00a3dce 100644 --- a/shadowsocks/obfsplugin/http_simple.py +++ b/shadowsocks/obfsplugin/http_simple.py @@ -29,7 +29,7 @@ import random from shadowsocks import common 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): return http_simple(method) @@ -79,7 +79,7 @@ class http_simple(plain.plain): def encode_head(self, buf): ret = b'' for ch in buf: - ret += '%' + binascii.hexlify(ch) + ret += '%' + binascii.hexlify(chr(ch)) return ret def client_encode(self, buf):