tasks queue

This commit is contained in:
bogale 2026-09-26 01:48:54 +09:00
commit 0383cfd0d8
7 changed files with 30 additions and 21 deletions

View file

@ -1,10 +1,6 @@
#!/usr/bin/bash
set -euo pipefail
. data/vps.env
export DEBIAN_FRONTEND=noninteractive
apt-get install -y software-properties-common python3-launchpadlib gnupg2 linux-headers-$(uname -r)
add-apt-repository -y ppa:amnezia/ppa
apt-get install -y amneziawg amneziawg-tools iptables-persistent
. data/dest.env
cat <<EOF >> /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.all.forwarding = 1
@ -24,12 +20,10 @@ for route in tcp:25 tcp:80 tcp:443 udp:443; do
ip6tables -t nat -A PREROUTING -m addrtype --dst-type LOCAL -p $PROTO --dport $PORT -j DNAT --to-destination [$DEST6]:$PORT
ip6tables -A FORWARD -d $DEST6 -p $PROTO --dport $PORT -j ACCEPT
done
netfilter-persistent save
export DEBIAN_FRONTEND=noninteractive
add-apt-repository -y ppa:amnezia/ppa
apt-get install -y software-properties-common python3-launchpadlib gnupg2 linux-headers-$(uname -r) amneziawg amneziawg-tools iptables-persistent
mv data/awg0.conf /etc/amnezia/amneziawg
systemctl enable awg-quick@awg0
apt-get autoremove --purge -y
apt-get clean
echo Installed in $(($(date +%s)-$(cat start)))s
rm -r *
reboot
exit