From 9422ef2fd3f965bfb2655cdc916410fa6e5fe70d Mon Sep 17 00:00:00 2001 From: clowwindy Date: Wed, 11 Jun 2014 19:21:17 +0800 Subject: [PATCH] Fix table encryption with UDP --- CHANGES | 3 +++ shadowsocks/encrypt.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index dd4976b..f569c16 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2.0.3 2014-06-11 +- Fix table encryption with UDP + 2.0.2 2014-06-11 - Add asynchronous DNS in TCP relay diff --git a/shadowsocks/encrypt.py b/shadowsocks/encrypt.py index 9d94dd1..fc6b5ce 100644 --- a/shadowsocks/encrypt.py +++ b/shadowsocks/encrypt.py @@ -201,9 +201,9 @@ def encrypt_all(password, method, op, data): if not method: [encrypt_table, decrypt_table] = init_table(password) if op: - return string.translate(encrypt_table, data) + return string.translate(data, encrypt_table) else: - return string.translate(decrypt_table, data) + return string.translate(data, decrypt_table) else: import M2Crypto.EVP result = []