diff --git a/luci-app-ap-modem/Makefile b/luci-app-ap-modem/Makefile index f88e93b27..49a18f1fb 100644 --- a/luci-app-ap-modem/Makefile +++ b/luci-app-ap-modem/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.0.1-20230403 +PKG_VERSION:=1.0.4-20230408 PKG_RELEASE:= PKG_MAINTAINER:=jjm2473 diff --git a/luci-app-ap-modem/htdocs/luci-static/resources/view/ap_modem.js b/luci-app-ap-modem/htdocs/luci-static/resources/view/ap_modem.js index 629f44451..a54386702 100644 --- a/luci-app-ap-modem/htdocs/luci-static/resources/view/ap_modem.js +++ b/luci-app-ap-modem/htdocs/luci-static/resources/view/ap_modem.js @@ -29,20 +29,24 @@ return view.extend({ s.addremove = false; [ - {id:"lan", title:_("LAN"), subtitle:_("AP on LAN side"), placeholder:"192.168.31.254"}, - {id:"wan", title:_("WAN"), subtitle:_("AP / Modem on WAN side"), placeholder:"192.168.1.254"}, + {id:"lan", title:_("LAN"), subtitle:_("AP on LAN side"), placeholder:"192.168.31.254", + example:_("
For example, you want to access the AP, its IP address is 192.168.31.1, but the client and the router are not in its subnet, so it cannot be connected. " + + "Then you can add 192.168.31.254 here, the client will be able to access 192.168.31.1 after saving and applying.")}, + {id:"wan", title:_("WAN"), subtitle:_("AP / Modem on WAN side"), placeholder:"192.168.1.254", + example:_("
For example, you want to access the modem, its IP address is 192.168.1.1, but because it uses PPPoE bridge mode, so it cannot be connected. " + + "Then you can add 192.168.1.254 here, the client will be able to access 192.168.1.1 after saving and applying.")}, ].forEach(function(vif) { s.tab(vif.id, vif.title); o = s.taboption(vif.id, form.SectionValue, '__'+vif.id+'__', form.NamedSection, vif.id, null, - vif.subtitle, _('Here add the IP address of the same subnet as the target device, but not the same as the target device.
Do not add IPs already used by other devices.
For example, the address of the AP is 192.168.31.1, then you can add 192.168.31.254')); + vif.subtitle, _('Here add the IP address of the same subnet as the target device, but not the same as the target device.
Do not add IPs already used by other devices.') + vif.example); ss = o.subsection; ss.anonymous = true; - o = ss.option(form.DynamicList, 'ipaddr', _('Virtual IP'), _('Supports "IP/MASK", "IP/PREFIX", and pure "IP" format, pure "IP" assumes a prefix of 24 bits')) - o.datatype = 'ipmask4' - o.placeholder = vif.placeholder + o = ss.option(form.DynamicList, 'ipaddr', _('Virtual IP'), _('Supports "IP/MASK", "IP/PREFIX", and pure "IP" format, pure "IP" assumes a prefix of 24 bits')); + o.datatype = 'ipmask4'; + o.placeholder = vif.placeholder; }); return m.render(); diff --git a/luci-app-ap-modem/po/zh-cn/ap-modem.po b/luci-app-ap-modem/po/zh-cn/ap-modem.po index 0b77eb330..a8b059429 100644 --- a/luci-app-ap-modem/po/zh-cn/ap-modem.po +++ b/luci-app-ap-modem/po/zh-cn/ap-modem.po @@ -25,10 +25,19 @@ msgstr "虚拟IP地址" msgid "" "Here add the IP address of the same subnet as the target device, but not the same as the target device. " -"
Do not add IPs already used by other devices. " -"
For example, the address of the AP is 192.168.31.1, then you can add 192.168.31.254" +"
Do not add IPs already used by other devices." msgstr "" -"这里添加与目标设备同子网的IP地址,但不能与目标设备IP完全相同。
不要添加其他设备已经使用的IP。
例如,AP后台的地址是192.168.31.1,那可以添加192.168.31.254" +"这里添加与目标设备同子网的IP地址,但不能与目标设备IP完全相同。
不要添加其他设备正在使用的IP。" + +msgid "" +"
For example, you want to access the AP, its IP address is 192.168.31.1, but the client and the router are not in its subnet, so it cannot be connected. " +"Then you can add 192.168.31.254 here, the client will be able to access 192.168.31.1 after saving and applying." +msgstr "
例如,你想要访问AP后台,它的IP地址是192.168.31.1,但是由于现在客户端和路由器都不在它的子网,无法连接。那么可以在这里添加192.168.31.254,保存并应用之后客户端就能访问192.168.31.1了。" + +msgid "" +"
For example, you want to access the modem, its IP address is 192.168.1.1, but because it uses PPPoE bridge mode, so it cannot be connected. " +"Then you can add 192.168.1.254 here, the client will be able to access 192.168.1.1 after saving and applying." +msgstr "
例如,你想要访问光猫后台,它的IP地址是192.168.1.1,但是由于它使用PPPoE桥接模式,无法连接。那么可以在这里添加192.168.1.254,保存并应用之后客户端就能访问192.168.1.1了。" msgid "Supports \"IP/MASK\", \"IP/PREFIX\", and pure \"IP\" format, pure \"IP\" assumes a prefix of 24 bits" msgstr "支持“IP/掩码”、“IP/前缀长度”、以及纯“IP”格式,纯“IP”则假设前缀24位" diff --git a/luci-app-ap-modem/root/etc/init.d/ap_modem b/luci-app-ap-modem/root/etc/init.d/ap_modem index 0a819dbac..0a445eac5 100755 --- a/luci-app-ap-modem/root/etc/init.d/ap_modem +++ b/luci-app-ap-modem/root/etc/init.d/ap_modem @@ -36,6 +36,11 @@ generate_config() { echo "network.lan.device != br-lan in uci" >&2 return 1 } + local wan_dev="`uci -q get network.wan.device`" + [[ -z "$wan_dev" ]] && { + echo "get network.wan.device in uci failed" >&2 + return 1 + } local lan_dev=`find_uci_section network device name 'br-lan' | head -1` [[ -z "$lan_dev" ]] && { echo "network.device.name=br-lan not found in uci" >&2 @@ -85,16 +90,20 @@ EOF uci -q batch <<-EOF >/dev/null set network.vap_wan=interface set network.vap_wan.proto=static - set network.vap_wan.device=@wan + set network.vap_wan.device=$wan_dev set network.vap_wan.defaultroute=0 set network.vap_wan.delegate=0 EOF fi # firewall - uci -q get "firewall.$wan_zone.network" | grep -Fwq 'vap_lan' || uci -q batch <<-EOF >/dev/null + local fw_wan_net="`uci -q get firewall.$wan_zone.network`" + echo "$fw_wan_net" | grep -Fwq 'vap_lan' || uci -q batch <<-EOF >/dev/null add_list firewall.$wan_zone.network=vap_lan - commit firewall EOF + echo "$fw_wan_net" | grep -Fwq 'vap_wan' || uci -q batch <<-EOF >/dev/null + add_list firewall.$wan_zone.network=vap_wan +EOF + uci commit firewall # ip local bip @@ -155,6 +164,27 @@ EOF uci commit network } +clean_config() { + local wan_zone=`find_uci_section firewall zone name 'wan' | head -1` + [[ -z "$wan_zone" ]] || uci -q batch <<-EOF >/dev/null + del_list firewall.$wan_zone.network=vap_lan + del_list firewall.$wan_zone.network=vap_wan + commit firewall +EOF + local lan_dev=`find_uci_section network device name 'br-lan' | head -1` + [[ -z "$lan_dev" ]] || { + uci del_list "network.$lan_dev.ports=vap-lan" + } + + uci -q batch <<-EOF >/dev/null + set network.vap_lan.auto=0 + set network.vap_wan.auto=0 + delete network.veth_lan_peer + delete network.veth_lan + commit network +EOF +} + start_service() { config_load ap_modem config_get_bool enabled "config" enabled 0 @@ -166,12 +196,13 @@ EOF if [[ "$enabled" = "1" ]]; then generate_config else - uci -q batch <<-EOF >/dev/null - set network.vap_lan.auto=0 - set network.vap_wan.auto=0 - commit network -EOF + clean_config fi /etc/init.d/network reload return 0 } + +stop_service() { + clean_config + /etc/init.d/network reload +} diff --git a/luci-app-passwall/root/usr/share/passwall/0_default_config b/luci-app-passwall/root/usr/share/passwall/0_default_config index 92d038584..257a2066e 100644 --- a/luci-app-passwall/root/usr/share/passwall/0_default_config +++ b/luci-app-passwall/root/usr/share/passwall/0_default_config @@ -93,7 +93,7 @@ config nodes 'myshunt' option BT '_direct' option Proxy '_default' option Netflix '_default' - option openai '_default' + option OpenAI '_default' option Direct '_direct' option default_node 'nil' option domainStrategy 'IPOnDemand' @@ -189,8 +189,8 @@ config shunt_rules 'Netflix' option remarks 'Netflix' option domain_list 'geosite:netflix' -config shunt_rules 'openai' - option remarks 'openai' +config shunt_rules 'OpenAI' + option remarks 'OpenAI' option domain_list 'openai.com' config shunt_rules 'Direct' diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/node_config.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/node_config.lua index 9e4c5eb60..70f812bd0 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/node_config.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/node_config.lua @@ -647,7 +647,7 @@ wireguard_mtu = s:option(Value, "wireguard_mtu", translate("MTU")) wireguard_mtu.default = "1420" wireguard_mtu:depends({ type = "Xray", protocol = "wireguard" }) -if api.compare_versions(api.get_app_version("xray"), ">=", "1.8.0") then +if api.compare_versions(api.get_xray_version(), ">=", "1.8.0") then wireguard_reserved = s:option(Value, "wireguard_reserved", translate("Reserved")) wireguard_reserved:depends({ type = "Xray", protocol = "wireguard" }) end diff --git a/luci-app-wan-mac/Makefile b/luci-app-wan-mac/Makefile index 8ae573b71..439de9d8d 100644 --- a/luci-app-wan-mac/Makefile +++ b/luci-app-wan-mac/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.0.0-20230404 +PKG_VERSION:=1.0.1-20230405 PKG_RELEASE:= PKG_MAINTAINER:=jjm2473 diff --git a/luci-app-wan-mac/root/etc/init.d/wan_mac b/luci-app-wan-mac/root/etc/init.d/wan_mac index d1d4cd26d..bb5ca2169 100755 --- a/luci-app-wan-mac/root/etc/init.d/wan_mac +++ b/luci-app-wan-mac/root/etc/init.d/wan_mac @@ -59,8 +59,28 @@ EOF return 0 } +clean_config() { + local wan_dev="`uci -q get network.wan.device`" + [[ -z "$wan_dev" ]] && { + return 1 + } + + local wan_dev_s=`find_uci_section network device name "$wan_dev" | head -1` + [[ -z "$wan_dev_s" ]] && { + return 1 + } + uci -q batch <<-EOF >/dev/null + delete network.$wan_dev_s.macaddr + commit network +EOF +} + start_service() { config_load wan_mac generate_config && /etc/init.d/network reload return 0 } + +stop_service() { + clean_config && /etc/init.d/network reload +} diff --git a/sing-box/Makefile b/sing-box/Makefile index 6b0798e65..2b009d61e 100644 --- a/sing-box/Makefile +++ b/sing-box/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sing-box -PKG_VERSION:=1.2.3 +PKG_VERSION:=1.3-beta1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/SagerNet/sing-box/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=a12b81950deb181cf2c1783685e0dd66502376471db57e3787fad3f3e27fd48c +PKG_HASH:=0c3652b1aab3659d5f45d9f3d3090c3385e0a11ef345942c71ba883d43bab9e2 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILE:=LICENSE