Skip to content

Commit 34fea4b

Browse files
committed
fix: Add keepalive.
1 parent 8cdbac2 commit 34fea4b

23 files changed

Lines changed: 304 additions & 9 deletions

.github/buildfarm/authorized_keys

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3qOXW5twS+gnni5Y4kCU3BBPjTShWsCTW5mQPRNA9GEYlDnBz3Wk0w4hfyI+NcUoSuOxxqrz6NGowfC/F4fYUe53R2/r1hWNuHloArbs9/8yROAaAlqhqmQDVsJxtbZdhh6sgwxcSe65OTYYhsZ8xzD34LBhuyLNaVEZy4WYUyjKjmh0YYSjiO6VFmzdvP3FSAqdFjG/pRs0igum9D8FJhl+FOrZ68fiFd70pyhl/yUsBntvtDbKJ73GKvSV58GytkLaxpDy4KLOVtnNYeqGFlFQ4eBrd+mXeyc2WvwYrn5V7HB2+Q2RTTvpEYazCjAolZ/E0wyqS2fSKFAGcKcDcoWordJ4VXwjiR9k28RPWSk9AcYJU1jI6v0KABOGTR7lNKmQr7fkD0KyZbYIB5EAcOsQHGCCDibFnxglIPFJt/YBZLLTm+ssTQ4ENkVrlS8dmC2drLMN3hsjBagoYD0e7hRARiv7/snREoNrQmKWz21Ft2Y37P7hWKOwQQ/NfZCs= iphy@code.tox.chat

.github/buildfarm/generate-wg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
echo '# Peers for the server' >wg0-1.conf
4+
5+
readarray -t NODES <<<"$(seq 2 9)"
6+
7+
for NODE in "${NODES[@]}"; do
8+
PRIVATE_KEY="$(wg genkey)"
9+
sed -e "s!@NODE@!$NODE!g;s!@PRIVATE_KEY@!$PRIVATE_KEY!g" wg0.conf.template >"wg0-$NODE.conf"
10+
sed -e "s!@NODE@!$NODE!g" worker.yml.template >"worker-$NODE.yml"
11+
echo >>wg0-1.conf
12+
echo '[Peer]' >>wg0-1.conf
13+
echo "PublicKey = $(echo "$PRIVATE_KEY" | wg pubkey)" >>wg0-1.conf
14+
echo "AllowedIPs = 10.100.0.$NODE/32" >>wg0-1.conf
15+
done

.github/buildfarm/server-2.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
backplane:
2+
redisUri: "redis://10.100.0.1:6379"
3+
queues:
4+
- name: "cpu"
5+
properties:
6+
- name: "min-cores"
7+
value: "*"
8+
- name: "max-cores"
9+
value: "*"
10+
server:
11+
publicName: "10.100.0.2:8980"
12+
prometheusPort: 7070

.github/buildfarm/wg0-1.conf

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Peers for the server
2+
3+
[Peer]
4+
PublicKey = 2UeU4A9G489ts7e0gXucEIXIU+IrtMCJnbnlONu+PlQ=
5+
AllowedIPs = 10.100.0.2/32
6+
7+
[Peer]
8+
PublicKey = RCPvqEb+R+pKmZVOqJTHiLHIsb1KKYRNENZ5gtciQAo=
9+
AllowedIPs = 10.100.0.3/32
10+
11+
[Peer]
12+
PublicKey = i2dITECpbIX3E7hAMIFTd0fce3uc15Zi4MzeggKF3zQ=
13+
AllowedIPs = 10.100.0.4/32
14+
15+
[Peer]
16+
PublicKey = pSpYbq1/gPPqf65nTHgL3/w1xhSOd8sjSV84zYiRCEQ=
17+
AllowedIPs = 10.100.0.5/32
18+
19+
[Peer]
20+
PublicKey = eLgqPRirKd5Z7Az1Xe9v5xV1AUq1JxB0jQXBwPOywCA=
21+
AllowedIPs = 10.100.0.6/32
22+
23+
[Peer]
24+
PublicKey = z3cUh059Lo9JVf3Ea8r8x88JThVdcnmco63Iz/1dZ1Y=
25+
AllowedIPs = 10.100.0.7/32
26+
27+
[Peer]
28+
PublicKey = UON0ft/NzF/0T5aWsZVqO45a4KKmP3pSUoXSkj4Y9kQ=
29+
AllowedIPs = 10.100.0.8/32
30+
31+
[Peer]
32+
PublicKey = 594I6K0nCuDEeV3XFubePmR6jT3HVkRIQu4sTrXNZRE=
33+
AllowedIPs = 10.100.0.9/32

.github/buildfarm/wg0-2.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Interface]
2+
PrivateKey = WE+bkC80LF5s5+BBZ5TtWMKyBXAiSEdgVRd8ytWvkU0=
3+
Address = 10.100.0.2/24
4+
5+
[Peer]
6+
PublicKey = Tb1SOeotVZa6FbEmRq1x4Wo62PxjrjLeHbRYp4kTH2A=
7+
Endpoint = code.tox.chat:51820
8+
AllowedIPs = 10.100.0.0/24
9+
PersistentKeepalive = 25

.github/buildfarm/wg0-3.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Interface]
2+
PrivateKey = mDRI1EKXXY8siirWEx+ifXV0zHM3s3yOeS6WBp2VfGE=
3+
Address = 10.100.0.3/24
4+
5+
[Peer]
6+
PublicKey = Tb1SOeotVZa6FbEmRq1x4Wo62PxjrjLeHbRYp4kTH2A=
7+
Endpoint = code.tox.chat:51820
8+
AllowedIPs = 10.100.0.0/24
9+
PersistentKeepalive = 25

.github/buildfarm/wg0-4.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Interface]
2+
PrivateKey = 4P1Ct0HsoLvSz5KXVe8Jt/mNkdvf26H0R51xMzDiFFs=
3+
Address = 10.100.0.4/24
4+
5+
[Peer]
6+
PublicKey = Tb1SOeotVZa6FbEmRq1x4Wo62PxjrjLeHbRYp4kTH2A=
7+
Endpoint = code.tox.chat:51820
8+
AllowedIPs = 10.100.0.0/24
9+
PersistentKeepalive = 25

.github/buildfarm/wg0-5.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Interface]
2+
PrivateKey = WN5cSY9S9Sh8jlLbR1BDlF/rcRQfRZIX5xIoXZRZJUg=
3+
Address = 10.100.0.5/24
4+
5+
[Peer]
6+
PublicKey = Tb1SOeotVZa6FbEmRq1x4Wo62PxjrjLeHbRYp4kTH2A=
7+
Endpoint = code.tox.chat:51820
8+
AllowedIPs = 10.100.0.0/24
9+
PersistentKeepalive = 25

.github/buildfarm/wg0-6.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Interface]
2+
PrivateKey = sPpPQmp3eZqWv0DyWkSDsJoz5Ofxp7eb2SIT8TZwt3Q=
3+
Address = 10.100.0.6/24
4+
5+
[Peer]
6+
PublicKey = Tb1SOeotVZa6FbEmRq1x4Wo62PxjrjLeHbRYp4kTH2A=
7+
Endpoint = code.tox.chat:51820
8+
AllowedIPs = 10.100.0.0/24
9+
PersistentKeepalive = 25

.github/buildfarm/wg0-7.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Interface]
2+
PrivateKey = CFyxB7DmHXM1VaF2v8SbLTyRH1eGrfGIPd74Rq3EQFc=
3+
Address = 10.100.0.7/24
4+
5+
[Peer]
6+
PublicKey = Tb1SOeotVZa6FbEmRq1x4Wo62PxjrjLeHbRYp4kTH2A=
7+
Endpoint = code.tox.chat:51820
8+
AllowedIPs = 10.100.0.0/24
9+
PersistentKeepalive = 25

0 commit comments

Comments
 (0)