-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
155 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
table.cache | ||
*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: go | ||
install: | ||
- mkdir -p $GOPATH/src/github.com/shadowsocks/shadowsocks-go/shadowsocks | ||
- mv * $GOPATH/src/github.com/shadowsocks/shadowsocks-go | ||
- pushd $GOPATH/src/github.com/shadowsocks/shadowsocks-go | ||
- go install ./cmd/shadowsocks-local | ||
- go install ./cmd/shadowsocks-server | ||
- popd | ||
script: | ||
- pushd $GOPATH/src/github.com/shadowsocks/shadowsocks-go | ||
- PATH=$PATH:$GOPATH/bin/ bash -x ./testscript/test.sh | ||
- popd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
# Use shadowsocks as command prefix to avoid name conflict | ||
# Maybe ss-local/server is better because easier to type | ||
PREFIX := shadowsocks | ||
LOCAL := $(GOBIN)/$(PREFIX)-local | ||
SERVER := $(GOBIN)/$(PREFIX)-server | ||
|
||
# TODO define the install package path for use in clean and detect whether | ||
# package need re-build | ||
LOCAL := $(GOPATH)/bin/$(PREFIX)-local | ||
SERVER := $(GOPATH)/bin/$(PREFIX)-server | ||
CGO := CGO_ENABLED=0 | ||
|
||
all: $(LOCAL) $(SERVER) $(TEST) | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
rm -rf $(LOCAL) $(SERVER) $(TEST) | ||
rm -f $(LOCAL) $(SERVER) $(TEST) | ||
|
||
# -a option is needed to ensure we disabled CGO | ||
$(LOCAL): shadowsocks/*.go cmd/$(PREFIX)-local/*.go | ||
cd shadowsocks; go install | ||
cd cmd/$(PREFIX)-local; go install | ||
cd cmd/$(PREFIX)-local; $(CGO) go install -a | ||
|
||
$(SERVER): shadowsocks/*.go cmd/$(PREFIX)-server/*.go | ||
cd shadowsocks; go install | ||
cd cmd/$(PREFIX)-server; go install | ||
cd cmd/$(PREFIX)-server; $(CGO) go install -a | ||
|
||
local: $(LOCAL) | ||
|
||
server: $(SERVER) | ||
|
||
test: | ||
cd shadowsocks; go test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
Add test script to test both server and client. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
"server_port":8388, | ||
"local_port":1080, | ||
"password":"barfoo!", | ||
"timeout":60 | ||
"timeout":0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
if [[ $# != 1 ]]; then | ||
echo "$0 <arch, i386 or amd64>" | ||
exit 1 | ||
fi | ||
|
||
export CGO_ENABLED=0 | ||
export GOOS=linux | ||
|
||
arch=$1 | ||
case $arch in | ||
i386) | ||
export GOARCH=386 | ||
;; | ||
amd64) | ||
export GOARCH=amd64 | ||
;; | ||
*) | ||
echo "arch $i not supported" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# build shadowsocks server | ||
pushd cmd/shadowsocks-server | ||
go build -a -v || exit 1 | ||
popd | ||
|
||
# create debian package | ||
DEBDIR=shadowsocks-go_0.6-1-$arch | ||
rm -rf $DEBDIR | ||
cp -r deb $DEBDIR | ||
|
||
sed -i -e "s/^Architecture.*$/Architecture: $arch/" $DEBDIR/DEBIAN/control || exit 1 | ||
|
||
mkdir -p $DEBDIR/usr/bin | ||
cp cmd/shadowsocks-server/shadowsocks-server $DEBDIR/usr/bin/shadowsocks | ||
|
||
fakeroot dpkg-deb --build $DEBDIR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: shadowsocks-go | ||
Version: 0.6-1 | ||
Section: net | ||
Priority: optional | ||
Architecture: any | ||
Depends: | ||
Maintainer: CYF <[email protected]> | ||
Description: shadowsocks-go is the go port of shadowsocks, a light weight tunneling proxy | ||
This package contains only the server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"server":"127.0.0.1", | ||
"server_port":8388, | ||
"local_port":1080, | ||
"password":"barfoo!", | ||
"timeout":0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters