update 2026-07-23 01:11:05
BIN
doc/lucky1.png
|
Before Width: | Height: | Size: 91 KiB |
BIN
doc/lucky2.png
|
Before Width: | Height: | Size: 319 KiB |
BIN
doc/lucky3.png
|
Before Width: | Height: | Size: 389 KiB |
BIN
doc/taskplan1.png
Normal file
|
After Width: | Height: | Size: 640 KiB |
BIN
doc/taskplan2.png
Normal file
|
After Width: | Height: | Size: 550 KiB |
BIN
doc/taskplan3.png
Normal file
|
After Width: | Height: | Size: 547 KiB |
BIN
doc/view.png
Normal file
|
After Width: | Height: | Size: 659 KiB |
BIN
doc/view2.png
Normal file
|
After Width: | Height: | Size: 650 KiB |
@ -590,6 +590,10 @@ if singbox_tags:find("with_utls") then
|
||||
o:depends({ [_n("reality")] = true })
|
||||
end
|
||||
|
||||
o = s:option(Flag, _n("anytls_disable_reuse"), translate("Disable TLS Reuse"))
|
||||
o.default = 0
|
||||
o:depends({ [_n("protocol")] = "anytls" })
|
||||
|
||||
o = s:option(ListValue, _n("transport"), translate("Transport"))
|
||||
o:value("tcp", "TCP")
|
||||
o:value("http", "HTTP")
|
||||
|
||||
@ -613,6 +613,7 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
idle_session_check_interval = "30s",
|
||||
idle_session_timeout = "30s",
|
||||
min_idle_session = 5,
|
||||
disable_reuse = (node.anytls_disable_reuse == "1") and true or nil,
|
||||
tls = tls
|
||||
}
|
||||
end
|
||||
|
||||
@ -2153,3 +2153,6 @@ msgstr "Gecko 包大小(最大)"
|
||||
|
||||
msgid "valid time (hh:mm)"
|
||||
msgstr "有效时间(hh:mm)"
|
||||
|
||||
msgid "Disable TLS Reuse"
|
||||
msgstr "禁用 TLS 连接复用"
|
||||
|
||||
@ -459,6 +459,8 @@ local function encode_anytls(node)
|
||||
table.insert(p, "insecure=" .. (o.tls.insecure and "1" or "0"))
|
||||
end
|
||||
|
||||
if node["disable-reuse"] then table.insert(p, "disable_reuse=1") end
|
||||
|
||||
if #p > 0 then
|
||||
link = link .. "?" .. table.concat(p, "&")
|
||||
end
|
||||
|
||||
@ -1580,6 +1580,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
end
|
||||
result.port = port
|
||||
result.tls_allowInsecure = params.allowinsecure or params.insecure
|
||||
result.anytls_disable_reuse = params.disable_reuse
|
||||
end
|
||||
elseif szType == 'naive+https' or szType == 'naive+quic' then
|
||||
if has_singbox then
|
||||
|
||||
1
luci-app-syncthing
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit b7a197a93c549992e9bc47f59d0690b6bb967bcd
|
||||
@ -1,22 +0,0 @@
|
||||
# Copyright (C) 2020 Gyj1109
|
||||
# 适配 OpenWrt 25.12 修改版
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-syncthing
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=3
|
||||
|
||||
LUCI_TITLE:=LuCI support for Syncthing
|
||||
LUCI_PKGARCH:=all
|
||||
# 适配 25.12:确保安装了 syncthing 后,LuCI 界面能正确拉起
|
||||
LUCI_DEPENDS:=+syncthing
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# 明确定义配置文件的归属,这对 25.12 的 apk 管理器非常重要
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/config/syncthing
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
@ -1,2 +0,0 @@
|
||||
# luci-app-syncthing
|
||||
在Potat0000源码基础上进行了汉化优化,官方openwrt23.05.3编译后可使用
|
||||
@ -1,17 +0,0 @@
|
||||
module("luci.controller.syncthing", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/syncthing") then
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin", "services", "syncthing"}, cbi("syncthing"), _("文件同步"), 10).dependent = true
|
||||
entry({"admin", "services", "syncthing", "status"}, call("act_status")).leaf = true
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local e = {}
|
||||
e.running = luci.sys.call("pgrep syncthing >/dev/null") == 0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
@ -1,48 +0,0 @@
|
||||
require("nixio.fs")
|
||||
|
||||
m = Map("syncthing", translate("Syncthing同步工具"))
|
||||
|
||||
m:section(SimpleSection).template = "syncthing/syncthing_status"
|
||||
|
||||
s = m:section(TypedSection, "syncthing")
|
||||
|
||||
s.anonymous = true
|
||||
|
||||
o = s:option(Flag, "enabled", translate("启用"))
|
||||
o.default = 0
|
||||
o.rmempty = false
|
||||
|
||||
gui_address = s:option(Value, "gui_address", translate("GUI访问地址"))
|
||||
gui_address.description = translate("使用0.0.0.0以监控所有访问。")
|
||||
gui_address.default = "http://0.0.0.0:8384"
|
||||
gui_address.placeholder = "http://0.0.0.0:8384"
|
||||
gui_address.rmempty = false
|
||||
|
||||
home = s:option(Value, "home", translate("配置文件目录"))
|
||||
home.description = translate("只有保存在/etc/syncthing中的配置会自动备份!")
|
||||
home.default = "/etc/syncthing"
|
||||
home.placeholder = "/etc/syncthing"
|
||||
home.rmempty = false
|
||||
|
||||
user = s:option(ListValue, "user", translate("用户"))
|
||||
user.description = translate("默认是syncthing,但这可能会导致权限被拒绝。Syncthing官方不建议以root身份运行。")
|
||||
user:value("", translate("syncthing"))
|
||||
for u in luci.util.execi("cat /etc/passwd | cut -d ':' -f1") do
|
||||
user:value(u)
|
||||
end
|
||||
|
||||
macprocs = s:option(Value, "macprocs", translate("线程限制"))
|
||||
macprocs.description = translate("0表示匹配CPU数量(默认),>0表示显式指定并发数。")
|
||||
macprocs.default = "0"
|
||||
macprocs.placeholder = "0"
|
||||
macprocs.datatype = "range(0,32)"
|
||||
macprocs.rmempty = false
|
||||
|
||||
nice = s:option(Value, "nice", translate("优先级"))
|
||||
nice.description = translate("显式指定优先级值。0是最高,19是最低。(暂时不允许设置负值)")
|
||||
nice.default = "19"
|
||||
nice.placeholder = "19"
|
||||
nice.datatype = "range(0,19)"
|
||||
nice.rmempty = false
|
||||
|
||||
return m
|
||||
@ -1,27 +0,0 @@
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
XHR.poll(1, '<%=url([[admin]], [[services]], [[syncthing]], [[status]])%>', null,
|
||||
function (x, data) {
|
||||
var tb = document.getElementById('syncthing_status');
|
||||
if (data && tb) {
|
||||
if (data.running) {
|
||||
var links = '<em><b><font color="green">Syncthing <%:运行中%></font></b></em><input class="btn cbi-button mar-10" type="button" value="<%:打开Syncthing页面%>" onclick="openwebui();" />';
|
||||
tb.innerHTML = links;
|
||||
} else {
|
||||
tb.innerHTML = '<em><b><font color="red">Syncthing <%:未运行%></font></b></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function openwebui(){
|
||||
var url = window.location.host+":<%=luci.sys.exec("uci -q get syncthing.syncthing.gui_address"):match(":[0-9]+"):gsub(":", "")%>";
|
||||
window.open('http://'+url,'target','');
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<p id="syncthing_status">
|
||||
<em><%:正在收集数据...%></em>
|
||||
</p>
|
||||
</fieldset>
|
||||
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
touch /etc/config/syncthing
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@syncthing[-1]
|
||||
add ucitrack syncthing
|
||||
set ucitrack.@syncthing[-1].exec='/etc/init.d/syncthing stop && /etc/init.d/syncthing start'
|
||||
commit ucitrack
|
||||
EOF
|
||||
# remove LuCI cache
|
||||
rm -f /tmp/luci*
|
||||
exit 0
|
||||
@ -1,11 +0,0 @@
|
||||
{
|
||||
"luci-app-syncthing": {
|
||||
"description": "Grant UCI access for luci-app-syncthing",
|
||||
"read": {
|
||||
"uci": [ "syncthing" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "syncthing" ]
|
||||
}
|
||||
}
|
||||
}
|
||||