Skip to content
This repository was archived by the owner on Apr 9, 2020. It is now read-only.

Commit 733f2a3

Browse files
committed
Merge branch 'develop', version 1.1.2
2 parents c33324b + fb3fcfa commit 733f2a3

File tree

20 files changed

+235
-117
lines changed

20 files changed

+235
-117
lines changed

.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
language: go
22
go:
3-
- 1.1
3+
- 1.3
44
install:
5-
- go get github.com/cyfdecyf/leakybuf
65
- go get code.google.com/p/go.crypto/blowfish
76
- go get code.google.com/p/go.crypto/cast5
8-
- pushd $TRAVIS_BUILD_DIR
97
- go install ./cmd/shadowsocks-local
108
- go install ./cmd/shadowsocks-server
11-
- popd
129
script:
13-
- pushd $TRAVIS_BUILD_DIR
1410
- PATH=$PATH:$HOME/gopath/bin bash -x ./script/test.sh
15-
- popd

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.1.2 (2014-09-21)
2+
* Support new encryption method "rc4-md5"
3+
* Use aes-256-cfb as default encryption method for command line app
4+
15
1.1.1 (2013-07-12)
26
* Add -b option to limit listen address for client
37
* Fix can't override server address on command line

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# shadowsocks-go
22

3-
Current version: 1.1.1 [![Build Status](https://travis-ci.org/shadowsocks/shadowsocks-go.png?branch=master)](https://travis-ci.org/shadowsocks/shadowsocks-go)
3+
Current version: 1.1.2 [![Build Status](https://travis-ci.org/shadowsocks/shadowsocks-go.png?branch=master)](https://travis-ci.org/shadowsocks/shadowsocks-go)
44

55
shadowsocks-go is a lightweight tunnel proxy which can help you get through firewalls. It is a port of [shadowsocks](https://github.com/clowwindy/shadowsocks).
66

@@ -23,7 +23,7 @@ go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-server
2323
go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-local
2424
```
2525

26-
It's recommend to disable cgo when compiling shadowsocks-go. This will prevent the go runtime from creating too many threads for dns lookup.
26+
It's recommended to disable cgo when compiling shadowsocks-go. This will prevent the go runtime from creating too many threads for dns lookup.
2727

2828
# Usage
2929

@@ -35,8 +35,8 @@ Configuration file is in json format and has the same syntax with [shadowsocks-n
3535
server your server ip or hostname
3636
server_port server port
3737
local_port local socks5 proxy port
38-
method encryption method, null by default, the following methods are supported:
39-
aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, cast5-cfb, des-cfb, rc4
38+
method encryption method, null by default (table), the following methods are supported:
39+
aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, cast5-cfb, des-cfb, rc4-md5, rc4, table
4040
password a password used to encrypt transfer
4141
timeout server option, in seconds
4242
```
@@ -51,20 +51,20 @@ SOCKS5 127.0.0.1:local_port
5151

5252
## About encryption methods
5353

54-
AES is recommended for shadowsocks-go. ([Intel AES Instruction Set](http://en.wikipedia.org/wiki/AES_instruction_set) will be used if available and can make encryption/decryption fast.)
54+
AES is recommended for shadowsocks-go. [Intel AES Instruction Set](http://en.wikipedia.org/wiki/AES_instruction_set) will be used if available and can make encryption/decryption very fast. To be more specific, **`aes-128-cfb` is recommended as it is faster and [secure enough](https://www.schneier.com/blog/archives/2009/07/another_new_aes.html)**.
5555

56-
**rc4 and table encryption methods are deprecated because they are not secure**.
56+
**rc4 and table encryption methods are deprecated because they are not secure.**
5757

5858
## Command line options
5959

6060
Command line options can override settings from configuration files. Use `-h` option to see all available options.
6161

6262
```
6363
shadowsocks-local -s server_address -p server_port -k password
64-
-m rc4 -c config.json
64+
-m aes-128-cfb -c config.json
6565
-b local_address -l local_port
6666
shadowsocks-server -p server_port -k password
67-
-m rc4 -c config.json
67+
-m aes-128-cfb -c config.json
6868
-t timeout
6969
```
7070

cmd/shadowsocks-local/local.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ func main() {
355355
flag.StringVar(&cmdConfig.Password, "k", "", "password")
356356
flag.IntVar(&cmdConfig.ServerPort, "p", 0, "server port")
357357
flag.IntVar(&cmdConfig.LocalPort, "l", 0, "local socks5 proxy port")
358-
flag.StringVar(&cmdConfig.Method, "m", "", "encryption method, use empty string or rc4")
358+
flag.StringVar(&cmdConfig.Method, "m", "aes-256-cfb", "encryption method")
359359
flag.BoolVar((*bool)(&debug), "d", false, "print debug message")
360360

361361
flag.Parse()

cmd/shadowsocks-server/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func getRequest(conn *ss.Conn) (host string, extra []byte, err error) {
5757
case typeDm:
5858
reqLen = int(buf[idDmLen]) + lenDmBase
5959
default:
60-
err = errors.New(fmt.Sprintf("addr type %d not supported", buf[idType]))
60+
err = fmt.Errorf("addr type %d not supported", buf[idType])
6161
return
6262
}
6363

@@ -322,7 +322,7 @@ func main() {
322322
flag.StringVar(&cmdConfig.Password, "k", "", "password")
323323
flag.IntVar(&cmdConfig.ServerPort, "p", 0, "server port")
324324
flag.IntVar(&cmdConfig.Timeout, "t", 60, "connection timeout (in seconds)")
325-
flag.StringVar(&cmdConfig.Method, "m", "", "encryption method, use empty string or rc4")
325+
flag.StringVar(&cmdConfig.Method, "m", "aes-256-cfb", "encryption method")
326326
flag.IntVar(&core, "core", 0, "maximum number of CPU cores to use, default is determinied by Go runtime")
327327
flag.BoolVar((*bool)(&debug), "d", false, "print debug message")
328328

config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"server_port":8388,
44
"local_port":1080,
55
"password":"barfoo!",
6+
"method": "aes-128-cfb",
67
"timeout":600
78
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"local_port":1081,
2+
"local_port": 1081,
33
"server_password": [
44
["127.0.0.1:8387", "foobar"],
5-
["127.0.0.1:8388", "barfoo", "rc4"]
5+
["127.0.0.1:8388", "barfoo", "aes-128-cfb"]
66
]
77
}

sample-config/server-multi-port.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"8387": "foobar",
44
"8388": "barfoo"
55
},
6-
"timeout": 600,
6+
"method": "aes-128-cfb",
7+
"timeout": 600
78
}

script/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ build windows 386 win32 local
5151

5252
build linux amd64 linux64 server
5353
build linux 386 linux32 server
54-
#build darwin amd64 mac64 server
54+
build darwin amd64 mac64 server
5555
build windows amd64 win64 server
5656
build windows 386 win32 server
5757

58-
script/createdeb.sh amd64
59-
script/createdeb.sh 386
60-
mv shadowsocks-go_$version-1-*.deb bin/
61-
rm -rf shadowsocks-go_$version-1*
58+
#script/createdeb.sh amd64
59+
#script/createdeb.sh i386
60+
#mv shadowsocks-go_$version-1-*.deb bin/
61+
#rm -rf shadowsocks-go_$version-1*

script/createdeb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export GOOS=linux
1313

1414
arch=$1
1515
case $arch in
16-
386)
16+
i386)
1717
export GOARCH=386
1818
;;
1919
amd64)

0 commit comments

Comments
 (0)