-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
37 lines (32 loc) · 889 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
language: go
go:
- 1.8.x
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
- 1.15.x
- tip
before_install:
- export DEBIAN_FRONTEND=noninteractive
- sudo apt-get update
- sudo apt-get install -y curl tor
- sleep 5 # Allow Tor to establish network connection
install:
- cd $GOPATH/src/github.com/leonklingele/sockstun
- cd cmd/sockstun
- go install -v .
- make config
before_script:
- sed -i 's/9125/9050/' $HOME/.sockstun/config.toml
- DOMAIN="travis-ci.org"
- echo "127.0.0.1 $DOMAIN" | sudo tee -a /etc/hosts
- echo -e "[rules.www-travis]\nlocal = \"localhost:8443\"\nremote = \"$DOMAIN:443\"" >> $HOME/.sockstun/config.toml
script:
- sockstun &
- DOMAIN="travis-ci.org"
- HEADERS="$(curl -I -s https://$DOMAIN:8443/)"
- STATUS="$(echo $HEADERS | head -n1)"
- if [[ "$STATUS" != *"200 OK"* ]]; then echo "$HEADERS"; exit 1; fi