refactor encrypt; add cfb1 and cfb8 modes
This commit is contained in:
parent
a2ed12611c
commit
76fed23b34
11 changed files with 245 additions and 53 deletions
10
tests/aes-cfb1.json
Normal file
10
tests/aes-cfb1.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"server":"127.0.0.1",
|
||||
"server_port":8388,
|
||||
"local_port":1081,
|
||||
"password":"aes_password",
|
||||
"timeout":60,
|
||||
"method":"aes-256-cfb1",
|
||||
"local_address":"127.0.0.1",
|
||||
"fast_open":false
|
||||
}
|
10
tests/aes-cfb8.json
Normal file
10
tests/aes-cfb8.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"server":"127.0.0.1",
|
||||
"server_port":8388,
|
||||
"local_port":1081,
|
||||
"password":"aes_password",
|
||||
"timeout":60,
|
||||
"method":"aes-256-cfb8",
|
||||
"local_address":"127.0.0.1",
|
||||
"fast_open":false
|
||||
}
|
|
@ -11,8 +11,8 @@ from subprocess import Popen, PIPE
|
|||
sys.path.insert(0, './')
|
||||
|
||||
if 'salsa20' in sys.argv[-1]:
|
||||
from shadowsocks import encrypt_salsa20
|
||||
encrypt_salsa20.test()
|
||||
from shadowsocks.crypto import salsa20_ctr
|
||||
salsa20_ctr.test()
|
||||
print 'encryption test passed'
|
||||
|
||||
p1 = Popen(['python', 'shadowsocks/server.py', '-c', sys.argv[-1]], stdin=PIPE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue