Skip to content

Commit

Permalink
fix: scripts issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ParzivalEugene committed Jul 30, 2024
1 parent e22319c commit b035865
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion scripts/server_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ wg genkey | tee /etc/wireguard/privatekey | wg pubkey | tee /etc/wireguard/publi
chmod 600 /etc/wireguard/privatekey
echo "[Interface]
PrivateKey = $(cat /etc/wireguard/privatekey)
Address = $WIREGUARD_ADDRESS
Address = $WIREGUARD_ADDRESS/24
ListenPort = $WIREGUARD_PORT
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
Expand All @@ -20,6 +20,8 @@ systemctl start wg-quick@wg0.service
systemctl status wg-quick@wg0.service

# Download Binary
OWNER="HeliosShieldProject"
REPO="agent-wireguard-rust"
SAVE_PATH="asset.tar.gz"
rm -f "$SAVE_PATH" agent-wireguard
ASSET_URL=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/$OWNER/$REPO/releases/latest | grep '"browser_download_url"' | grep 'tar.gz' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup_wireguard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ wg genkey | tee /etc/wireguard/privatekey | wg pubkey | tee /etc/wireguard/publi
chmod 600 /etc/wireguard/privatekey
echo "[Interface]
PrivateKey = $(cat /etc/wireguard/privatekey)
Address = $WIREGUARD_ADDRESS
Address = $WIREGUARD_ADDRESS/24
ListenPort = $WIREGUARD_PORT
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
Expand Down

0 comments on commit b035865

Please sign in to comment.