File tree Expand file tree Collapse file tree
.github/actions/setup-warp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,9 +4,21 @@ author: 'ipspot@openscilab.com'
44
55inputs :
66 mode :
7- description : ' Choose WARP mode: client or wireguard'
7+ description : Choose WARP mode: client or wireguard
8+ required : false
9+ default : client
10+
11+ wg_private_key :
12+ description : WireGuard private key
13+ required : false
14+
15+ wg_peer_public_key :
16+ description : WireGuard peer public key
17+ required : false
18+
19+ wg_endpoint :
20+ description : WireGuard endpoint IP and port
821 required : false
9- default : ' client'
1022
1123runs :
1224 using : " composite"
4860 sudo apt-get -y install --no-install-recommends net-tools iproute2 openresolv dnsutils iptables wireguard-tools
4961 LAN=$(ip route get 192.168.193.10 | grep -oP 'src \K\S+')
5062 echo "[Interface]
51- PrivateKey = ${{ secrets.WARP_WG_PRIVATE_KEY }}
63+ PrivateKey = ${{ inputs.wg_private_key }}
5264 Address = 172.16.0.2/32
5365 Address = fd01:5ca1:ab1e:823e:e094:eb1c:ff87:1fab/128
5466 PostUp = ip -4 rule add from $LAN lookup main
@@ -57,10 +69,10 @@ runs:
5769 MTU = 1280
5870
5971 [Peer]
60- PublicKey = ${{ secrets.WARP_WG_PEER_PUBLIC_KEY }}
72+ PublicKey = ${{ inputs.wg_peer_public_key }}
6173 AllowedIPs = 0.0.0.0/0
6274 AllowedIPs = ::/0
63- Endpoint = ${{ secrets.WARP_WG_ENDPOINT }}" | sed "s/^[ ]\+//g" | sudo tee /etc/wireguard/warp.conf
75+ Endpoint = ${{ inputs.wg_endpoint }}" | sed "s/^[ ]\+//g" | sudo tee /etc/wireguard/warp.conf
6476 sudo wg-quick up warp
6577
6678 else
You can’t perform that action at this time.
0 commit comments