Skip to content

Commit

Permalink
Use method "aes-256-cfb" in sample config.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyfdecyf committed Aug 2, 2013
1 parent bb0ce18 commit ac3abd3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"server_port":8388,
"local_port":1080,
"password":"barfoo!",
"method": "aes-256-cfb",
"timeout":600
}
2 changes: 1 addition & 1 deletion sample-config/client-multi-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"local_port":1081,
"server_password": [
["127.0.0.1:8387", "foobar"],
["127.0.0.1:8388", "barfoo", "rc4"]
["127.0.0.1:8388", "barfoo", "aes-256-cfb"]
]
}
1 change: 1 addition & 0 deletions sample-config/server-multi-port.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"8387": "foobar",
"8388": "barfoo"
},
"method": "aes-256-cfb",
"timeout": 600
}
11 changes: 7 additions & 4 deletions shadowsocks/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ import (
)

func TestConfigJson(t *testing.T) {
config, err := ParseConfig("testdata/config.json")
config, err := ParseConfig("../config.json")
if err != nil {
t.Fatal("error parsing config.json:", err)
}

if config.Password != "barfoo!" {
t.Error("wrong password from config")
}
if config.Timeout != 0 {
t.Error("tiemout should default to 0")
if config.Timeout != 600 {
t.Error("timeout should be 600")
}
if config.Method != "aes-256-cfb" {
t.Error("method should be aes-256-cfb")
}
srvArr := config.GetServerArray()
if len(srvArr) != 1 || srvArr[0] != "127.0.0.1" {
Expand Down Expand Up @@ -85,7 +88,7 @@ func TestClientMultiServerArray(t *testing.T) {
if sv[1] != "barfoo" {
t.Error("server_password 2nd server passwd wrong")
}
if sv[2] != "rc4" {
if sv[2] != "aes-256-cfb" {
t.Error("server_password 2nd server enc method wrong")
}
}
Expand Down
6 changes: 0 additions & 6 deletions shadowsocks/testdata/config.json

This file was deleted.

0 comments on commit ac3abd3

Please sign in to comment.