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 2024-01-05 13:27:19 +08:00 committed by GitHub
commit 9dbd1e5009
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 20 deletions

View file

@ -451,7 +451,7 @@
<% if nixio.fs.access("/usr/sbin/dsvpn") then %><option value="dsvpn" <% if uci:get("openmptcprouter","settings","vpn") == "dsvpn" then %>selected="selected"<% end %>>A Dead Simple VPN</option><% end %> <% if nixio.fs.access("/usr/sbin/dsvpn") then %><option value="dsvpn" <% if uci:get("openmptcprouter","settings","vpn") == "dsvpn" then %>selected="selected"<% end %>>A Dead Simple VPN</option><% end %>
<% if nixio.fs.access("/usr/sbin/mlvpn") then %><option value="mlvpn" <% if uci:get("openmptcprouter","settings","vpn") == "mlvpn" then %>selected="selected"<% end %>>MLVPN</option><% end %> <% if nixio.fs.access("/usr/sbin/mlvpn") then %><option value="mlvpn" <% if uci:get("openmptcprouter","settings","vpn") == "mlvpn" then %>selected="selected"<% end %>>MLVPN</option><% end %>
<% if nixio.fs.access("/usr/sbin/ubond") then %><option value="ubond" <% if uci:get("openmptcprouter","settings","vpn") == "ubond" then %>selected="selected"<% end %>>UBOND</option><% end %> <% if nixio.fs.access("/usr/sbin/ubond") then %><option value="ubond" <% if uci:get("openmptcprouter","settings","vpn") == "ubond" then %>selected="selected"<% end %>>UBOND</option><% end %>
<% if nixio.fs.access("/etc/init.d/openvpn") then %><option value="openvpn" <% if uci:get("openmptcprouter","settings","vpn") == "openvpn" then %>selected="selected"<% end %>>OpenVPN</option><% end %> <% if nixio.fs.access("/etc/init.d/openvpn") then %><option value="openvpn" <% if uci:get("openmptcprouter","settings","vpn") == "openvpn" then %>selected="selected"<% end %>>OpenVPN TCP</option><% end %>
<!-- <% if nixio.fs.access("/etc/init.d/openvpnbonding") then %><option value="openvpn_bonding" <% if uci:get("openmptcprouter","settings","vpn") == "openvpn_bonding" then %>selected="selected"<% end %>>OpenVPN Bonding</option><% end %> --> <!-- <% if nixio.fs.access("/etc/init.d/openvpnbonding") then %><option value="openvpn_bonding" <% if uci:get("openmptcprouter","settings","vpn") == "openvpn_bonding" then %>selected="selected"<% end %>>OpenVPN Bonding</option><% end %> -->
<option value="none" <% if uci:get("openmptcprouter","settings","vpn") == "none" then %>selected="selected"<% end %>>None</option> <option value="none" <% if uci:get("openmptcprouter","settings","vpn") == "none" then %>selected="selected"<% end %>>None</option>
<% <%

View file

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=modemmanager PKG_NAME:=modemmanager
PKG_SOURCE_VERSION:=1.22.0 PKG_SOURCE_VERSION:=1.23.2-dev
PKG_RELEASE:=5 PKG_RELEASE:=5
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
PKG_MIRROR_HASH:=98daa1a15075c88afb3ed0de20dc83fe51d2ba3c66318ce3f731da4616a2e192 #PKG_MIRROR_HASH:=98daa1a15075c88afb3ed0de20dc83fe51d2ba3c66318ce3f731da4616a2e192
PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com> PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com>
PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE:=GPL-2.0-or-later

View file

@ -1,13 +0,0 @@
--- a/src/plugins/ublox/77-mm-ublox-port-types.rules
+++ b/src/plugins/ublox/77-mm-ublox-port-types.rules
@@ -88,8 +88,8 @@ SUBSYSTEMS=="usb", ATTRS{bInterfaceNumbe
# ttyUSB2 (if #2): secondary
# ttyUSB3 (if #3): unused (ignore)
ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_PORT_IGNORE}="1"
-ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1", ENV{ID_MM_DEVICE_PROCESS}="1"
-ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1", ENV{ID_MM_DEVICE_PROCESS}="1"
+ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"
+ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1"
ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_PORT_IGNORE}="1"
LABEL="mm_ublox_port_types_end"

View file

@ -33,7 +33,7 @@ if [ "$(pgrep -f dnsmasq)" = "" ] && [ -f /etc/init.d/dnsmasq ]; then
/etc/init.d/dnsmasq restart 2>&1 >/dev/null /etc/init.d/dnsmasq restart 2>&1 >/dev/null
sleep 5 sleep 5
fi fi
if [ -f /etc/init.d/unbound ] && [ "$(uci -q get unbound.@unbound[0].enabled)" = "1" ]; then if [ -f /etc/init.d/unbound ] && [ "$(uci -q get unbound.@unbound[0].enabled)" = "1" ] && [ "$OMR_TRACKER_STATUS" != "ERROR" ]; then
if [ "$(pgrep -f unbound)" = "" ]; then if [ "$(pgrep -f unbound)" = "" ]; then
_log "Can't find unbound, restart it..." _log "Can't find unbound, restart it..."
/etc/init.d/unbound restart 2>&1 >/dev/null /etc/init.d/unbound restart 2>&1 >/dev/null
@ -41,7 +41,7 @@ if [ -f /etc/init.d/unbound ] && [ "$(uci -q get unbound.@unbound[0].enabled)" =
elif [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ] && [ "$(uci -q get unbound.ub_main.listen_port)" = "5353" ] && [ -n "$(dig +timeout=4 +tries=1 openmptcprouter.com -p 5353 | grep 'ANSWER: 0')" ]; then elif [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ] && [ "$(uci -q get unbound.ub_main.listen_port)" = "5353" ] && [ -n "$(dig +timeout=4 +tries=1 openmptcprouter.com -p 5353 | grep 'ANSWER: 0')" ]; then
_log "Can't resolve via unbound, restart it..." _log "Can't resolve via unbound, restart it..."
/etc/init.d/unbound restart 2>&1 >/dev/null /etc/init.d/unbound restart 2>&1 >/dev/null
sleep 5 sleep 20
fi fi
fi fi
@ -137,8 +137,24 @@ restart_omrtracker() {
sleep 10 sleep 10
} }
set_lan_ips() {
config_get ip4table "$1" ip4table
config_get device "$1" device
config_get proto "$1" proto
if [ "$ip4table" = "lan" ] && [ -n "$device" ] && ([ "$proto" = "dhcp" ] || [ "$proto" = "static" ]); then
[ -z "$(uci -q get shadowsocks-libev.ss_rules.ifnames | grep $device)" ] && {
uci -q add_list shadowsocks-libev.ss_rules.ifnames="$device"
uci -q add_list shadowsocks-rust.ss_rules.ifnames="$device"
}
elif [ -n "$device" ] && [ -n "$(uci -q get shadowsocks-libev.ss_rules.ifnames | grep $device)" ]; then
uci -q del_list shadowsocks-libev.ss_rules.ifnames="$device"
uci -q del_list shadowsocks-rust.ss_rules.ifnames="$device"
fi
}
config_load network config_load network
config_foreach restart_omrtracker interface config_foreach restart_omrtracker interface
#config_foreach set_lan_ips interface
mutlipath_fix() { mutlipath_fix() {
config_get multipath "$1" multipath config_get multipath "$1" multipath
@ -185,7 +201,7 @@ if [ -n "$(logread | tail -n 2 | grep 'Ring expansion failed')" ]; then
echo 1 > /sys/bus/pci/rescan echo 1 > /sys/bus/pci/rescan
fi fi
if [ -f /etc/init.d/omr-bypass ] && (([ -f /usr/sbin/iptables-legacy-save ] && [ "$(iptables-legacy-save 2>/dev/null | grep omr-bypass)" = "" ]) || [ "$(iptables-save 2>/dev/null | grep omr-bypass)" = "" ]) && [ "$(pgrep -f omr-bypass)" = "" ]; then if [ -f /etc/init.d/omr-bypass ] && [ "$(iptables-save 2>/dev/null | grep omr-bypass)" = "" ] && [ "$(pgrep -f omr-bypass)" = "" ]; then
_log "Can't find omr-bypass rules, restart omr-bypass..." _log "Can't find omr-bypass rules, restart omr-bypass..."
/etc/init.d/omr-bypass 2>&1 >/dev/null /etc/init.d/omr-bypass 2>&1 >/dev/null
sleep 5 sleep 5
@ -215,7 +231,7 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get sqm.${OMR_TRACKER_INTERFAC
fi fi
fi fi
#if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep -f openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || (([ -f /usr/sbin/iptables-legacy-save ] && [ -z "$(iptables-save 2>/dev/null | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]) || [ -z "$(iptables-save 2>/dev/null | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ])); then #if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep -f openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || [ -z "$(iptables-save 2>/dev/null | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]); then
if [ "$(pgrep -f set_vps_firewall)" = "" ] && [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep -f openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && [ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ]; then if [ "$(pgrep -f set_vps_firewall)" = "" ] && [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep -f openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && [ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ]; then
check_server_fw() { check_server_fw() {
[ "$(uci -q get openmptcprouter.$1.set_firewall)" = "1" ] && { [ "$(uci -q get openmptcprouter.$1.set_firewall)" = "1" ] && {