File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed
Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test
2+ on :
3+ push :
4+ branches :
5+ - ' **'
6+ pull_request :
7+ branches :
8+ - ' **'
9+
10+ jobs :
11+ test :
12+ name : Test wireproxy
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Setting up Go
17+ uses : actions/setup-go@v2
18+ with :
19+ go-version : 1.19
20+ - name : Install dependencies
21+ run : sudo apt install wireguard curl
22+ - name : Building wireproxy
23+ run : |
24+ git tag dev
25+ make
26+ - name : Generate test config
27+ run : ./test_config.sh
28+ - name : Start wireproxy
29+ run : ./wireproxy -c test.conf & sleep 1
30+ - name : Test socks5
31+ run : curl --proxy socks5://localhost:64423 http://zx2c4.com/ip | grep -q "demo.wireguard.com"
32+
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -e
3+ exec 3<> /dev/tcp/demo.wireguard.com/42912
4+ privatekey=" $( wg genkey) "
5+ wg pubkey <<< " $privatekey" >&3
6+ IFS=: read -r status server_pubkey server_port internal_ip < & 3
7+ [[ $status == OK ]]
8+ cat > test.conf << EOL
9+ [Interface]
10+ Address = $internal_ip /32
11+ PrivateKey = $privatekey
12+ DNS = 8.8.8.8
13+
14+ [Peer]
15+ PublicKey = $server_pubkey
16+ Endpoint = demo.wireguard.com:$server_port
17+
18+ [Socks5]
19+ BindAddress = 127.0.0.1:64423
20+ EOL
You can’t perform that action at this time.
0 commit comments