1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge branch 'develop'

This commit is contained in:
suyuan168 2022-02-01 03:05:46 +08:00
commit 658fc44d21
8 changed files with 1907 additions and 15 deletions

File diff suppressed because it is too large Load diff

View file

@ -69,8 +69,8 @@
<%- end -%> <%- end -%>
<%- if current_omr_version ~= "" and latest_omr_version ~= "" and current_omr_version < latest_omr_version then -%> <%- if current_omr_version ~= "" and latest_omr_version ~= "" and current_omr_version < latest_omr_version then -%>
<div class="alert-message notice"> <div class="alert-message notice">
<p><%=translatef("You have openmptcprouter business version %s and version %s is now available",current_omr_version,latest_omr_version)%></p> <p><%=translatef("你的蚂蚁聚合openmptcprouter of china商业版 版本号 %s 最新 版本号 %s 现在可以升级",current_omr_version,latest_omr_version)%></p>
<div class="right"><a class="btn" href="https://www.55860.com/"><%:Download latest version...%></a></div> <div class="right"><a class="btn" href="https://55860.com/serverstatus.php"><%:点击查看最新版本...%></a></div>
</div> </div>
<%- end -%> <%- end -%>
<div class="alert-message notice"> <div class="alert-message notice">

View file

@ -246,6 +246,7 @@ modemmanager_connected_method_static_ipv4() {
proto_add_ipv4_address "${address}" "${mask}" proto_add_ipv4_address "${address}" "${mask}"
[ -n "${gateway}" ] && [ "${defaultroute}" != 0 ] && { [ -n "${gateway}" ] && [ "${defaultroute}" != 0 ] && {
echo "adding default IPv4 route via ${gateway}" echo "adding default IPv4 route via ${gateway}"
logger -t "modemmanager.proto" "adding default IPv4 route via ${gateway} ${address}"
proto_add_ipv4_route "0.0.0.0" "0" "${gateway}" "${address}" proto_add_ipv4_route "0.0.0.0" "0" "${gateway}" "${address}"
} }
[ -n "${dns1}" ] && { [ -n "${dns1}" ] && {

View file

@ -267,10 +267,10 @@ interface_multipath_settings() {
#config_get mode "$config" multipath "" #config_get mode "$config" multipath ""
#[ "$mode" = "" ] && mode="$(uci -q get openmptcprouter.${config}.multipath)" #[ "$mode" = "" ] && mode="$(uci -q get openmptcprouter.${config}.multipath)"
[ "$mode" = "master" ] && { #[ "$mode" = "master" ] && {
#echo "ip route replace default via $gateway dev $iface" # #echo "ip route replace default via $gateway dev $iface"
ip route replace default via $gateway dev $iface 2>&1 >/dev/null # ip route replace default via $gateway dev $iface 2>&1 >/dev/null
} #}
if [ "$txqueuelen" != "" ]; then if [ "$txqueuelen" != "" ]; then
ifconfig $iface txqueuelen $txqueuelen > /dev/null 2>&1 ifconfig $iface txqueuelen $txqueuelen > /dev/null 2>&1
else else
@ -350,9 +350,9 @@ interface_multipath_settings() {
fi fi
#config_get mode "$config" multipath "off" #config_get mode "$config" multipath "off"
[ "$mode" = "master" ] && { #[ "$mode" = "master" ] && {
ip -6 route replace default via $gateway6 dev $iface 2>&1 >/dev/null # ip -6 route replace default via $gateway6 dev $iface 2>&1 >/dev/null
} #}
#[ "$mode" = "off" ] && { #[ "$mode" = "off" ] && {
# ifconfig $iface txqueuelen 50 > /dev/null 2>&1 # ifconfig $iface txqueuelen 50 > /dev/null 2>&1
#} || { #} || {
@ -490,6 +490,10 @@ start_service() {
[ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && [ -z "$(ubus call system board | jsonfilter -e '@.board_name' | grep '4-model-b')" ] && { [ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && [ -z "$(ubus call system board | jsonfilter -e '@.board_name' | grep '4-model-b')" ] && {
ethtool --offload eth0 rx off tx off > /dev/null 2>&1 ethtool --offload eth0 rx off tx off > /dev/null 2>&1
} }
[ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep -i r2s)" ] && {
ethtool -K eth0 rx off tx off > /dev/null 2>&1
ethtool -K eth1 rx off tx off > /dev/null 2>&1
}
} }
reload_service() { reload_service() {

View file

@ -1182,7 +1182,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(
if [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ]; then if [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ]; then
#local asn="$(wget -4 -qO- -T 4 http://api.iptoasn.com/v1/as/ip/$ipaddr | jsonfilter -q -e '@.as_description')" #local asn="$(wget -4 -qO- -T 4 http://api.iptoasn.com/v1/as/ip/$ipaddr | jsonfilter -q -e '@.as_description')"
#[ -z "$asn" ] && { #[ -z "$asn" ] && {
local asn="$(whois $ipaddr 2>/dev/null | grep -m 1 -i 'netname' | awk '{print $2}')" local asn="$(timeout 2 whois $ipaddr 2>/dev/null | grep -m 1 -i 'netname' | awk '{print $2}')"
#} #}
fi fi
[ -z "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE)" ] && { [ -z "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE)" ] && {
@ -1197,9 +1197,16 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(
uci -q set openmptcprouter.latest_versions.lc=$(date +"%s") uci -q set openmptcprouter.latest_versions.lc=$(date +"%s")
} }
fi fi
[ -n "$ipaddr" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.publicip="$ipaddr" [ -n "$ipaddr" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.publicip)" != "$ipaddr" ] && {
_log "New public ip detected for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE): $ipaddr"
/etc/init.d/mptcp enabled && {
_log "Reload MPTCP for $OMR_TRACKER_DEVICE"
/etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" >/dev/null
}
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.publicip="$ipaddr"
}
[ -n "$OMR_TRACKER_LATENCY" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency="$OMR_TRACKER_LATENCY" [ -n "$OMR_TRACKER_LATENCY" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency="$OMR_TRACKER_LATENCY"
[ -n "$asn" ] && { [ -n "$asn" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.asn)" != "$asn" ] && {
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.asn="$asn" uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.asn="$asn"
} }
@ -1291,7 +1298,14 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(
uci -q set openmptcprouter.latest_versions.lc=$(date +"%s") uci -q set openmptcprouter.latest_versions.lc=$(date +"%s")
} }
fi fi
[ -n "$ipaddr" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.publicip6="$ip6addr" [ -n "$ip6addr" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.publicip)" != "$ip6addr" ] && {
_log "New public ip detected for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE): $ip6addr"
/etc/init.d/mptcp enabled && {
_log "Reload MPTCP for $OMR_TRACKER_DEVICE"
/etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" >/dev/null
}
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.publicip="$ip6addr"
}
[ -n "$OMR_TRACKER_LATENCY" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency="$OMR_TRACKER_LATENCY" [ -n "$OMR_TRACKER_LATENCY" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency="$OMR_TRACKER_LATENCY"
[ -n "$asn" ] && { [ -n "$asn" ] && {
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.asn="$asn" uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.asn="$asn"

View file

@ -81,7 +81,8 @@ MY_DEPENDS := \
luci-app-mlvpn mlvpn 464xlat !TARGET_mvebu:kmod-usb-net-smsc75xx kmod-zram kmod-swconfig swconfig kmod-ipt-nat kmod-ipt-nat6 luci-app-https-dns-proxy kmod-tcp-nanqinlang (TARGET_x86_64||aarch64):kmod-tcp-bbr2 iptables-mod-ipopt igmpproxy ss iptraf-ng \ luci-app-mlvpn mlvpn 464xlat !TARGET_mvebu:kmod-usb-net-smsc75xx kmod-zram kmod-swconfig swconfig kmod-ipt-nat kmod-ipt-nat6 luci-app-https-dns-proxy kmod-tcp-nanqinlang (TARGET_x86_64||aarch64):kmod-tcp-bbr2 iptables-mod-ipopt igmpproxy ss iptraf-ng \
luci-app-acl block-mount blockd fstools luci-app-shutdown libwebp luci-proto-gre tcptraceroute luci-proto-mbim kmod-rtl8xxxu kmod-ath9k-htc luci-app-ttyd luci-mod-dashboard (TARGET_x86||TARGET_x86_64):rtl8192eu-firmware kmod-usb2 libustream-openssl (TARGET_x86||TARGET_x86_64):kmod-ixgbevf (TARGET_x86||TARGET_x86_64):kmod-igbvf \ luci-app-acl block-mount blockd fstools luci-app-shutdown libwebp luci-proto-gre tcptraceroute luci-proto-mbim kmod-rtl8xxxu kmod-ath9k-htc luci-app-ttyd luci-mod-dashboard (TARGET_x86||TARGET_x86_64):rtl8192eu-firmware kmod-usb2 libustream-openssl (TARGET_x86||TARGET_x86_64):kmod-ixgbevf (TARGET_x86||TARGET_x86_64):kmod-igbvf \
hwinfo (TARGET_x86||TARGET_x86_64):dmidecode luci-app-packet-capture kmod-bonding luci-proto-bonding luci-app-sysupgrade \ hwinfo (TARGET_x86||TARGET_x86_64):dmidecode luci-app-packet-capture kmod-bonding luci-proto-bonding luci-app-sysupgrade \
luci-theme-openwrt-2020 luci-proto-wireguard luci-app-wireguard (TARGET_x86||TARGET_x86_64):kmod-r8125 TARGET_x86_64:kmod-atlantic luci-theme-openwrt-2020 luci-proto-wireguard luci-app-wireguard (TARGET_x86||TARGET_x86_64):kmod-r8125 TARGET_x86_64:kmod-atlantic \
mptcpd
# luci-theme-bootstrap luci-theme-openwrt-2020 luci-theme-openwrt luci-app-status # luci-theme-bootstrap luci-theme-openwrt-2020 luci-theme-openwrt luci-app-status
# luci-proto-bonding luci-app-statistics luci-proto-gre # luci-proto-bonding luci-app-statistics luci-proto-gre
# softethervpn5-client softethervpn5-server luci-app-nginx-ha # softethervpn5-client softethervpn5-server luci-app-nginx-ha

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
# Needed for some device, like rtl8156 2.5G USB adapter # Needed for some device, like rtl8156 2.5G USB adapter
[ "$ACTION" = "ifup" ] && [ -n "$DEVICE" ] && [ -n "$(lsusb | grep 8156)" ] [ -n "$(ethtool $DEVICE | grep 2500)" ] && ethtool -s $DEVICE autoneg on [ "$ACTION" = "ifup" ] && [ -n "$DEVICE" ] && ([ -n "$(lsusb | grep 8156)" ] || [ -n "$(ethtool $DEVICE | grep 2500)" ]) && ethtool -s $DEVICE autoneg on

View file

@ -31,4 +31,6 @@ fi
EOF EOF
} }
#sed -i 's/^\tlogger -t/\t[ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] \&\& logger -t/g' /usr/share/ModemManager/modemmanager.common
exit 0 exit 0