|
@@ -1,8 +1,7 @@
|
|
|
|
|
|
-
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -17,23 +16,16 @@ apt install software-properties-common -y
|
|
|
|
|
|
echo .read | add-apt-repository ppa:wireguard/wireguard
|
|
|
|
|
|
-
|
|
|
|
|
|
apt update
|
|
|
apt install wireguard resolvconf -y
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-apt -y install qrencode
|
|
|
-
|
|
|
-
|
|
|
-modprobe wireguard && lsmod | grep wireguard
|
|
|
-
|
|
|
+
|
|
|
+apt -y install qrencode python
|
|
|
|
|
|
|
|
|
modprobe wireguard && lsmod | grep wireguard
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
@@ -44,12 +36,10 @@ cd /etc/wireguard
|
|
|
wg genkey | tee sprivatekey | wg pubkey > spublickey
|
|
|
wg genkey | tee cprivatekey | wg pubkey > cpublickey
|
|
|
|
|
|
-
|
|
|
|
|
|
serverip=$(curl -4 icanhazip.com)
|
|
|
|
|
|
|
|
|
-
|
|
|
echo "[Interface]
|
|
|
|
|
|
PrivateKey = $(cat sprivatekey)
|
|
@@ -75,7 +65,6 @@ AllowedIPs = 10.0.0.2/32" > wg0.conf
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
echo "[Interface]
|
|
|
|
|
|
PrivateKey = $(cat cprivatekey)
|
|
@@ -102,8 +91,6 @@ AllowedIPs = 0.0.0.0/0, ::0/0
|
|
|
|
|
|
PersistentKeepalive = 25"|sed '/^#/d;/^\s*$/d' > client.conf
|
|
|
|
|
|
-
|
|
|
-
|
|
|
|
|
|
chmod 777 -R /etc/wireguard
|
|
|
|
|
@@ -118,7 +105,6 @@ sysctl_config() {
|
|
|
sysctl_config
|
|
|
lsmod | grep bbr
|
|
|
|
|
|
-
|
|
|
|
|
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
|
|
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
|