mirror of https://github.com/kenzok8/small.git
update 2025-01-05 20:22:38
This commit is contained in:
parent
03680b95da
commit
1eba3a16e1
|
@ -758,6 +758,25 @@ return view.extend({
|
||||||
so.depends('routing_mode', 'bypass_cn');
|
so.depends('routing_mode', 'bypass_cn');
|
||||||
so.depends('routing_mode', 'routing_gfw');
|
so.depends('routing_mode', 'routing_gfw');
|
||||||
|
|
||||||
|
so = ss.taboption('routing_control', form.ListValue, 'routing_dscp_mode', _('Routing DSCP'));
|
||||||
|
so.value('', _('All allowed'));
|
||||||
|
so.value('bypass_dscp', _('Bypass DSCP'));
|
||||||
|
so.value('routing_dscp', _('Routing DSCP'));
|
||||||
|
|
||||||
|
so = ss.taboption('routing_control', form.Value, 'routing_dscp_list', _('DSCP list'));
|
||||||
|
so.placeholder = '0,10,12,14,63';
|
||||||
|
so.validate = function(section_id, value) {
|
||||||
|
if (!value)
|
||||||
|
return true;
|
||||||
|
else if (value.match('^(6[0-3]|[1-5]?[0-9])(,(6[0-3]|[1-5]?[0-9]))*$') === null)
|
||||||
|
return _('Expecting: %s').format(_('One or more numbers in the range 0-63 separated by commas'));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
so.rmempty = false;
|
||||||
|
so.depends('routing_dscp_mode', 'bypass_dscp');
|
||||||
|
so.depends('routing_dscp_mode', 'routing_dscp');
|
||||||
|
|
||||||
/* Custom Direct list */
|
/* Custom Direct list */
|
||||||
ss.tab('direct_list', _('Custom Direct List'));
|
ss.tab('direct_list', _('Custom Direct List'));
|
||||||
|
|
||||||
|
|
|
@ -250,6 +250,10 @@ msgstr ""
|
||||||
msgid "Bypass CN"
|
msgid "Bypass CN"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:763
|
||||||
|
msgid "Bypass DSCP"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:552
|
#: htdocs/luci-static/resources/view/fchomo/global.js:552
|
||||||
msgid "CORS Allow origins"
|
msgid "CORS Allow origins"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -432,6 +436,10 @@ msgstr ""
|
||||||
msgid "DNS settings"
|
msgid "DNS settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:766
|
||||||
|
msgid "DSCP list"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:314
|
#: htdocs/luci-static/resources/view/fchomo/global.js:314
|
||||||
msgid "Dashboard version"
|
msgid "Dashboard version"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1437,6 +1445,10 @@ msgstr ""
|
||||||
msgid "Obfuscate type"
|
msgid "Obfuscate type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:772
|
||||||
|
msgid "One or more numbers in the range 0-63 separated by commas"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:658
|
#: htdocs/luci-static/resources/view/fchomo/global.js:658
|
||||||
msgid "Only process traffic from specific interfaces. Leave empty for all."
|
msgid "Only process traffic from specific interfaces. Leave empty for all."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1799,6 +1811,11 @@ msgstr ""
|
||||||
msgid "Routing Control"
|
msgid "Routing Control"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:761
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:764
|
||||||
|
msgid "Routing DSCP"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:747
|
#: htdocs/luci-static/resources/view/fchomo/global.js:747
|
||||||
msgid "Routing GFW"
|
msgid "Routing GFW"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -258,6 +258,10 @@ msgstr "启动 DNS 服务器 (节点)"
|
||||||
msgid "Bypass CN"
|
msgid "Bypass CN"
|
||||||
msgstr "绕过 CN 流量"
|
msgstr "绕过 CN 流量"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:763
|
||||||
|
msgid "Bypass DSCP"
|
||||||
|
msgstr "绕过 DSCP"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:552
|
#: htdocs/luci-static/resources/view/fchomo/global.js:552
|
||||||
msgid "CORS Allow origins"
|
msgid "CORS Allow origins"
|
||||||
msgstr "CORS 允许的来源"
|
msgstr "CORS 允许的来源"
|
||||||
|
@ -440,6 +444,10 @@ msgstr "DNS 服务器"
|
||||||
msgid "DNS settings"
|
msgid "DNS settings"
|
||||||
msgstr "DNS 设置"
|
msgstr "DNS 设置"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:766
|
||||||
|
msgid "DSCP list"
|
||||||
|
msgstr "DSCP 列表"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:314
|
#: htdocs/luci-static/resources/view/fchomo/global.js:314
|
||||||
msgid "Dashboard version"
|
msgid "Dashboard version"
|
||||||
msgstr "面板版本"
|
msgstr "面板版本"
|
||||||
|
@ -1459,6 +1467,10 @@ msgstr "混淆密码"
|
||||||
msgid "Obfuscate type"
|
msgid "Obfuscate type"
|
||||||
msgstr "混淆类型"
|
msgstr "混淆类型"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:772
|
||||||
|
msgid "One or more numbers in the range 0-63 separated by commas"
|
||||||
|
msgstr "0-63 范围内的一个或多个数字,以逗号分隔"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:658
|
#: htdocs/luci-static/resources/view/fchomo/global.js:658
|
||||||
msgid "Only process traffic from specific interfaces. Leave empty for all."
|
msgid "Only process traffic from specific interfaces. Leave empty for all."
|
||||||
msgstr "只处理来自指定接口的流量。留空表示全部。"
|
msgstr "只处理来自指定接口的流量。留空表示全部。"
|
||||||
|
@ -1822,6 +1834,11 @@ msgstr "Restls 剧本"
|
||||||
msgid "Routing Control"
|
msgid "Routing Control"
|
||||||
msgstr "路由控制"
|
msgstr "路由控制"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:761
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:764
|
||||||
|
msgid "Routing DSCP"
|
||||||
|
msgstr "路由 DSCP"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:747
|
#: htdocs/luci-static/resources/view/fchomo/global.js:747
|
||||||
msgid "Routing GFW"
|
msgid "Routing GFW"
|
||||||
msgstr "路由 GFW 流量"
|
msgstr "路由 GFW 流量"
|
||||||
|
|
|
@ -258,6 +258,10 @@ msgstr "啟動 DNS 伺服器 (節點)"
|
||||||
msgid "Bypass CN"
|
msgid "Bypass CN"
|
||||||
msgstr "繞過 CN 流量"
|
msgstr "繞過 CN 流量"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:763
|
||||||
|
msgid "Bypass DSCP"
|
||||||
|
msgstr "繞過 DSCP"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:552
|
#: htdocs/luci-static/resources/view/fchomo/global.js:552
|
||||||
msgid "CORS Allow origins"
|
msgid "CORS Allow origins"
|
||||||
msgstr "CORS 允許的來源"
|
msgstr "CORS 允許的來源"
|
||||||
|
@ -440,6 +444,10 @@ msgstr "DNS 伺服器"
|
||||||
msgid "DNS settings"
|
msgid "DNS settings"
|
||||||
msgstr "DNS 設定"
|
msgstr "DNS 設定"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:766
|
||||||
|
msgid "DSCP list"
|
||||||
|
msgstr "DSCP 清單"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:314
|
#: htdocs/luci-static/resources/view/fchomo/global.js:314
|
||||||
msgid "Dashboard version"
|
msgid "Dashboard version"
|
||||||
msgstr "面板版本"
|
msgstr "面板版本"
|
||||||
|
@ -1195,7 +1203,7 @@ msgstr "有時效能較好。"
|
||||||
#: htdocs/luci-static/resources/view/fchomo/node.js:532
|
#: htdocs/luci-static/resources/view/fchomo/node.js:532
|
||||||
#: htdocs/luci-static/resources/view/fchomo/server.js:332
|
#: htdocs/luci-static/resources/view/fchomo/server.js:332
|
||||||
msgid "List of supported application level protocols, in order of preference."
|
msgid "List of supported application level protocols, in order of preference."
|
||||||
msgstr "支援的應用層協議協商列表,依序排列。"
|
msgstr "支援的應用層協議協商清單,依序排列。"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/server.js:118
|
#: htdocs/luci-static/resources/view/fchomo/server.js:118
|
||||||
msgid "Listen address"
|
msgid "Listen address"
|
||||||
|
@ -1459,6 +1467,10 @@ msgstr "混淆密碼"
|
||||||
msgid "Obfuscate type"
|
msgid "Obfuscate type"
|
||||||
msgstr "混淆類型"
|
msgstr "混淆類型"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:772
|
||||||
|
msgid "One or more numbers in the range 0-63 separated by commas"
|
||||||
|
msgstr "0-63 範圍內的一個或多個數字,以逗號分隔"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:658
|
#: htdocs/luci-static/resources/view/fchomo/global.js:658
|
||||||
msgid "Only process traffic from specific interfaces. Leave empty for all."
|
msgid "Only process traffic from specific interfaces. Leave empty for all."
|
||||||
msgstr "只處理來自指定介面的流量。留空表示全部。"
|
msgstr "只處理來自指定介面的流量。留空表示全部。"
|
||||||
|
@ -1822,6 +1834,11 @@ msgstr "Restls 劇本"
|
||||||
msgid "Routing Control"
|
msgid "Routing Control"
|
||||||
msgstr "路由控制"
|
msgstr "路由控制"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:761
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/global.js:764
|
||||||
|
msgid "Routing DSCP"
|
||||||
|
msgstr "路由 DSCP"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/global.js:747
|
#: htdocs/luci-static/resources/view/fchomo/global.js:747
|
||||||
msgid "Routing GFW"
|
msgid "Routing GFW"
|
||||||
msgstr "路由 GFW 流量"
|
msgstr "路由 GFW 流量"
|
||||||
|
|
|
@ -77,12 +77,14 @@
|
||||||
const dnsmasq_hijacked = uci.get('dhcp', '@dnsmasq[0]', 'dns_redirect') || '0',
|
const dnsmasq_hijacked = uci.get('dhcp', '@dnsmasq[0]', 'dns_redirect') || '0',
|
||||||
dnsmasq_port = uci.get('dhcp', '@dnsmasq[0]', 'port') || '53';
|
dnsmasq_port = uci.get('dhcp', '@dnsmasq[0]', 'port') || '53';
|
||||||
|
|
||||||
let client_enabled, routing_tcpport, routing_udpport, routing_mode, routing_domain;
|
let client_enabled, routing_tcpport, routing_udpport, routing_mode, routing_domain, routing_dscp_mode, routing_dscp_list;
|
||||||
client_enabled = uci.get(cfgname, 'routing', 'client_enabled') || '0',
|
client_enabled = uci.get(cfgname, 'routing', 'client_enabled') || '0',
|
||||||
routing_tcpport = uci.get(cfgname, 'routing', 'routing_tcpport') || null;
|
routing_tcpport = uci.get(cfgname, 'routing', 'routing_tcpport') || null;
|
||||||
routing_udpport = uci.get(cfgname, 'routing', 'routing_udpport') || null;
|
routing_udpport = uci.get(cfgname, 'routing', 'routing_udpport') || null;
|
||||||
routing_mode = uci.get(cfgname, 'routing', 'routing_mode') || null;
|
routing_mode = uci.get(cfgname, 'routing', 'routing_mode') || null;
|
||||||
routing_domain = uci.get(cfgname, 'routing', 'routing_domain') || '0';
|
routing_domain = uci.get(cfgname, 'routing', 'routing_domain') || '0';
|
||||||
|
routing_dscp_mode = uci.get(cfgname, 'routing', 'routing_dscp_mode') || null;
|
||||||
|
routing_dscp_list = uci.get(cfgname, 'routing', 'routing_dscp_list') || null;
|
||||||
|
|
||||||
if (routing_tcpport === 'common')
|
if (routing_tcpport === 'common')
|
||||||
routing_tcpport = common_tcpport;
|
routing_tcpport = common_tcpport;
|
||||||
|
@ -184,6 +186,18 @@ chain {{ inchain }} {
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif /* routing_mode */ %}
|
{% endif /* routing_mode */ %}
|
||||||
|
|
||||||
|
{% if (routing_dscp_mode === 'routing_dscp'): %}
|
||||||
|
ip dscp != @routing_dscp_list counter return
|
||||||
|
{% if (global_ipv6 === '1'): %}
|
||||||
|
ip6 dscp != @routing_dscp_list counter return
|
||||||
|
{% endif %}
|
||||||
|
{% elif (routing_dscp_mode === 'bypass_dscp'): %}
|
||||||
|
ip dscp @bypass_dscp_list counter return
|
||||||
|
{% if (global_ipv6 === '1'): %}
|
||||||
|
ip6 dscp @bypass_dscp_list counter return
|
||||||
|
{% endif %}
|
||||||
|
{% endif /* routing_dscp_mode */ %}
|
||||||
|
|
||||||
counter goto {{ outchain }}
|
counter goto {{ outchain }}
|
||||||
}
|
}
|
||||||
{% endfunction %}
|
{% endfunction %}
|
||||||
|
@ -329,6 +343,23 @@ table inet fchomo {
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif /* routing_mode */ %}
|
{% endif /* routing_mode */ %}
|
||||||
|
|
||||||
|
{#- Routing DSCP #}
|
||||||
|
{% if (match(routing_dscp_mode, /bypass_dscp/)): %}
|
||||||
|
set bypass_dscp_list {
|
||||||
|
type dscp
|
||||||
|
flags interval
|
||||||
|
auto-merge
|
||||||
|
elements = { {{ join(', ', split(routing_dscp_list, ',')) }} }
|
||||||
|
}
|
||||||
|
{% elif (match(routing_dscp_mode, /routing_dscp/)): %}
|
||||||
|
set routing_dscp_list {
|
||||||
|
type dscp
|
||||||
|
flags interval
|
||||||
|
auto-merge
|
||||||
|
elements = { {{ join(', ', split(routing_dscp_list, ',')) }} }
|
||||||
|
}
|
||||||
|
{% endif /* routing_dscp_mode */ %}
|
||||||
|
|
||||||
{#- Routing port #}
|
{#- Routing port #}
|
||||||
{% if (routing_tcpport): %}
|
{% if (routing_tcpport): %}
|
||||||
set tcp_routing_port {
|
set tcp_routing_port {
|
||||||
|
|
|
@ -76,6 +76,8 @@ const listen_interfaces = uci.get(uciconf, uciroute, 'listen_interfaces') || nul
|
||||||
routing_udpport = uci.get(uciconf, uciroute, 'routing_udpport') || null,
|
routing_udpport = uci.get(uciconf, uciroute, 'routing_udpport') || null,
|
||||||
routing_mode = uci.get(uciconf, uciroute, 'routing_mode') || null,
|
routing_mode = uci.get(uciconf, uciroute, 'routing_mode') || null,
|
||||||
routing_domain = strToBool(uci.get(uciconf, uciroute, 'routing_domain')),
|
routing_domain = strToBool(uci.get(uciconf, uciroute, 'routing_domain')),
|
||||||
|
routing_dscp_mode = uci.get(uciconf, uciroute, 'routing_dscp_mode') || null,
|
||||||
|
routing_dscp_list = uci.get(uciconf, uciroute, 'routing_dscp_list') || null,
|
||||||
tposh = 'c2luZ2JveA';
|
tposh = 'c2luZ2JveA';
|
||||||
|
|
||||||
/* WAN DNS server array */
|
/* WAN DNS server array */
|
||||||
|
|
Loading…
Reference in New Issue