update 2025-05-10 20:38:54
This commit is contained in:
parent
192b84133d
commit
79f161389e
|
@ -968,24 +968,6 @@ return view.extend({
|
||||||
so.default = so.disabled;
|
so.default = so.disabled;
|
||||||
so.modalonly = true;
|
so.modalonly = true;
|
||||||
|
|
||||||
// Deprecated
|
|
||||||
so = ss.taboption('field_override', widgets.DeviceSelect, 'interface_name', _('Bind interface'),
|
|
||||||
_('Bind outbound interface.</br>') +
|
|
||||||
_('Priority: Proxy Node > Global.') + '</br>' +
|
|
||||||
_('Option is deprecated, please use the same option in proxy node.'));
|
|
||||||
so.multiple = false;
|
|
||||||
so.noaliases = true;
|
|
||||||
so.readonly = true;
|
|
||||||
so.modalonly = true;
|
|
||||||
|
|
||||||
// Deprecated
|
|
||||||
so = ss.taboption('field_override', form.Value, 'routing_mark', _('Routing mark'),
|
|
||||||
_('Priority: Proxy Node > Global.') + '</br>' +
|
|
||||||
_('Option is deprecated, please use the same option in proxy node.'));
|
|
||||||
so.datatype = 'uinteger';
|
|
||||||
so.readonly = true;
|
|
||||||
so.modalonly = true;
|
|
||||||
|
|
||||||
/* Health fields */
|
/* Health fields */
|
||||||
/* Url-test/Fallback/Load-balance */
|
/* Url-test/Fallback/Load-balance */
|
||||||
so = ss.taboption('field_health', form.Value, 'url', _('Health check URL'));
|
so = ss.taboption('field_health', form.Value, 'url', _('Health check URL'));
|
||||||
|
|
|
@ -490,6 +490,7 @@ return view.extend({
|
||||||
so.modalonly = true;
|
so.modalonly = true;
|
||||||
|
|
||||||
so = ss.taboption('field_general', form.Value, 'plugin_opts_host', _('Plugin: ') + _('Host that supports TLS 1.3'));
|
so = ss.taboption('field_general', form.Value, 'plugin_opts_host', _('Plugin: ') + _('Host that supports TLS 1.3'));
|
||||||
|
so.datatype = 'hostname';
|
||||||
so.placeholder = 'cloud.tencent.com';
|
so.placeholder = 'cloud.tencent.com';
|
||||||
so.rmempty = false;
|
so.rmempty = false;
|
||||||
so.depends({plugin: /^(obfs|v2ray-plugin|shadow-tls|restls)$/});
|
so.depends({plugin: /^(obfs|v2ray-plugin|shadow-tls|restls)$/});
|
||||||
|
@ -547,7 +548,6 @@ return view.extend({
|
||||||
so.validate = function(section_id, value) {
|
so.validate = function(section_id, value) {
|
||||||
const type = this.section.getOption('type').formvalue(section_id);
|
const type = this.section.getOption('type').formvalue(section_id);
|
||||||
let tls = this.section.getUIElement(section_id, 'tls').node.querySelector('input');
|
let tls = this.section.getUIElement(section_id, 'tls').node.querySelector('input');
|
||||||
let tls_alpn = this.section.getUIElement(section_id, 'tls_alpn');
|
|
||||||
|
|
||||||
// Force enabled
|
// Force enabled
|
||||||
if (['trojan', 'anytls', 'hysteria', 'hysteria2', 'tuic'].includes(type)) {
|
if (['trojan', 'anytls', 'hysteria', 'hysteria2', 'tuic'].includes(type)) {
|
||||||
|
@ -557,29 +557,6 @@ return view.extend({
|
||||||
tls.disabled = null;
|
tls.disabled = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default alpn
|
|
||||||
if (!`${tls_alpn.getValue()}`) {
|
|
||||||
let def_alpn;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case 'hysteria':
|
|
||||||
case 'hysteria2':
|
|
||||||
case 'tuic':
|
|
||||||
def_alpn = ['h3'];
|
|
||||||
break;
|
|
||||||
case 'vmess':
|
|
||||||
case 'vless':
|
|
||||||
case 'trojan':
|
|
||||||
case 'anytls':
|
|
||||||
def_alpn = ['h2', 'http/1.1'];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
def_alpn = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
tls_alpn.setValue(def_alpn);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
so.depends({type: /^(http|socks5|vmess|vless|trojan|anytls|hysteria|hysteria2|tuic)$/});
|
so.depends({type: /^(http|socks5|vmess|vless|trojan|anytls|hysteria|hysteria2|tuic)$/});
|
||||||
|
@ -599,7 +576,41 @@ return view.extend({
|
||||||
|
|
||||||
so = ss.taboption('field_tls', form.DynamicList, 'tls_alpn', _('TLS ALPN'),
|
so = ss.taboption('field_tls', form.DynamicList, 'tls_alpn', _('TLS ALPN'),
|
||||||
_('List of supported application level protocols, in order of preference.'));
|
_('List of supported application level protocols, in order of preference.'));
|
||||||
|
so.validate = function(section_id, value) {
|
||||||
|
const type = this.section.getOption('type').formvalue(section_id);
|
||||||
|
//const plugin = this.section.getOption('plugin').formvalue(section_id);
|
||||||
|
let tls_alpn = this.section.getUIElement(section_id, 'tls_alpn');
|
||||||
|
|
||||||
|
// Default alpn
|
||||||
|
if (!`${tls_alpn.getValue()}`) {
|
||||||
|
let def_alpn;
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case 'ss':
|
||||||
|
def_alpn = ['h2', 'http/1.1']; // when plugin === 'shadow-tls'
|
||||||
|
break;
|
||||||
|
case 'hysteria':
|
||||||
|
case 'hysteria2':
|
||||||
|
case 'tuic':
|
||||||
|
def_alpn = ['h3'];
|
||||||
|
break;
|
||||||
|
case 'vmess':
|
||||||
|
case 'vless':
|
||||||
|
case 'trojan':
|
||||||
|
case 'anytls':
|
||||||
|
def_alpn = ['h2', 'http/1.1'];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
def_alpn = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
tls_alpn.setValue(def_alpn);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
so.depends({tls: '1', type: /^(vmess|vless|trojan|anytls|hysteria|hysteria2|tuic)$/});
|
so.depends({tls: '1', type: /^(vmess|vless|trojan|anytls|hysteria|hysteria2|tuic)$/});
|
||||||
|
so.depends({type: 'ss', plugin: 'shadow-tls'});
|
||||||
so.modalonly = true;
|
so.modalonly = true;
|
||||||
|
|
||||||
so = ss.taboption('field_tls', form.Value, 'tls_fingerprint', _('Cert fingerprint'),
|
so = ss.taboption('field_tls', form.Value, 'tls_fingerprint', _('Cert fingerprint'),
|
||||||
|
|
|
@ -259,6 +259,34 @@ return view.extend({
|
||||||
o.depends('type', 'vmess');
|
o.depends('type', 'vmess');
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
|
|
||||||
|
/* Plugin fields */
|
||||||
|
o = s.taboption('field_general', form.ListValue, 'plugin', _('Plugin'));
|
||||||
|
o.value('', _('none'));
|
||||||
|
o.value('shadow-tls', _('shadow-tls'));
|
||||||
|
o.depends('type', 'shadowsocks');
|
||||||
|
o.modalonly = true;
|
||||||
|
|
||||||
|
o = s.taboption('field_general', form.Value, 'plugin_opts_handshake_dest', _('Plugin: ') + _('Handshake target that supports TLS 1.3'));
|
||||||
|
o.datatype = 'hostport';
|
||||||
|
o.placeholder = 'cloud.tencent.com:443';
|
||||||
|
o.rmempty = false;
|
||||||
|
o.depends({plugin: 'shadow-tls'});
|
||||||
|
o.modalonly = true;
|
||||||
|
|
||||||
|
o = s.taboption('field_general', form.Value, 'plugin_opts_thetlspassword', _('Plugin: ') + _('Password'));
|
||||||
|
o.password = true;
|
||||||
|
o.rmempty = false;
|
||||||
|
o.depends({plugin: 'shadow-tls'});
|
||||||
|
o.modalonly = true;
|
||||||
|
|
||||||
|
o = s.taboption('field_general', form.ListValue, 'plugin_opts_shadowtls_version', _('Plugin: ') + _('Version'));
|
||||||
|
o.value('1', _('v1'));
|
||||||
|
o.value('2', _('v2'));
|
||||||
|
o.value('3', _('v3'));
|
||||||
|
o.default = '3';
|
||||||
|
o.depends({plugin: 'shadow-tls'});
|
||||||
|
o.modalonly = true;
|
||||||
|
|
||||||
/* Extra fields */
|
/* Extra fields */
|
||||||
o = s.taboption('field_general', form.Flag, 'udp', _('UDP'));
|
o = s.taboption('field_general', form.Flag, 'udp', _('UDP'));
|
||||||
o.default = o.disabled;
|
o.default = o.disabled;
|
||||||
|
|
|
@ -993,6 +993,10 @@ msgstr ""
|
||||||
msgid "Handle domain"
|
msgid "Handle domain"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/server.js:269
|
||||||
|
msgid "Handshake target that supports TLS 1.3"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/client.js:723
|
#: htdocs/luci-static/resources/view/fchomo/client.js:723
|
||||||
#: htdocs/luci-static/resources/view/fchomo/node.js:1018
|
#: htdocs/luci-static/resources/view/fchomo/node.js:1018
|
||||||
msgid "Health check URL"
|
msgid "Health check URL"
|
||||||
|
|
|
@ -1013,6 +1013,10 @@ msgstr ""
|
||||||
msgid "Handle domain"
|
msgid "Handle domain"
|
||||||
msgstr "处理域名"
|
msgstr "处理域名"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/server.js:269
|
||||||
|
msgid "Handshake target that supports TLS 1.3"
|
||||||
|
msgstr "握手目标 (支援 TLS 1.3)"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/client.js:723
|
#: htdocs/luci-static/resources/view/fchomo/client.js:723
|
||||||
#: htdocs/luci-static/resources/view/fchomo/node.js:1018
|
#: htdocs/luci-static/resources/view/fchomo/node.js:1018
|
||||||
msgid "Health check URL"
|
msgid "Health check URL"
|
||||||
|
|
|
@ -1013,6 +1013,10 @@ msgstr ""
|
||||||
msgid "Handle domain"
|
msgid "Handle domain"
|
||||||
msgstr "處理網域"
|
msgstr "處理網域"
|
||||||
|
|
||||||
|
#: htdocs/luci-static/resources/view/fchomo/server.js:269
|
||||||
|
msgid "Handshake target that supports TLS 1.3"
|
||||||
|
msgstr "握手目標 (支援 TLS 1.3)"
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/fchomo/client.js:723
|
#: htdocs/luci-static/resources/view/fchomo/client.js:723
|
||||||
#: htdocs/luci-static/resources/view/fchomo/node.js:1018
|
#: htdocs/luci-static/resources/view/fchomo/node.js:1018
|
||||||
msgid "Health check URL"
|
msgid "Health check URL"
|
||||||
|
|
|
@ -248,6 +248,7 @@ start_service() {
|
||||||
|
|
||||||
procd_set_param command /bin/sh
|
procd_set_param command /bin/sh
|
||||||
procd_append_param command -c "'$PROG' -d '$HM_DIR' -f '$RUN_DIR/mihomo-c.yaml' >> '$RUN_DIR/mihomo-c.log' 2>&1"
|
procd_append_param command -c "'$PROG' -d '$HM_DIR' -f '$RUN_DIR/mihomo-c.yaml' >> '$RUN_DIR/mihomo-c.log' 2>&1"
|
||||||
|
procd_set_param env SAFE_PATHS="$RUN_DIR/" # The syntax of this environment variable is the same as the PATH environment variable parsing rules of this operating system (i.e., semicolon-separated under Windows and colon-separated under other systems)
|
||||||
|
|
||||||
# Only supports `Global`` and does not support `Proxy Group` and `Proxy Node`
|
# Only supports `Global`` and does not support `Proxy Group` and `Proxy Node`
|
||||||
local bind_ifname
|
local bind_ifname
|
||||||
|
|
|
@ -566,7 +566,7 @@ uci.foreach(uciconf, ucinode, (cfg) => {
|
||||||
mode: cfg.plugin_opts_obfsmode,
|
mode: cfg.plugin_opts_obfsmode,
|
||||||
host: cfg.plugin_opts_host,
|
host: cfg.plugin_opts_host,
|
||||||
password: cfg.plugin_opts_thetlspassword,
|
password: cfg.plugin_opts_thetlspassword,
|
||||||
version: cfg.plugin_opts_shadowtls_version,
|
version: strToInt(cfg.plugin_opts_shadowtls_version),
|
||||||
"version-hint": cfg.plugin_opts_restls_versionhint,
|
"version-hint": cfg.plugin_opts_restls_versionhint,
|
||||||
"restls-script": cfg.plugin_opts_restls_script
|
"restls-script": cfg.plugin_opts_restls_script
|
||||||
} : null,
|
} : null,
|
||||||
|
|
|
@ -102,6 +102,26 @@ uci.foreach(uciconf, uciserver, (cfg) => {
|
||||||
/* AnyTLS */
|
/* AnyTLS */
|
||||||
"padding-scheme": cfg.anytls_padding_scheme,
|
"padding-scheme": cfg.anytls_padding_scheme,
|
||||||
|
|
||||||
|
/* Plugin fields */
|
||||||
|
...(cfg.plugin ? {
|
||||||
|
// shadow-tls
|
||||||
|
"shadow-tls": cfg.plugin === 'shadow-tls' ? {
|
||||||
|
enable: true,
|
||||||
|
version: strToInt(cfg.plugin_opts_shadowtls_version),
|
||||||
|
...(strToInt(cfg.plugin_opts_shadowtls_version) >= 3 ? {
|
||||||
|
users: [
|
||||||
|
{
|
||||||
|
name: 1,
|
||||||
|
password: cfg.plugin_opts_thetlspassword
|
||||||
|
}
|
||||||
|
],
|
||||||
|
} : { password: cfg.plugin_opts_thetlspassword }),
|
||||||
|
handshake: {
|
||||||
|
dest: cfg.plugin_opts_handshake_dest
|
||||||
|
},
|
||||||
|
} : null
|
||||||
|
} : {}),
|
||||||
|
|
||||||
/* Extra fields */
|
/* Extra fields */
|
||||||
udp: strToBool(cfg.udp),
|
udp: strToBool(cfg.udp),
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=mihomo
|
PKG_NAME:=mihomo
|
||||||
PKG_VERSION:=1.19.5
|
PKG_VERSION:=1.19.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/metacubex/mihomo/tar.gz/v$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/metacubex/mihomo/tar.gz/v$(PKG_VERSION)?
|
||||||
PKG_HASH:=2c40a5b53cc500b846cf966f21eeacea070a4377833e7dff07b63a53f7213db8
|
PKG_HASH:=dec17f340decaa7971117ba908e39e4a9e311e8012dad9200bd517bdd405f1cf
|
||||||
|
|
||||||
PKG_MAINTAINER:=Anya Lin <hukk1996@gmail.com>
|
PKG_MAINTAINER:=Anya Lin <hukk1996@gmail.com>
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
Loading…
Reference in New Issue