mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-03 06:23:56 +08:00
update 2026-08-18 12:29:52
This commit is contained in:
1 parent
33cc36e071
commit
8ab60ce95e
3 files changed
+19
-4
No files matched your search
@@ -80,6 +80,12 @@ end
|
|||||||
o:value("direct", "Direct")
|
o:value("direct", "Direct")
|
||||||
o:depends({ custom = false })
|
o:depends({ custom = false })
|
||||||
|
|
||||||
|
o = s:option(DummyValue, "is_endpoint", "")
|
||||||
|
o.not_rewrite = true
|
||||||
|
o.template = m:template_path("/cbi/hidevalue")
|
||||||
|
o.value = "1"
|
||||||
|
o:depends({ custom = false, protocol = "wireguard" })
|
||||||
|
|
||||||
o = s:option(Value, "port", translate("Listen Port"))
|
o = s:option(Value, "port", translate("Listen Port"))
|
||||||
o.datatype = "port"
|
o.datatype = "port"
|
||||||
o:depends({ custom = false })
|
o:depends({ custom = false })
|
||||||
@@ -452,7 +458,7 @@ end
|
|||||||
|
|
||||||
o = s:option(Flag, "bind_local", translate("Bind Local"), translate("When selected, it can only be accessed localhost."))
|
o = s:option(Flag, "bind_local", translate("Bind Local"), translate("When selected, it can only be accessed localhost."))
|
||||||
o.default = "0"
|
o.default = "0"
|
||||||
o:depends({ custom = false })
|
o:depends({ custom = false, is_endpoint = "" })
|
||||||
|
|
||||||
o = s:option(Flag, "accept_lan", translate("Accept LAN Access"), translate("When selected, it can accessed lan , this will not be safe!"))
|
o = s:option(Flag, "accept_lan", translate("Accept LAN Access"), translate("When selected, it can accessed lan , this will not be safe!"))
|
||||||
o.default = "0"
|
o.default = "0"
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ if not s1.fields["type"].default then
|
|||||||
s1.fields["type"].default = type_name
|
s1.fields["type"].default = type_name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not s1.val["type"] then
|
||||||
|
s1.val["type"] = type_name
|
||||||
|
end
|
||||||
|
|
||||||
if s1.val["type"] and s1.val["type"] ~= type_name then
|
if s1.val["type"] and s1.val["type"] ~= type_name then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -62,11 +66,16 @@ o:value("wireguard", "WireGuard")
|
|||||||
o:value("dokodemo-door", "dokodemo-door")
|
o:value("dokodemo-door", "dokodemo-door")
|
||||||
o:depends({ custom = false })
|
o:depends({ custom = false })
|
||||||
|
|
||||||
|
o = s:option(DummyValue, "is_endpoint", "")
|
||||||
|
o.not_rewrite = true
|
||||||
|
o.template = m:template_path("/cbi/hidevalue")
|
||||||
|
o.value = "1"
|
||||||
|
o:depends({ custom = false, protocol = "wireguard" })
|
||||||
|
|
||||||
o = s:option(Value, "port", translate("Listen Port"))
|
o = s:option(Value, "port", translate("Listen Port"))
|
||||||
o.datatype = "port"
|
o.datatype = "port"
|
||||||
o:depends({ custom = false })
|
o:depends({ custom = false })
|
||||||
|
|
||||||
|
|
||||||
o = s:option(DynamicList, "users", translate("User"))
|
o = s:option(DynamicList, "users", translate("User"))
|
||||||
for i, v in ipairs(user_list) do
|
for i, v in ipairs(user_list) do
|
||||||
o:value(v[".name"], v.username)
|
o:value(v[".name"], v.username)
|
||||||
@@ -402,7 +411,7 @@ end
|
|||||||
--[[acceptProxyProtocol]]
|
--[[acceptProxyProtocol]]
|
||||||
o = s:option(Flag, "acceptProxyProtocol", translate("acceptProxyProtocol"), translate("Whether to receive PROXY protocol, when this node want to be fallback or forwarded by proxy, it must be enable, otherwise it cannot be used."))
|
o = s:option(Flag, "acceptProxyProtocol", translate("acceptProxyProtocol"), translate("Whether to receive PROXY protocol, when this node want to be fallback or forwarded by proxy, it must be enable, otherwise it cannot be used."))
|
||||||
o.default = "0"
|
o.default = "0"
|
||||||
o:depends({ custom = false })
|
o:depends({ custom = false, is_endpoint = "" })
|
||||||
|
|
||||||
--[[Fast Open]]
|
--[[Fast Open]]
|
||||||
o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open"))
|
o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open"))
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ ln_run() {
|
|||||||
echolog " - 找不到 ${ln_name},无法启动..."
|
echolog " - 找不到 ${ln_name},无法启动..."
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
[ "${output}" != "/dev/null" ] && [ -n "$(echo "${output}" | grep -E "default|SOCKS_")" ] && [ "${ln_name}" != "chinadns-ng" ] && {
|
[ "${output}" != "/dev/null" ] && [ -n "$(echo "${output}" | grep -E "default|socks_")" ] && [ "${ln_name}" != "chinadns-ng" ] && {
|
||||||
local persist_log_path=$(config_t_get global persist_log_path)
|
local persist_log_path=$(config_t_get global persist_log_path)
|
||||||
local sys_log=$(config_t_get global sys_log "0")
|
local sys_log=$(config_t_get global sys_log "0")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user