⛄ Sync 2026-07-31 00:04:03

This commit is contained in:
github-actions[bot] committed 2026-07-31 00:04:03 +08:00
1 parent 0c75f44d08
commit 57bd5de698
13 files changed
+165 -96

No files matched your search

@@ -15,6 +15,7 @@ const RE_PLACEHOLDER_URL = /(['"])(?:(?:https?|https-file|file):\/\/[^'"]*?(?:ex
const DEFAULT_TEMPLATE =
'# luci-app-daede 默认配置:把 subscription 里的占位链接换成你的机场订阅,保存即可运行。\n' +
'global {\n' +
' # 端口与网卡:lan_interface 填内网桥(通常 br-lan),wan_interface 保持 auto 即可。\n' +
' tproxy_port: 12345\n' +
' tproxy_port_protect: true\n' +
' so_mark_from_dae: 0\n' +
@@ -35,6 +36,7 @@ const DEFAULT_TEMPLATE =
'}\n' +
'\n' +
'dns {\n' +
' # 国内域名走 cndns 解析,其余走 fallbackdns,避免 DNS 污染。\n' +
' ipversion_prefer: 4\n' +
' response_ttl: 0\n' +
' upstream {\n' +
@@ -50,6 +52,7 @@ const DEFAULT_TEMPLATE =
'}\n' +
'\n' +
'group {\n' +
' # 节点分组:filter 决定用订阅里的哪些节点,policy 决定怎么选(min_moving_avg = 自动挑最快)。\n' +
' proxy {\n' +
' filter: subtag(my_airport)\n' +
' policy: min_moving_avg\n' +
@@ -57,6 +60,8 @@ const DEFAULT_TEMPLATE =
'}\n' +
'\n' +
'routing {\n' +
' # 分流规则:从上往下匹配,命中即停,最后由 fallback 兜底。\n' +
' # 想让某个网站直连,在 fallback 之前加一行,例如:domain(example.com) -> direct\n' +
' pname(NetworkManager) -> direct\n' +
' dip(224.0.0.0/3) -> direct\n' +
' dip(255.255.255.255/32) -> direct\n' +
@@ -577,8 +582,12 @@ function renderDaeEditor() {
function syncHL() {
hlCode.innerHTML = highlightDae(textarea.value) + '\n';
hlPre.scrollTop = textarea.scrollTop;
hlPre.scrollLeft = textarea.scrollLeft;
}
textarea.addEventListener('scroll', function() { hlPre.scrollTop = textarea.scrollTop; });
textarea.addEventListener('scroll', function() {
hlPre.scrollTop = textarea.scrollTop;
hlPre.scrollLeft = textarea.scrollLeft;
});
const save = E('button', { 'class': 'cbi-button cbi-button-positive' }, _('Save manual config'));
const init = E('button', { 'class': 'cbi-button cbi-button-action' }, _('Load default config'));
const status = E('span', { 'class': 'dd-editor-status' }, '');
@@ -116,6 +116,7 @@ const CSS = [
/* keep selected text transparent too — else the browser force-colors it and
it ghosts over the highlight pre underneath */
'.dd-edit-wrap .dd-editor-hl::selection{background:rgba(56,134,161,.25);color:transparent}',
'@media screen and (max-device-width:600px){.dd-edit-wrap .dd-editor,.dd-edit-wrap .dd-hl,.dd-edit-wrap .dd-hl code{font-size:16px}}',
'.dh-c{color:#8a919a;font-style:italic}',
'.dh-s{color:#2a8a4a}',
'.dh-k{color:#9a3fb5;font-weight:600}',