1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2023-11-05 11:42:31 +08:00 committed by GitHub
commit 93a132ed21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 90 additions and 69 deletions

View file

@ -135,7 +135,7 @@ _set_glorytun_vps() {
_set_openvpn_vps() {
local enabled port key
enabled="$(uci -q get openvpn.omr.enable)"
enabled="$(uci -q get openvpn.omr.enabled)"
[ "$enabled" != "1" ] && echo "OpenVPN disabled" && return
port="$(uci -q get openvpn.omr.port)"
cipher="$(uci -q get openvpn.omr.cipher)"

View file

@ -154,9 +154,10 @@ if [ "$(uci -q get network.tun0.mtu)" = "1200" ] || [ -z "$(uci -q get network.t
EOF
fi
# Set the default VPN
if [ "$(uci -q get openmptcprouter.settings.vpn)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set openmptcprouter.settings.vpn='glorytun_tcp'
set openmptcprouter.settings.vpn='openvpn'
set glorytun.vpn.enable='1'
commit glorytun
commit openmptcprouter