File tree 3 files changed +43
-1
lines changed 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ if [ -f /proc/sys/net/ipv4/tcp_fastopen ] ; then
53
53
fi
54
54
fi
55
55
56
+ run_test tests/test_large_file.sh
57
+
56
58
coverage combine && coverage report --include=shadowsocks/*
57
59
rm -rf htmlcov
58
60
rm -rf tmp
Original file line number Diff line number Diff line change 9
9
- dante-1.4.0
10
10
before_install :
11
11
- sudo apt-get update -qq
12
- - sudo apt-get install -qq build-essential libssl-dev swig python-m2crypto python-numpy dnsutils
12
+ - sudo apt-get install -qq build-essential libssl-dev swig python-m2crypto python-numpy dnsutils iproute nginx
13
+ - sudo dd if=/dev/urandom of=/usr/share/nginx/www/file bs=1M count=10
14
+ - sudo service nginx restart
13
15
- pip install m2crypto salsa20 pep8 pyflakes nose coverage
14
16
- sudo tests/socksify/install.sh
15
17
- sudo tests/libsodium/install.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ DEV=lo
4
+ PORT=8388
5
+ DELAY=100ms
6
+
7
+ PYTHON=" coverage run -p -a"
8
+ URL=http://127.0.0.1/file
9
+
10
+ mkdir -p tmp
11
+
12
+ type tc > /dev/null && (
13
+ tc qdisc add dev $DEV root handle 1: prio
14
+ tc qdisc add dev $DEV parent 1:3 handle 30: netem delay $DELAY
15
+ tc filter add dev $DEV parent 1:0 protocol ip u32 match ip dport $PORT 0xffff flowid 1:3
16
+ tc filter add dev $DEV parent 1:0 protocol ip u32 match ip sport $PORT 0xffff flowid 1:3
17
+ tc qdisc show dev lo
18
+ )
19
+
20
+ $PYTHON shadowsocks/local.py -c tests/aes.json &
21
+ LOCAL=$!
22
+
23
+ $PYTHON shadowsocks/server.py -c tests/aes.json &
24
+ SERVER=$!
25
+
26
+ sleep 3
27
+
28
+ curl -o tmp/expected $URL
29
+ curl -o tmp/result --socks5-hostname 127.0.0.1:1081 $URL
30
+
31
+ kill $LOCAL
32
+ kill $SERVER
33
+
34
+ type tc > /dev/null && tc qdisc del dev lo root
35
+
36
+ sleep 2
37
+
38
+ diff tmp/expected tmp/result || exit 1
You can’t perform that action at this time.
0 commit comments