2014-12-23 05:09:51 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
PYTHON="coverage run -p -a"
|
|
|
|
URL=http://127.0.0.1/file
|
|
|
|
|
|
|
|
mkdir -p tmp
|
|
|
|
|
|
|
|
$PYTHON shadowsocks/local.py -c tests/aes.json &
|
|
|
|
LOCAL=$!
|
|
|
|
|
|
|
|
$PYTHON shadowsocks/server.py -c tests/aes.json &
|
|
|
|
SERVER=$!
|
|
|
|
|
|
|
|
sleep 3
|
|
|
|
|
2014-12-23 05:18:30 +00:00
|
|
|
time curl -o tmp/expected $URL
|
|
|
|
time curl -o tmp/result --socks5-hostname 127.0.0.1:1081 $URL
|
2014-12-23 05:09:51 +00:00
|
|
|
|
2014-12-23 06:05:20 +00:00
|
|
|
kill -s SIGINT $LOCAL
|
|
|
|
kill -s SIGINT $SERVER
|
2014-12-23 05:09:51 +00:00
|
|
|
|
|
|
|
sleep 2
|
|
|
|
|
|
|
|
diff tmp/expected tmp/result || exit 1
|