E:Debug mode enabledOption ==> ?
+ + sed s/^[ \t]*//;s/[ \t]*$//
printf %s ?
+ menu1=?
+ Validate_User_Choice ?
+ local menu1=?
+ [ Y == Y ]
+ echo ?
+ menu1=?
+ Process_User_Choice ?
+ local menu1=?
+ echo ?
+ awk {print $1}
+ local ACTION=?
+ Show_Info_HDR
+ echo ?
+ awk {print $1}
+ local ACTION=?
+ local CHANGELOG=\e[0m(\e[96mChange Log: \e[93mhttps://github.com/MartineauUK/wireguard/commits/main/wg_manager.sh\e[0m)
+ echo v4.19b2+ grep b
+ [ -n v4.19b2 ]
+ local CHANGELOG=\e[0m(\e[96mChange Log: \e[93mhttps://github.com/MartineauUK/wireguard/commits/dev/wg_manager.sh\e[0m)
+ echo -e \e[97m\n\tRouter\e[95m RT-AX68U \e[0mFirmware \e[95m(v386.7_2)
Router RT-AX68U Firmware (v386.7_2)
+ [ -f /opt/etc/entware_release ]
+ [ -f /opt/etc/entware_release ]
+ grep -E ^arch /opt/etc/entware_release
+ echo -e \e[92m\n\t[✔]\e[97m Entware Architecture\e[95m arch=aarch64\n\e[0m
[✔] Entware Architecture arch=aarch64
+ echo -e \e[95m\n\tv4.19b2\e[97m WireGuard® Session Manager \e[0m(\e[96mChange Log: \e[93mhttps://github.com/MartineauUK/wireguard/commits/dev/wg_manager.sh\e[0m)\e[0m
v4.19b2 WireGuard® Session Manager (Change Log: https://github.com/MartineauUK/wireguard/commits/dev/wg_manager.sh)
+ [ -d /jffs/addons/wireguard/ ]
+ Show_MD5 script
+ local TYPE=script
+ [ script == script ]
+ awk {print $0} /jffs/addons/wireguard/wg_manager.md5
+ echo -e \e[96m\tMD5=3191daf23c180527dbad985ba624d6cc /jffs/addons/wireguard/wg_manager.sh
MD5=3191daf23c180527dbad985ba624d6cc /jffs/addons/wireguard/wg_manager.sh
+ grep+ awk -F" {print $2}
-E ^VERSION= /jffs/addons/wireguard/wg_client
+ local AVERSION=v4.17.9
+ echo -e \e[95m\n\t\tv4.17.9\e[97m (\e[96mwg_client\e[0m)
v4.17.9 (wg_client)
+ grep+ awk -F" {print $2}
-E ^VERSION= /jffs/addons/wireguard/wg_server
+ local AVERSION=v4.17.1
+ echo -e \e[95m\t\tv4.17.1\e[97m (\e[96mwg_server\e[0m)
v4.17.1 (wg_server)
+ Show_Info
+ [ -f /usr/sbin/wg ]
+ modprobe --show-depends wireguard
+ awk {print $2}
+ local FPATH=/lib/modules/4.1.52/kernel/net/wireguard/wireguard.ko
+ strings /lib/modules/4.1.52/kernel/net/wireguard/wireguard.ko
+ cut -d= -f2
+ grep ^version
+ local FVERSION=1.0.20210124
+ which wg
+ [ /usr/sbin/wg != /opt/bin/wg ]
+ echo -e \e[92m\n\t[✔]\e[97m WireGuard® Kernel module/User Space Tools included in Firmware\e[31m (1.0.20210124)\n\e[0m
[✔] WireGuard® Kernel module/User Space Tools included in Firmware (1.0.20210124)
+ which wg
+ [ /usr/sbin/wg == /opt/bin/wg ]
+ [ -f /tmp/menuTree.js ]
+ grep -i WireGuard® Manager /tmp/menuTree.js
+ [ -n {url: "user4.asp", tabName: "WireGuard® Manager"}, ]
+ echo -e \e[92m\n\t[✔]\e[97m WebUI Addon Enabled\e[0m
[✔] WebUI Addon Enabled
+ echo -e \e[0m
+ DNSmasq_Listening_WireGuard_Status
+ grep -F wg* /etc/dnsmasq.conf
+ [ -z interface=wg* # WireGuard ]
+ echo -e \e[92m\t[✔]\e[97m DNSmasq \e[92mis listening on ALL WireGuard® interfaces 'wg*'\n\e[0m
[✔] DNSmasq is listening on ALL WireGuard® interfaces 'wg*'
+ [ -f /jffs/scripts/firewall-start ]
+ grep -i wireguard /jffs/scripts/firewall-start
+ [ -z /jffs/addons/wireguard/wg_firewall # WireGuard ]
+ echo -e \e[92m\t[✔]\e[97m firewall-start \e[92mis monitoring WireGuard® Firewall rules\n\e[0m
[✔] firewall-start is monitoring WireGuard® Firewall rules
+ [ -f /jffs/addons/wireguard/WireguardVPN.conf ]
+ grep -E ^NOMENU /jffs/addons/wireguard/WireguardVPN.conf
+ [ -n ]
+ [ -f /jffs/addons/wireguard/WireguardVPN.conf ]
+ grep -F Y_
+ Manage_KILL_Switch
+ local ACTION=
+ local SILENT=N
+ local TEMP_PERM=temporarily
+ Get_WAN_IF_Name
+ ip route
+ awk /^default/{print $NF}
+ local IF_NAME=eth0
+ nvram get wan0_ifname
+ local IF_NAME=eth0
+ nvram get wan0_gw_ifname
+ [ eth0 != eth0 ]
+ nvram get wan0_pppoe_ifname
+ [ ! -z ]
+ echo eth0
+ local WAN_IF=eth0
+ [ -n ]
+ iptables -nvL+ grep WireGuard KILL-Switch
FORWARD
+ [ -n ]
+ STATUS=N
+ echo N_temporarily
+ echo N_temporarily
+ [ -n ]
+ local TEMP_PERM=temporarily
+ grep -oE ^KILLSWITCH /jffs/addons/wireguard/WireguardVPN.conf
+ [ -z ]
+ local TEMP_PERM=
+ echo -e \e[31m\t[✖]\e[97m WAN \e[92mKILL-Switch is \e[91m\e[7mDISABLED\e[0m (use 'vx' command for info)
[✖] WAN KILL-Switch is DISABLED (use 'vx' command for info)
+ Manage_UDP_Monitor
+ local TYPE=
+ local ACTION=
+ local WATCH=
+ [ -z ]
+ WATCH=&
+ date +%Y%m%d-%H%M%S
+ local TS=20220801-155058
+ [ -n ]
+ pidof UDP_Monitor.sh
+ [ -n ]
+ pidof UDP_Updater.sh
+ [ -n ]
+ echo -e N
+ [ N == Y ]
+ echo -e \e[31m\t[✖]\e[97m UDP \e[92mmonitor is \e[91mDISABLED\e[0m
[✖] UDP monitor is DISABLED
+ Manage_FC ?
+ local STATUS=
+ which fc
+ [ /bin/fc == /bin/fc ]
+ fc status
+ grep Flow Learning Enabled
+ [ -n Flow Learning Enabled : Max<16383>, Active<168>, Cummulative [ 66208 - 66040 ] ]
+ local STATUS=\tFlow Cache Enabled
+ echo \tFlow Cache Enabled
+ local FC_STATUS=\tFlow Cache Enabled
+ echo -e \e[92m\n\t[✔]\e[97m Flow Cache \e[92mis ENABLED\e[0m
[✔] Flow Cache is ENABLED
+ nvram get ipv6_service
+ [ disabled == disabled ]
+ echo -e \e[91m\n\t[✖]\e[97m IPv6 Service is \e[91mDISABLED\e[0m
[✖] IPv6 Service is DISABLED
+ wget -O - -q http://ip4.me/api+ sed s/,Remain.*$//
+ echo -e \e[92m\t[ℹ ] \e[97mIPv4,46.xxx,v1.1,,,See http://ip6.me/docs/ for api documentation
[ℹ ] IPv4,46.xxx,v1.1,,,See http://ip6.me/docs/ for api documentation
+ Get_WAN_IF_Name
+ ip route
+ awk /^default/{print $NF}
+ local IF_NAME=eth0
+ nvram get wan0_ifname
+ local IF_NAME=eth0
+ nvram get wan0_gw_ifname
+ [ eth0 != eth0 ]
+ nvram get wan0_pppoe_ifname
+ [ ! -z ]
+ echo eth0
+ local WAN_IF=eth0
+ cat /proc/sys/net/ipv4/conf/eth0/rp_filter
+ local VAL=1
+ [ 1 == 1 ]
+ STATE=ENABLED
+ echo -e \e[92m\n\t[✔] \e[97mReverse Path Filtering\e[92m ENABLED\n\e[0m
[✔] Reverse Path Filtering ENABLED
+ [ -f /jffs/addons/wireguard/WireguardVPN.conf ]
+ grep -E ^NOTCPMSS /jffs/addons/wireguard/WireguardVPN.conf
+ [ -n ]
+ [ -f /jffs/addons/wireguard/WireguardVPN.conf ]
+ grep -E ^NOSETXMARK /jffs/addons/wireguard/WireguardVPN.conf
+ [ -n ]
+ [ -f /jffs/addons/wireguard/WireguardVPN.conf ]
+ grep -E ^NOIP[Vv]6 /jffs/addons/wireguard/WireguardVPN.conf
+ [ -n ]
+ [ -f /jffs/addons/wireguard/WireguardVPN.conf ]
+ grep -oE USE_ENTWARE_KERNEL_MODULE /jffs/addons/wireguard/WireguardVPN.conf
+ [ -n USE_ENTWARE_KERNEL_MODULE ]
+ [ -f /usr/sbin/wg ]
+ grep -oE ^USE_ENTWARE_KERNEL_MODULE /jffs/addons/wireguard/WireguardVPN.conf
+ [ -n ]
+ echo -e \e[91m\t[✖]\e[97m Use 3rd-party Entware/Userspace Tools \e[92mmodules is \e[91mDENIED\n\e[0m
[✖] Use 3rd-party Entware/Userspace Tools modules is DENIED
+ cru l
+ grep ChkDDNS
+ wc -l
+ [ 0 -gt 0 ]
+ + grep -E wg_manager.*trimdb
cru l
+ wc -l
+ [ 1 -gt 0 ]
+ awk /wg_manager.sh trimdb/ {print $9}
+ cru l
+ + awk /wg_manager.sh trimdb/ {print $1" "$2" "$3" "$4" "$5}
cru l
+ + awk /wg_manager.sh trimdb/ {print $8}
cru l
+ echo -e \e[92m\t[✔] \e[97mCron schedule \e[92m#WireGuard_DB# (0 7 * * 6)\e[97m to trim older than \e[92m99 days\e[97m from WireGuard® SQL Database \e[92mENABLED\n\e[0m
[✔] Cron schedule #WireGuard_DB# (0 7 * * 6) to trim older than 99 days from WireGuard® SQL Database ENABLED
+ [ ReadLine == ReadLine ]
+ echo -e \e[92m\t[✔]\e[97m Use of 'Pg-Up' Key \e[92mfor command retrieval is ENABLED\n\e[0m
[✔] Use of 'Pg-Up' Key for command retrieval is ENABLED
+ Manage_Stats
+ local ACTION=
+ local STATUS=0
+ cru l
+ grep WireGuard
+ [ -n 59 * * * * /jffs/addons/wireguard/wg_manager.sh generatestats #WireGuard#
0 7 * * 6 /jffs/addons/wireguard/wg_manager.sh trimdb 99 #WireGuard_DB# ]
+ local TXT=\e[92m\t[✔] \e[97mStatistics gathering is \e[92mENABLED\e[0m
+ STATUS=1
+ echo -e \e[92m\t[✔] \e[97mStatistics gathering is \e[92mENABLED\e[0m
[✔] Statistics gathering is ENABLED
+ return 1
+ echo -e \e[92m\n\t[ℹ ] \e[0mSpeedtest link\e[93m https://fast.com/en/gb/ \n\e[0m
[ℹ ] Speedtest link https://fast.com/en/gb/
+ echo -e \e[92m\t[ℹ ] \e[0mIPv6 Test link\e[93m https://ipv6-test.com/ \n\e[0m
[ℹ ] IPv6 Test link https://ipv6-test.com/
+ echo -e \e[92m\t[ℹ ] \e[0mWireGuard© Official Site \e[93mhttps://www.wireguard.com/ \n\e[0m
[ℹ ] WireGuard© Official Site https://www.wireguard.com/
+ echo -e \e[92m\t[ℹ ] \e[0m@ZebMcKayhan's\e[92m Hint's and Tips Guide\e[93m https://github.com/ZebMcKayhan/WireguardManager/blob/main/README.md#table-of-content \n\e[0m
[ℹ ] @ZebMcKayhan's Hint's and Tips Guide https://github.com/ZebMcKayhan/WireguardManager/blob/main/README.md#table-of-content
+ [ -f /opt/etc/init.d/S50wireguard ]
+ set +x
WireGuard® ACTIVE Peer Status: Clients 0, Servers 2