mirror of
https://github.com/itdoginfo/ansible-openwrt-hirkn.git
synced 2025-12-16 12:04:30 +05:00
Some fixes
This commit is contained in:
@@ -18,7 +18,7 @@ EOF
|
|||||||
cat << EOF > /etc/hotplug.d/iface/30-rknroute
|
cat << EOF > /etc/hotplug.d/iface/30-rknroute
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
sleep 5
|
sleep 10
|
||||||
ip route add table vpn default dev tun0
|
ip route add table vpn default dev tun0
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
@@ -107,9 +107,9 @@ add_tunnel() {
|
|||||||
|
|
||||||
read -r -p "Enter the public key (from [Peer]):"$'\n' WG_PUBLIC_KEY
|
read -r -p "Enter the public key (from [Peer]):"$'\n' WG_PUBLIC_KEY
|
||||||
read -r -p "If use PresharedKey, Enter this (from [Peer]). If your don't use leave blank:"$'\n' WG_PRESHARED_KEY
|
read -r -p "If use PresharedKey, Enter this (from [Peer]). If your don't use leave blank:"$'\n' WG_PRESHARED_KEY
|
||||||
read -r -p "Enter Enpoint host without port (Domain or IP) (from [Peer]):"$'\n' WG_ENDPOINT
|
read -r -p "Enter Endpoint host without port (Domain or IP) (from [Peer]):"$'\n' WG_ENDPOINT
|
||||||
|
|
||||||
read -r -p "Enter Enpoint host port (from [Peer]) [51820]:"$'\n' WG_ENDPOINT_PORT
|
read -r -p "Enter Endpoint host port (from [Peer]) [51820]:"$'\n' WG_ENDPOINT_PORT
|
||||||
WG_ENDPOINT_PORT=${WG_ENDPOINT_PORT:-51820}
|
WG_ENDPOINT_PORT=${WG_ENDPOINT_PORT:-51820}
|
||||||
if [ "$WG_ENDPOINT_PORT" = '51820' ]; then
|
if [ "$WG_ENDPOINT_PORT" = '51820' ]; then
|
||||||
echo $WG_ENDPOINT_PORT
|
echo $WG_ENDPOINT_PORT
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
{% if tunnel == "wg" %}
|
{% if tunnel == "wg" %}
|
||||||
ip route add table vpn default dev wg0
|
ip route add table vpn default dev wg0
|
||||||
{% elif (tunnel == "openvpn") or (tunnel == "singbox") or (tunnel == "tun2socks") %}
|
{% elif (tunnel == "openvpn") or (tunnel == "singbox") or (tunnel == "tun2socks") %}
|
||||||
sleep 5
|
sleep 10
|
||||||
ip route add table vpn default dev tun0
|
ip route add table vpn default dev tun0
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user