mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-27 02:11:19 +08:00
🍕 Sync 2026-07-20 20:45:16
This commit is contained in:
parent
4dbfea7b92
commit
f66a44b25f
@ -161,14 +161,14 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
/* hm.validateAuth */
|
||||
o = s.taboption('field_general', form.Value, 'username', _('Username'));
|
||||
o.validate = hm.validateAuthUsername;
|
||||
o.depends({type: /^(http|socks|mixed|mieru|trojan|anytls|hysteria2|shadowquic|trusttunnel)$/});
|
||||
o.depends({type: /^(http|socks|mixed|mieru|trojan|anytls|hysteria2|trusttunnel)$/});
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_general', hm.GenValue, 'password', _('Password'));
|
||||
o.password = true;
|
||||
o.validate = hm.validateAuthPassword;
|
||||
o.rmempty = false;
|
||||
o.depends({type: /^(http|socks|mixed|mieru|trojan|anytls|hysteria2|shadowquic|trusttunnel)$/, username: /.+/});
|
||||
o.depends({type: /^(http|socks|mixed|mieru|trojan|anytls|hysteria2|trusttunnel)$/, username: /.+/});
|
||||
o.depends({type: /^(tuic)$/, uuid: /.+/});
|
||||
o.modalonly = true;
|
||||
|
||||
@ -545,8 +545,7 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
/* ShadowQUIC fields */
|
||||
o = s.taboption('field_general', form.DynamicList, 'shadowquic_quic_versions', _('QUIC versions'),
|
||||
_('Default version, Support %s.').format('v1/v2'));
|
||||
o.default = 'v1';
|
||||
o.rmempty = false;
|
||||
o.placeholder = 'v1';
|
||||
o.depends('type', 'shadowquic');
|
||||
o.modalonly = true;
|
||||
|
||||
@ -555,6 +554,35 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
o.depends('type', 'shadowquic');
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_general', form.Value, 'shadowquic_cwnd', _('Initial congestion window size'));
|
||||
o.datatype = 'uinteger';
|
||||
o.placeholder = '10';
|
||||
o.depends('type', 'shadowquic');
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_general', form.Value, 'shadowquic_max_datagram_frame_size', _('Max datagram frame size'));
|
||||
o.datatype = 'uinteger';
|
||||
o.placeholder = '1400';
|
||||
o.depends('type', 'shadowquic');
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_general', form.Value, 'shadowquic_recv_window_conn', _('Stream-level receive window size'));
|
||||
o.datatype = 'uinteger';
|
||||
o.placeholder = '0';
|
||||
o.depends('type', 'shadowquic');
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_general', form.Value, 'shadowquic_recv_window', _('Connection-level receive window size'));
|
||||
o.datatype = 'uinteger';
|
||||
o.placeholder = '0';
|
||||
o.depends('type', 'shadowquic');
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_general', form.Flag, 'shadowquic_mtu_discovery', _('Path MTU Discovery'));
|
||||
o.default = o.enabled;
|
||||
o.depends('type', 'shadowquic');
|
||||
o.modalonly = true;
|
||||
|
||||
/* TrustTunnel fields */
|
||||
|
||||
/* Tunnel fields */
|
||||
@ -659,7 +687,7 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
' / ' + _('JLS'));
|
||||
}
|
||||
if (['vmess', 'vless', 'trojan', 'anytls'].includes(type) && !['shadow-tls', 'restls', 'jls'].includes(value)) {
|
||||
return _('Expecting: only support %s.').format(_('ShadowTLS') +
|
||||
return _('Expecting: Only support %s.').format(_('ShadowTLS') +
|
||||
' / ' + _('Restls') +
|
||||
' / ' + _('JLS'));
|
||||
}
|
||||
@ -676,13 +704,6 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
o.depends('plugin_type', 'obfs');
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_plugin', form.Value, 'plugin_opts_host', _('Host that supports TLS 1.3'));
|
||||
o.datatype = 'hostname';
|
||||
o.placeholder = 'cloud.tencent.com';
|
||||
o.rmempty = false;
|
||||
o.depends({plugin_type: 'obfs', type: 'snell'});
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_plugin', form.Value, 'plugin_opts_handshake_dest', _('Handshake target that supports TLS 1.3'));
|
||||
o.datatype = 'hostport';
|
||||
o.placeholder = 'cloud.tencent.com:443';
|
||||
@ -691,16 +712,26 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
o.depends({type: 'shadowquic'});
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_plugin', form.Value, 'plugin_opts_host', _('Host that supports TLS 1.3'));
|
||||
o.datatype = 'hostname';
|
||||
o.placeholder = 'cloud.tencent.com';
|
||||
o.depends({type: 'snell', plugin_type: 'obfs'});
|
||||
o.depends({plugin_type: 'jls'});
|
||||
o.depends({type: 'shadowquic'});
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_plugin', form.Value, 'plugin_opts_thetlsusername', _('Username'));
|
||||
o.validate = hm.validateAuthUsername;
|
||||
o.rmempty = false;
|
||||
o.depends({plugin_type: 'jls'});
|
||||
o.depends({type: 'shadowquic'});
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_plugin', hm.GenValue, 'plugin_opts_thetlspassword', _('Password'));
|
||||
o.password = true;
|
||||
o.rmempty = false;
|
||||
o.depends({plugin_type: /^(shadow-tls|restls|jls)$/});
|
||||
o.depends({type: 'shadowquic'});
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_plugin', form.ListValue, 'plugin_opts_shadowtls_version', _('Version'));
|
||||
@ -738,7 +769,7 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
o = s.taboption('field_plugin', form.Value, 'plugin_opts_rate_limit', _('Forwarding rate limit'),
|
||||
_('In bps. 0 means no speed limit.'));
|
||||
o.datatype = 'uinteger';
|
||||
o.depends({plugin_type: 'jls'});
|
||||
o.depends({plugin_type: /^(restls|jls)$/});
|
||||
o.depends({type: 'shadowquic'});
|
||||
o.modalonly = true;
|
||||
|
||||
@ -1035,12 +1066,6 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
o.depends({type: /^(vless|trojan|anytls)$/});
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_tls', form.Value, 'tls_sni', _('TLS SNI'),
|
||||
_('Hostname that the client attempts to connect to at the start of the TLS handshake process.'));
|
||||
o.depends({tls: '1', type: 'shadowquic'});
|
||||
o.depends('plugin_type', 'jls');
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_tls', form.DynamicList, 'tls_alpn', _('TLS ALPN'),
|
||||
_('List of supported application level protocols, in order of preference.'));
|
||||
o.validate = function(section_id, value) {
|
||||
@ -1086,7 +1111,7 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
return true;
|
||||
}
|
||||
o.depends('tls', '1');
|
||||
o.depends({type: 'shadowsocks', plugin_type: 'jls'});
|
||||
o.depends({plugin_type: 'jls'});
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption('field_tls', form.Value, 'tls_cert_path', _('Certificate path'),
|
||||
@ -1214,7 +1239,7 @@ function renderListeners(s, uciconfig, isClient) {
|
||||
value = this.formvalue(section_id);
|
||||
|
||||
if (value == 1 && ['shadow-tls', 'restls', 'jls'].includes(plugin_type))
|
||||
return _('Expecting: cannot be enabled when %s is enabled.').format(_('ShadowTLS') +
|
||||
return _('Expecting: Cannot be enabled when %s is enabled.').format(_('ShadowTLS') +
|
||||
' / ' + _('Restls') +
|
||||
' / ' + _('JLS'));
|
||||
|
||||
|
||||
@ -304,13 +304,13 @@ return view.extend({
|
||||
/* hm.validateAuth */
|
||||
so = ss.taboption('field_general', form.Value, 'username', _('Username'));
|
||||
so.validate = hm.validateAuthUsername;
|
||||
so.depends({type: /^(http|socks5|mieru|shadowquic|trusttunnel|ssh)$/});
|
||||
so.depends({type: /^(http|socks5|mieru|trusttunnel|ssh)$/});
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_general', form.Value, 'password', _('Password'));
|
||||
so.password = true;
|
||||
so.validate = hm.validateAuthPassword;
|
||||
so.depends({type: /^(http|socks5|mieru|trojan|anytls|tuic|hysteria2|shadowquic|trusttunnel|ssh)$/});
|
||||
so.depends({type: /^(http|socks5|mieru|trojan|anytls|tuic|hysteria2|trusttunnel|ssh)$/});
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_general', hm.TextValue, 'headers', _('HTTP header'));
|
||||
@ -720,8 +720,7 @@ return view.extend({
|
||||
/* ShadowQUIC fields */
|
||||
so = ss.taboption('field_general', form.DynamicList, 'shadowquic_quic_versions', _('QUIC versions'),
|
||||
_('Support %s, default %s.').format('v1/v2', 'v1'));
|
||||
so.default = 'v1';
|
||||
so.rmempty = false;
|
||||
so.placeholder = 'v1';
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
@ -742,6 +741,35 @@ return view.extend({
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_general', form.Value, 'shadowquic_cwnd', _('Initial congestion window size'));
|
||||
so.datatype = 'uinteger';
|
||||
so.placeholder = '32';
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_general', form.Value, 'shadowquic_max_datagram_frame_size', _('Max datagram frame size'));
|
||||
so.datatype = 'uinteger';
|
||||
so.placeholder = '1400';
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_general', form.Value, 'shadowquic_recv_window_conn', _('Stream-level receive window size'));
|
||||
so.datatype = 'uinteger';
|
||||
so.placeholder = '0';
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_general', form.Value, 'shadowquic_recv_window', _('Connection-level receive window size'));
|
||||
so.datatype = 'uinteger';
|
||||
so.placeholder = '0';
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_general', form.Flag, 'shadowquic_mtu_discovery', _('Path MTU Discovery'));
|
||||
so.default = so.enabled;
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
/* TrustTunnel fields */
|
||||
so = ss.taboption('field_general', form.Flag, 'trusttunnel_health_check', _('Health check'));
|
||||
so.default = so.enabled;
|
||||
@ -942,7 +970,7 @@ return view.extend({
|
||||
_('The default value is <code>%s</code>, indicating that only the outer connection timeout is used.').format('0'));
|
||||
so.datatype = 'uinteger';
|
||||
so.placeholder = '30';
|
||||
so.depends({type: /^(openvpn|masque)$/});
|
||||
so.depends({type: /^(hysteria2|openvpn|masque)$/});
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_general', form.Flag, 'udp', _('UDP'));
|
||||
@ -990,7 +1018,7 @@ return view.extend({
|
||||
' / ' + _('JLS'));
|
||||
}
|
||||
if (['vmess', 'vless', 'trojan', 'anytls'].includes(type) && !['shadow-tls', 'restls', 'jls'].includes(value)) {
|
||||
return _('Expecting: only support %s.').format(_('ShadowTLS') +
|
||||
return _('Expecting: Only support %s.').format(_('ShadowTLS') +
|
||||
' / ' + _('Restls') +
|
||||
' / ' + _('JLS'));
|
||||
}
|
||||
@ -1012,18 +1040,21 @@ return view.extend({
|
||||
so.placeholder = 'cloud.tencent.com';
|
||||
so.rmempty = false;
|
||||
so.depends({plugin_type: /^(obfs|v2ray-plugin|shadow-tls|restls|jls)$/});
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_plugin', form.Value, 'plugin_opts_thetlsusername', _('Username'));
|
||||
so.validate = hm.validateAuthUsername;
|
||||
so.rmempty = false;
|
||||
so.depends({plugin_type: 'jls'});
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_plugin', form.Value, 'plugin_opts_thetlspassword', _('Password'));
|
||||
so.password = true;
|
||||
so.rmempty = false;
|
||||
so.depends({plugin_type: /^(shadow-tls|restls|jls)$/});
|
||||
so.depends('type', 'shadowquic');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_plugin', form.ListValue, 'plugin_opts_shadowtls_version', _('Version'));
|
||||
@ -1177,7 +1208,7 @@ return view.extend({
|
||||
|
||||
so = ss.taboption('field_tls', form.Value, 'tls_sni', _('TLS SNI'),
|
||||
_('Hostname that the client attempts to connect to at the start of the TLS handshake process.'));
|
||||
so.depends({tls: '1', type: /^(http|vmess|vless|trojan|anytls|hysteria|hysteria2|shadowquic|trusttunnel|masque)$/});
|
||||
so.depends({tls: '1', type: /^(http|vmess|vless|trojan|anytls|hysteria|hysteria2|trusttunnel|masque)$/});
|
||||
so.depends({tls: '1', type: /^(tuic)$/, tls_disable_sni: '0'});
|
||||
so.modalonly = true;
|
||||
|
||||
@ -1317,7 +1348,7 @@ return view.extend({
|
||||
value = this.formvalue(section_id);
|
||||
|
||||
if (value == 1 && ['shadow-tls', 'restls', 'jls'].includes(plugin_type))
|
||||
return _('Expecting: cannot be enabled when %s is enabled.').format(_('ShadowTLS') +
|
||||
return _('Expecting: Cannot be enabled when %s is enabled.').format(_('ShadowTLS') +
|
||||
' / ' + _('Restls') +
|
||||
' / ' + _('JLS'));
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -501,7 +501,7 @@ uci.foreach(uciconf, ucinode, (cfg) => {
|
||||
"target-rematch-name": cfg.target_rematch_name,
|
||||
"target-sub-rule": cfg.target_sub_rule,
|
||||
|
||||
/* HTTP / SOCKS / Shadowsocks / VMess / VLESS / Trojan / TUIC / hysteria2 / ShadowQUIC / WireGuard / Masque */
|
||||
/* HTTP / SOCKS / Shadowsocks / VMess / VLESS / Trojan / TUIC / hysteria2 / WireGuard / Masque */
|
||||
username: cfg.username,
|
||||
uuid: cfg.vmess_uuid || cfg.uuid,
|
||||
cipher: cfg.vmess_chipher || cfg.shadowsocks_chipher,
|
||||
@ -602,13 +602,18 @@ uci.foreach(uciconf, ucinode, (cfg) => {
|
||||
} : null,
|
||||
|
||||
/* ShadowQUIC */
|
||||
...(cfg.type === 'shadowquic' ? {
|
||||
username: cfg.plugin_opts_thetlsusername,
|
||||
password: cfg.plugin_opts_thetlspassword,
|
||||
sni: cfg.plugin_opts_host
|
||||
} : {}),
|
||||
"quic-versions": cfg.shadowquic_quic_versions,
|
||||
"zero-rtt": strToBool(cfg.shadowquic_zero_rtt),
|
||||
// @# cwnd: 10 # default: 32,
|
||||
// @# max-datagram-frame-size: 1400,
|
||||
// @# recv-window-conn: 0,
|
||||
// @# recv-window: 0,
|
||||
// @# disable-mtu-discovery: false,
|
||||
cwnd: strToInt(cfg.shadowquic_cwnd),
|
||||
"max-datagram-frame-size": strToInt(cfg.shadowquic_max_datagram_frame_size),
|
||||
"recv-window-conn": strToInt(cfg.shadowquic_recv_window_conn),
|
||||
"recv-window": strToInt(cfg.shadowquic_recv_window),
|
||||
"disable-mtu-discovery": cfg.shadowquic_mtu_discovery === '0' ? true : null,
|
||||
|
||||
/* TrustTunnel */
|
||||
"health-check": cfg.type === 'trusttunnel' ? (cfg.trusttunnel_health_check === '0' ? false : true) : null,
|
||||
@ -644,7 +649,8 @@ uci.foreach(uciconf, ucinode, (cfg) => {
|
||||
/* Plugin fields */
|
||||
...(cfg.plugin === '1' ? (
|
||||
cfg.type in ['vmess', 'vless', 'trojan', 'anytls'] ? {
|
||||
...arrToObj([[(cfg.type in ['vmess', 'vless']) ? 'servername' : 'sni', cfg.plugin_opts_host]]),
|
||||
tls: true,
|
||||
...arrToObj([[cfg.type in ['vmess', 'vless'] ? 'servername' : 'sni', cfg.plugin_opts_host]]),
|
||||
// shadow-tls
|
||||
"shadow-tls-opts": cfg.plugin_type === 'shadow-tls' ? {
|
||||
version: strToInt(cfg.plugin_opts_shadowtls_version),
|
||||
@ -681,11 +687,11 @@ uci.foreach(uciconf, ucinode, (cfg) => {
|
||||
|
||||
/* SSH / WireGuard / Masque */
|
||||
/* TLS fields */
|
||||
tls: (cfg.type in ['trojan', 'anytls', 'tuic', 'hysteria', 'hysteria2', 'shadowquic', 'trusttunnel', 'masque']) ? null : strToBool(cfg.tls),
|
||||
...(strToBool(cfg.tls) ? {tls: cfg.type in ['trojan', 'anytls', 'tuic', 'hysteria', 'hysteria2', 'shadowquic', 'trusttunnel', 'masque'] ? null : true} : {}),
|
||||
"disable-sni": strToBool(cfg.tls_disable_sni),
|
||||
...(cfg.tls_sni ? arrToObj([[(cfg.type in ['vmess', 'vless']) ? 'servername' : 'sni', cfg.tls_sni]]) : {}),
|
||||
...(cfg.tls_sni ? arrToObj([[cfg.type in ['vmess', 'vless'] ? 'servername' : 'sni', cfg.tls_sni]]) : {}),
|
||||
fingerprint: cfg.tls_fingerprint,
|
||||
alpn: cfg.tls === '1' ? cfg.tls_alpn : null, // Array
|
||||
alpn: strToBool(cfg.tls) ? cfg.tls_alpn : null, // Array
|
||||
"name-cert-verify": cfg.tls_name_cert_verify,
|
||||
"skip-cert-verify": strToBool(cfg.tls_skip_cert_verify),
|
||||
certificate: cfg.tls_cert_path, // mTLS
|
||||
|
||||
@ -57,4 +57,11 @@ uci.foreach(uciconf, uciserver, (cfg) => {
|
||||
});
|
||||
/* Inbound END */
|
||||
|
||||
/* Routing rules START */
|
||||
/* Routing rules */
|
||||
config.rules = [
|
||||
"MATCH,DIRECT"
|
||||
];
|
||||
/* Routing rules END */
|
||||
|
||||
printf('%.J\n', removeBlankAttrs(config));
|
||||
|
||||
@ -222,10 +222,10 @@ export function parseListener(cfg) {
|
||||
rule: cfg.rule,
|
||||
proxy: cfg.proxy, // raw data need post-processing
|
||||
|
||||
/* HTTP / SOCKS / Mieru / VMess / VLESS / Trojan / AnyTLS / Tuic / Hysteria2 / ShadowQUIC / TrustTunnel */
|
||||
users: (cfg.type in ['http', 'socks', 'mixed', 'vmess', 'vless', 'trojan', 'shadowquic', 'trusttunnel']) ? [
|
||||
/* HTTP / SOCKS / Mieru / VMess / VLESS / Trojan / AnyTLS / Tuic / Hysteria2 / TrustTunnel */
|
||||
users: (cfg.type in ['http', 'socks', 'mixed', 'vmess', 'vless', 'trojan', 'trusttunnel']) ? [
|
||||
(cfg.username || cfg.vmess_uuid) ? {
|
||||
/* HTTP / SOCKS / Trojan / ShadowQUIC / TrustTunnel */
|
||||
/* HTTP / SOCKS / Trojan / TrustTunnel */
|
||||
username: cfg.username,
|
||||
password: cfg.password,
|
||||
|
||||
@ -326,20 +326,28 @@ export function parseListener(cfg) {
|
||||
"realm-name-pattern": cfg.hysteria2_realmserver_realm_name_pattern,
|
||||
|
||||
/* ShadowQUIC */
|
||||
...(cfg.type === 'shadowquic' ? {
|
||||
users: [
|
||||
{
|
||||
username: cfg.plugin_opts_thetlsusername,
|
||||
password: cfg.plugin_opts_thetlspassword
|
||||
}
|
||||
]
|
||||
} : {}),
|
||||
"quic-versions": cfg.shadowquic_quic_versions,
|
||||
"zero-rtt": strToBool(cfg.shadowquic_zero_rtt),
|
||||
"jls-upstream": cfg.type === 'shadowquic' ? {
|
||||
addr: cfg.plugin_opts_handshake_dest,
|
||||
sni: cfg.tls_sni,
|
||||
sni: cfg.plugin_opts_host,
|
||||
proxy: cfg.plugin_opts_dest_proxy, // raw data need post-processing
|
||||
"rate-limit": strToInt(cfg.plugin_opts_rate_limit),
|
||||
"quic-version-probe": strToBool(cfg.plugin_opts_quic_version_probe)
|
||||
} : null,
|
||||
// @# cwnd: 10 # default: 32,
|
||||
// @# max-datagram-frame-size: 1400,
|
||||
// @# recv-window-conn: 0,
|
||||
// @# recv-window: 0,
|
||||
// @# disable-mtu-discovery: false,
|
||||
cwnd: strToInt(cfg.shadowquic_cwnd),
|
||||
"max-datagram-frame-size": strToInt(cfg.shadowquic_max_datagram_frame_size),
|
||||
"recv-window-conn": strToInt(cfg.shadowquic_recv_window_conn),
|
||||
"recv-window": strToInt(cfg.shadowquic_recv_window),
|
||||
"disable-mtu-discovery": cfg.shadowquic_mtu_discovery === '0' ? true : null,
|
||||
|
||||
/* TrustTunnel */
|
||||
|
||||
@ -397,7 +405,8 @@ export function parseListener(cfg) {
|
||||
password: cfg.plugin_opts_thetlspassword,
|
||||
"restls-script": cfg.plugin_opts_restls_script,
|
||||
//"min-record-len": 0,
|
||||
proxy: cfg.plugin_opts_dest_proxy // raw data need post-processing
|
||||
proxy: cfg.plugin_opts_dest_proxy, // raw data need post-processing
|
||||
"rate-limit": strToInt(cfg.plugin_opts_rate_limit)
|
||||
}
|
||||
} : cfg.plugin_type === 'jls' ? {
|
||||
// jls
|
||||
@ -410,7 +419,7 @@ export function parseListener(cfg) {
|
||||
}
|
||||
],
|
||||
dest: cfg.plugin_opts_handshake_dest,
|
||||
sni: cfg.tls_sni,
|
||||
sni: cfg.plugin_opts_host,
|
||||
alpn: cfg.tls_alpn,
|
||||
proxy: cfg.plugin_opts_dest_proxy, // raw data need post-processing
|
||||
"rate-limit": strToInt(cfg.plugin_opts_rate_limit)
|
||||
|
||||
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=26.7.16
|
||||
PKG_RELEASE:=187
|
||||
PKG_RELEASE:=188
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@ -154,7 +154,8 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
MaxConcurrentTry = 4
|
||||
} or nil
|
||||
},
|
||||
network = node.transport,
|
||||
network = (api.compare_versions(xray_version, "<", "26.7.11")) and node.transport or nil, -- Todo: Remove
|
||||
method = (api.compare_versions(xray_version, ">=", "26.7.11")) and node.transport or nil, -- Todo: Remove version check
|
||||
security = node.stream_security,
|
||||
tlsSettings = (node.stream_security == "tls") and {
|
||||
serverName = node.tls_serverName,
|
||||
@ -645,7 +646,8 @@ function gen_config_server(node)
|
||||
protocol = node.protocol,
|
||||
settings = settings,
|
||||
streamSettings = {
|
||||
network = node.transport,
|
||||
network = (api.compare_versions(xray_version, "<", "26.7.11")) and node.transport or nil, -- Todo: Remove
|
||||
method = (api.compare_versions(xray_version, ">=", "26.7.11")) and node.transport or nil, -- Todo: Remove version check
|
||||
security = "none",
|
||||
tlsSettings = ("1" == node.tls) and {
|
||||
disableSystemRoot = false,
|
||||
|
||||
@ -303,7 +303,7 @@ run_dns2socks() {
|
||||
}
|
||||
|
||||
run_chinadns_ng() {
|
||||
local _flag _listen_port _dns_local _dns_trust _no_ipv6_trust _use_direct_list _use_proxy_list _gfwlist _chnlist _default_mode _default_tag _no_logic_log _tcp_node _remote_fakedns _filter_https
|
||||
local _flag _listen_port _dns_local _dns_trust _no_ipv6_trust _use_direct_list _use_proxy_list _gfwlist _chnlist _default_mode _default_tag _no_logic_log _tcp_node _filter_https
|
||||
local _extra_param=""
|
||||
eval_set_val "$@"
|
||||
|
||||
@ -314,7 +314,7 @@ run_chinadns_ng() {
|
||||
_extra_param="-FLAG ${_flag} -TCP_NODE ${_tcp_node} -LISTEN_PORT ${_listen_port} -DNS_LOCAL ${_dns_local} -DNS_TRUST ${_dns_trust}"
|
||||
_extra_param="${_extra_param} -USE_DIRECT_LIST ${_use_direct_list} -USE_PROXY_LIST ${_use_proxy_list} -USE_BLOCK_LIST ${_use_block_list}"
|
||||
_extra_param="${_extra_param} -GFWLIST ${_gfwlist} -CHNLIST ${_chnlist} -NO_IPV6_TRUST ${_no_ipv6_trust} -DEFAULT_MODE ${_default_mode}"
|
||||
_extra_param="${_extra_param} -DEFAULT_TAG ${_default_tag} -NFTFLAG ${nftflag} -NO_LOGIC_LOG ${_no_logic_log} -REMOTE_FAKEDNS ${_remote_fakedns}"
|
||||
_extra_param="${_extra_param} -DEFAULT_TAG ${_default_tag} -NFTFLAG ${nftflag} -NO_LOGIC_LOG ${_no_logic_log}"
|
||||
_extra_param="${_extra_param} -FILTER_HTTPS ${_filter_https} -LOG_FILE ${_LOG_FILE}"
|
||||
|
||||
lua $APP_PATH/helper_chinadns_add.lua ${_extra_param} > ${_CONF_FILE}
|
||||
@ -1386,7 +1386,7 @@ start_dns() {
|
||||
lua $APP_PATH/helper_smartdns_add.lua -FLAG "default" -SMARTDNS_CONF "/tmp/etc/smartdns/$CONFIG.conf" \
|
||||
-LISTEN_PORT ${SMARTDNS_LISTEN_PORT} -LOCAL_PORT ${SMARTDNS_LOCAL_PORT} \
|
||||
-LOCAL_GROUP ${group_domestic:-null} -REMOTE_GROUP "passwall_proxy" -REMOTE_PROXY_SERVER ${TCP_SOCKS_server} -USE_DEFAULT_DNS "${USE_DEFAULT_DNS:-direct}" \
|
||||
-REMOTE_DNS ${smartdns_remote_dns} -DNS_MODE ${DNS_MODE:-socks} -TUN_DNS ${TUN_DNS} -REMOTE_FAKEDNS ${REMOTE_FAKEDNS:-0} \
|
||||
-REMOTE_DNS ${smartdns_remote_dns} -DNS_MODE ${DNS_MODE:-socks} -TUN_DNS ${TUN_DNS} \
|
||||
-USE_DIRECT_LIST "${USE_DIRECT_LIST}" -USE_PROXY_LIST "${USE_PROXY_LIST}" -USE_BLOCK_LIST "${USE_BLOCK_LIST}" -USE_GFW_LIST "${USE_GFW_LIST}" -CHN_LIST "${CHN_LIST}" \
|
||||
-TCP_NODE ${TCP_NODE} -DEFAULT_PROXY_MODE "${TCP_PROXY_MODE}" -NO_PROXY_IPV6 ${FILTER_PROXY_IPV6:-0} -NFTFLAG ${nftflag:-0} \
|
||||
-SUBNET ${subnet_ip:-0} -NO_LOGIC_LOG ${NO_LOGIC_LOG:-0}
|
||||
@ -1430,7 +1430,6 @@ start_dns() {
|
||||
_default_tag=$(config_t_get global chinadns_ng_default_tag smart) \
|
||||
_no_logic_log=0 \
|
||||
_tcp_node=${TCP_NODE} \
|
||||
_remote_fakedns=${REMOTE_FAKEDNS:-0} \
|
||||
_filter_https=$(config_t_get global force_https_soa 0)
|
||||
|
||||
USE_DEFAULT_DNS="chinadns_ng"
|
||||
@ -1462,7 +1461,7 @@ start_dns() {
|
||||
lua $APP_PATH/helper_dnsmasq.lua stretch
|
||||
lua $APP_PATH/helper_dnsmasq.lua add_rule -FLAG "default" -TMP_DNSMASQ_PATH ${GLOBAL_DNSMASQ_CONF_PATH} -DNSMASQ_CONF_FILE ${GLOBAL_DNSMASQ_CONF} \
|
||||
-DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${DNSMASQ_TUN_DNS} \
|
||||
-REMOTE_FAKEDNS ${REMOTE_FAKEDNS:-0} -USE_DEFAULT_DNS "${USE_DEFAULT_DNS:-direct}" -CHINADNS_DNS ${china_ng_listen:-0} \
|
||||
-USE_DEFAULT_DNS "${USE_DEFAULT_DNS:-direct}" -CHINADNS_DNS ${china_ng_listen:-0} \
|
||||
-USE_DIRECT_LIST "${USE_DIRECT_LIST}" -USE_PROXY_LIST "${USE_PROXY_LIST}" -USE_BLOCK_LIST "${USE_BLOCK_LIST}" -USE_GFW_LIST "${USE_GFW_LIST}" -CHN_LIST "${CHN_LIST}" \
|
||||
-TCP_NODE ${TCP_NODE} -DEFAULT_PROXY_MODE ${TCP_PROXY_MODE} -NO_PROXY_IPV6 ${DNSMASQ_FILTER_PROXY_IPV6:-0} -NFTFLAG ${nftflag:-0} \
|
||||
-NO_LOGIC_LOG ${NO_LOGIC_LOG:-0}
|
||||
@ -1476,7 +1475,7 @@ start_dns() {
|
||||
GLOBAL_DNSMASQ_CONF_PATH=${GLOBAL_ACL_PATH}/dnsmasq.d
|
||||
lua $APP_PATH/helper_dnsmasq.lua add_rule -FLAG "default" -TMP_DNSMASQ_PATH ${GLOBAL_DNSMASQ_CONF_PATH} -DNSMASQ_CONF_FILE ${GLOBAL_DNSMASQ_CONF} \
|
||||
-LISTEN_PORT ${GLOBAL_DNSMASQ_PORT} -DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${DNSMASQ_TUN_DNS} \
|
||||
-REMOTE_FAKEDNS ${REMOTE_FAKEDNS:-0} -USE_DEFAULT_DNS "${USE_DEFAULT_DNS:-direct}" -CHINADNS_DNS ${china_ng_listen:-0} \
|
||||
-USE_DEFAULT_DNS "${USE_DEFAULT_DNS:-direct}" -CHINADNS_DNS ${china_ng_listen:-0} \
|
||||
-USE_DIRECT_LIST "${USE_DIRECT_LIST}" -USE_PROXY_LIST "${USE_PROXY_LIST}" -USE_BLOCK_LIST "${USE_BLOCK_LIST}" -USE_GFW_LIST "${USE_GFW_LIST}" -CHN_LIST "${CHN_LIST}" \
|
||||
-TCP_NODE ${TCP_NODE} -DEFAULT_PROXY_MODE ${TCP_PROXY_MODE} -NO_PROXY_IPV6 ${DNSMASQ_FILTER_PROXY_IPV6:-0} -NFTFLAG ${nftflag:-0} \
|
||||
-NO_LOGIC_LOG ${NO_LOGIC_LOG:-0}
|
||||
@ -1685,7 +1684,6 @@ acl_app() {
|
||||
_default_tag=${chinadns_ng_default_tag:-smart} \
|
||||
_no_logic_log=1 \
|
||||
_tcp_node=${tcp_node} \
|
||||
_remote_fakedns=${remote_fakedns:-0} \
|
||||
_filter_https=${force_https_soa:-0}
|
||||
|
||||
use_default_dns="chinadns_ng"
|
||||
@ -1697,7 +1695,7 @@ acl_app() {
|
||||
lua $APP_PATH/helper_dnsmasq.lua add_rule -FLAG ${sid} -TMP_DNSMASQ_PATH ${dnsmasq_conf_path} -DNSMASQ_CONF_FILE ${dnsmasq_conf} \
|
||||
-LISTEN_PORT ${dnsmasq_port} -DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS $LOCAL_DNS \
|
||||
-USE_DIRECT_LIST "${use_direct_list}" -USE_PROXY_LIST "${use_proxy_list}" -USE_BLOCK_LIST "${use_block_list}" -USE_GFW_LIST "${use_gfw_list}" -CHN_LIST "${chn_list}" \
|
||||
-TUN_DNS "127.0.0.1#${_dns_port}" -REMOTE_FAKEDNS ${remote_fakedns:-0} -USE_DEFAULT_DNS "${use_default_dns:-direct}" -CHINADNS_DNS ${_china_ng_listen:-0} \
|
||||
-TUN_DNS "127.0.0.1#${_dns_port}" -USE_DEFAULT_DNS "${use_default_dns:-direct}" -CHINADNS_DNS ${_china_ng_listen:-0} \
|
||||
-TCP_NODE $tcp_node -DEFAULT_PROXY_MODE ${tcp_proxy_mode} -NO_PROXY_IPV6 ${dnsmasq_filter_proxy_ipv6:-0} -NFTFLAG ${nftflag:-0} \
|
||||
-NO_LOGIC_LOG 1
|
||||
ln_run "$(first_type dnsmasq)" "dnsmasq_${sid}" "/dev/null" -C ${dnsmasq_conf} -x ${acl_path}/dnsmasq.pid
|
||||
|
||||
@ -17,7 +17,6 @@ local DEFAULT_TAG = var["-DEFAULT_TAG"]
|
||||
local NO_LOGIC_LOG = var["-NO_LOGIC_LOG"]
|
||||
local TCP_NODE = var["-TCP_NODE"]
|
||||
local NFTFLAG = var["-NFTFLAG"]
|
||||
local REMOTE_FAKEDNS = var["-REMOTE_FAKEDNS"]
|
||||
local FILTER_HTTPS = var["-FILTER_HTTPS"]
|
||||
local LOG_FILE = var["-LOG_FILE"]
|
||||
|
||||
@ -35,10 +34,6 @@ local tmp_lines = {}
|
||||
local USE_GEOVIEW = uci:get(appname, "@global_rules[0]", "enable_geoview")
|
||||
local IS_SHUNT_NODE = uci:get(appname, TCP_NODE, "protocol") == "_shunt"
|
||||
|
||||
if IS_SHUNT_NODE then
|
||||
REMOTE_FAKEDNS = uci:get(appname, TCP_NODE, "fakedns") or "0"
|
||||
end
|
||||
|
||||
local function log(...)
|
||||
if NO_LOGIC_LOG == "1" then
|
||||
return
|
||||
@ -299,7 +294,7 @@ if USE_PROXY_LIST == "1" and is_file_nonzero(file_proxy_host) then
|
||||
"group proxylist",
|
||||
"group-dnl " .. file_proxy_host,
|
||||
"group-upstream " .. DNS_TRUST,
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or ""
|
||||
"group-ipset " .. table.concat(sets, ",")
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:proxylist") end
|
||||
insert_array_after(config_lines, tmp_lines, "#--3")
|
||||
@ -321,7 +316,7 @@ if GFWLIST == "1" and is_file_nonzero(RULES_PATH .. "/gfwlist") then
|
||||
end
|
||||
tmp_lines = {
|
||||
"gfwlist-file " .. RULES_PATH .. "/gfwlist",
|
||||
REMOTE_FAKEDNS ~= "1" and "add-taggfw-ip " .. table.concat(sets, ",") or ""
|
||||
"add-taggfw-ip " .. table.concat(sets, ",")
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:gfw") end
|
||||
merge_array(config_lines, tmp_lines)
|
||||
@ -352,7 +347,7 @@ if CHNLIST ~= "0" and is_file_nonzero(RULES_PATH .. "/chnlist") then
|
||||
"group chn_proxy",
|
||||
"group-dnl " .. RULES_PATH .. "/chnlist",
|
||||
"group-upstream " .. DNS_TRUST,
|
||||
REMOTE_FAKEDNS ~= "1" and "group-ipset " .. table.concat(sets, ",") or ""
|
||||
"group-ipset " .. table.concat(sets, ",")
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:chn_proxy") end
|
||||
insert_array_after(config_lines, tmp_lines, "#--1")
|
||||
@ -482,7 +477,7 @@ if IS_SHUNT_NODE then
|
||||
"group shuntlist",
|
||||
"group-dnl " .. file_shunt_host,
|
||||
"group-upstream " .. DNS_TRUST,
|
||||
(not only_global and REMOTE_FAKEDNS == "1") and "" or ("group-ipset " .. table.concat(sets, ","))
|
||||
"group-ipset " .. table.concat(sets, ",")
|
||||
}
|
||||
if NO_IPV6_TRUST == "1" then table.insert(tmp_lines, "no-ipv6 tag:shuntlist") end
|
||||
insert_array_after(config_lines, tmp_lines, "#--2")
|
||||
|
||||
@ -163,7 +163,6 @@ function add_rule(var)
|
||||
local DEFAULT_DNS = var["-DEFAULT_DNS"]
|
||||
local LOCAL_DNS = var["-LOCAL_DNS"]
|
||||
local TUN_DNS = var["-TUN_DNS"]
|
||||
local REMOTE_FAKEDNS = var["-REMOTE_FAKEDNS"]
|
||||
local USE_DEFAULT_DNS = var["-USE_DEFAULT_DNS"]
|
||||
local CHINADNS_DNS = var["-CHINADNS_DNS"]
|
||||
local TCP_NODE = var["-TCP_NODE"]
|
||||
@ -183,10 +182,6 @@ function add_rule(var)
|
||||
local USE_CHINADNS_NG = "0"
|
||||
local IS_SHUNT_NODE = uci:get(appname, TCP_NODE, "protocol") == "_shunt"
|
||||
|
||||
if IS_SHUNT_NODE then
|
||||
REMOTE_FAKEDNS = uci:get(appname, TCP_NODE, "fakedns") or "0"
|
||||
end
|
||||
|
||||
local list1 = {}
|
||||
local excluded_domain = {}
|
||||
|
||||
@ -309,7 +304,7 @@ function add_rule(var)
|
||||
local cache_text = ""
|
||||
local nodes_address_md5 = sys.exec("echo -n $(uci show passwall | grep '\\.address') | md5sum")
|
||||
local new_rules = sys.exec("echo -n $(find /usr/share/passwall/rules -type f | xargs md5sum)")
|
||||
local new_text = TMP_DNSMASQ_PATH .. DNSMASQ_CONF_FILE .. DEFAULT_DNS .. LOCAL_DNS .. TUN_DNS .. REMOTE_FAKEDNS .. USE_DEFAULT_DNS .. CHINADNS_DNS .. USE_DIRECT_LIST .. USE_PROXY_LIST .. USE_BLOCK_LIST .. USE_GFW_LIST .. CHN_LIST .. DEFAULT_PROXY_MODE .. NO_PROXY_IPV6 .. nodes_address_md5 .. new_rules .. NFTFLAG
|
||||
local new_text = TMP_DNSMASQ_PATH .. DNSMASQ_CONF_FILE .. DEFAULT_DNS .. LOCAL_DNS .. TUN_DNS .. USE_DEFAULT_DNS .. CHINADNS_DNS .. USE_DIRECT_LIST .. USE_PROXY_LIST .. USE_BLOCK_LIST .. USE_GFW_LIST .. CHN_LIST .. DEFAULT_PROXY_MODE .. NO_PROXY_IPV6 .. nodes_address_md5 .. new_rules .. NFTFLAG
|
||||
if fs.access(CACHE_TEXT_FILE) then
|
||||
for line in io.lines(CACHE_TEXT_FILE) do
|
||||
cache_text = line
|
||||
@ -443,9 +438,6 @@ function add_rule(var)
|
||||
if NO_PROXY_IPV6 ~= "1" then
|
||||
table.insert(sets, setflag_6 .. set6_name)
|
||||
end
|
||||
if REMOTE_FAKEDNS == "1" then
|
||||
sets = {}
|
||||
end
|
||||
--始终使用远程DNS解析代理(黑名单)列表
|
||||
for line in io.lines("/usr/share/passwall/rules/proxy_host") do
|
||||
line = api.get_std_domain(line)
|
||||
@ -483,9 +475,6 @@ function add_rule(var)
|
||||
if NO_PROXY_IPV6 ~= "1" then
|
||||
table.insert(sets, setflag_6 .. set6_name)
|
||||
end
|
||||
if REMOTE_FAKEDNS == "1" then
|
||||
sets = {}
|
||||
end
|
||||
for line in io.lines("/usr/share/passwall/rules/gfwlist") do
|
||||
if line ~= "" and not line:find("#") and not check_excluded_domain(line) then
|
||||
if NO_PROXY_IPV6 == "1" then
|
||||
@ -528,9 +517,6 @@ function add_rule(var)
|
||||
setflag_4 .. "psw_chn"
|
||||
}
|
||||
end
|
||||
if REMOTE_FAKEDNS == "1" then
|
||||
sets = {}
|
||||
end
|
||||
end
|
||||
for line in io.lines("/usr/share/passwall/rules/chnlist") do
|
||||
if line ~= "" and not line:find("#") and not check_excluded_domain(line) then
|
||||
@ -595,11 +581,6 @@ function add_rule(var)
|
||||
else
|
||||
no_ipv6 = true
|
||||
end
|
||||
if not only_global then
|
||||
if REMOTE_FAKEDNS == "1" then
|
||||
sets = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local domain_list = s.domain_list or ""
|
||||
|
||||
@ -11,7 +11,6 @@ local USE_DEFAULT_DNS = var["-USE_DEFAULT_DNS"]
|
||||
local REMOTE_DNS = var["-REMOTE_DNS"]
|
||||
local TUN_DNS = var["-TUN_DNS"]
|
||||
local DNS_MODE = var["-DNS_MODE"]
|
||||
local REMOTE_FAKEDNS = var["-REMOTE_FAKEDNS"]
|
||||
local TCP_NODE = var["-TCP_NODE"]
|
||||
local USE_DIRECT_LIST = var["-USE_DIRECT_LIST"]
|
||||
local USE_PROXY_LIST = var["-USE_PROXY_LIST"]
|
||||
@ -41,10 +40,6 @@ local tmp_lines = {}
|
||||
local USE_GEOVIEW = uci:get(appname, "@global_rules[0]", "enable_geoview")
|
||||
local IS_SHUNT_NODE = uci:get(appname, TCP_NODE, "protocol") == "_shunt"
|
||||
|
||||
if IS_SHUNT_NODE then
|
||||
REMOTE_FAKEDNS = uci:get(appname, TCP_NODE, "fakedns") or "0"
|
||||
end
|
||||
|
||||
local function log(...)
|
||||
if NO_LOGIC_LOG == "1" then
|
||||
return
|
||||
@ -254,7 +249,6 @@ if DNS_MODE == "socks" then
|
||||
end
|
||||
table.insert(config_lines, server_param)
|
||||
end
|
||||
if not IS_SHUNT_NODE then REMOTE_FAKEDNS = "0" end
|
||||
else
|
||||
local server_param = string.format("server %s -group %s -exclude-default-group", TUN_DNS:gsub("#", ":"), REMOTE_GROUP)
|
||||
table.insert(config_lines, server_param)
|
||||
@ -460,12 +454,10 @@ if USE_PROXY_LIST == "1" and is_file_nonzero(file_proxy_host) then
|
||||
"#4:" .. setflag .. "psw_black"
|
||||
}
|
||||
if NO_PROXY_IPV6 == "1" then
|
||||
domain_rules_str = domain_rules_str .. " -address #6"
|
||||
domain_rules_str = REMOTE_FAKEDNS ~= "1" and (domain_rules_str .. " " .. set_type .. " " .. table.concat(sets, ",")) or domain_rules_str
|
||||
domain_rules_str = domain_rules_str .. " -address #6 " .. set_type .. " " .. table.concat(sets, ",")
|
||||
else
|
||||
domain_rules_str = domain_rules_str .. " -address -6"
|
||||
table.insert(sets, "#6:" .. setflag .. "psw_black6")
|
||||
domain_rules_str = REMOTE_FAKEDNS ~= "1" and (domain_rules_str .. " -d no " .. set_type .. " " .. table.concat(sets, ",")) or domain_rules_str
|
||||
domain_rules_str = domain_rules_str .. " -address -6 -d no " .. set_type .. " " .. table.concat(sets, ",")
|
||||
end
|
||||
table.insert(tmp_lines, domain_rules_str)
|
||||
insert_array_after(config_lines, tmp_lines, "#--5")
|
||||
@ -485,12 +477,10 @@ if USE_GFW_LIST == "1" and is_file_nonzero(RULES_PATH .. "/gfwlist") then
|
||||
"#4:" .. setflag .. "psw_gfw"
|
||||
}
|
||||
if NO_PROXY_IPV6 == "1" then
|
||||
domain_rules_str = domain_rules_str .. " -address #6"
|
||||
domain_rules_str = REMOTE_FAKEDNS ~= "1" and (domain_rules_str .. " " .. set_type .. " " .. table.concat(sets, ",")) or domain_rules_str
|
||||
domain_rules_str = domain_rules_str .. " -address #6 " .. set_type .. " " .. table.concat(sets, ",")
|
||||
else
|
||||
domain_rules_str = domain_rules_str .. " -address -6"
|
||||
table.insert(sets, "#6:" .. setflag .. "psw_gfw6")
|
||||
domain_rules_str = REMOTE_FAKEDNS ~= "1" and (domain_rules_str .. " -d no " .. set_type .. " " .. table.concat(sets, ",")) or domain_rules_str
|
||||
domain_rules_str = domain_rules_str .. " -address -6 -d no " .. set_type .. " " .. table.concat(sets, ",")
|
||||
end
|
||||
table.insert(tmp_lines, domain_rules_str)
|
||||
insert_array_after(config_lines, tmp_lines, "#--1")
|
||||
@ -526,12 +516,10 @@ if CHN_LIST ~= "0" and is_file_nonzero(RULES_PATH .. "/chnlist") then
|
||||
"#4:" .. setflag .. "psw_chn"
|
||||
}
|
||||
if NO_PROXY_IPV6 == "1" then
|
||||
domain_rules_str = domain_rules_str .. " -address #6"
|
||||
domain_rules_str = REMOTE_FAKEDNS ~= "1" and (domain_rules_str .. " " .. set_type .. " " .. table.concat(sets, ",")) or domain_rules_str
|
||||
domain_rules_str = domain_rules_str .. " -address #6 " .. set_type .. " " .. table.concat(sets, ",")
|
||||
else
|
||||
domain_rules_str = domain_rules_str .. " -address -6"
|
||||
table.insert(sets, "#6:" .. setflag .. "psw_chn6")
|
||||
domain_rules_str = REMOTE_FAKEDNS ~= "1" and (domain_rules_str .. " -d no " .. set_type .. " " .. table.concat(sets, ",")) or domain_rules_str
|
||||
domain_rules_str = domain_rules_str .. " -address -6 -d no " .. set_type .. " " .. table.concat(sets, ",")
|
||||
end
|
||||
table.insert(tmp_lines, domain_rules_str)
|
||||
insert_array_after(config_lines, tmp_lines, "#--2")
|
||||
@ -659,16 +647,10 @@ if IS_SHUNT_NODE then
|
||||
"#4:" .. setflag .. "psw_shunt"
|
||||
}
|
||||
if NO_PROXY_IPV6 == "1" then
|
||||
domain_rules_str = domain_rules_str .. " -address #6"
|
||||
domain_rules_str = (not only_global and REMOTE_FAKEDNS == "1")
|
||||
and domain_rules_str
|
||||
or (domain_rules_str .. " " .. set_type .. " " .. table.concat(sets, ","))
|
||||
domain_rules_str = domain_rules_str .. " -address #6 " .. set_type .. " " .. table.concat(sets, ",")
|
||||
else
|
||||
domain_rules_str = domain_rules_str .. " -address -6"
|
||||
table.insert(sets, "#6:" .. setflag .. "psw_shunt6")
|
||||
domain_rules_str = (not only_global and REMOTE_FAKEDNS == "1")
|
||||
and domain_rules_str
|
||||
or (domain_rules_str .. " -d no " .. set_type .. " " .. table.concat(sets, ","))
|
||||
domain_rules_str = domain_rules_str .. " -address -6 -d no " .. set_type .. " " .. table.concat(sets, ",")
|
||||
end
|
||||
table.insert(tmp_lines, domain_rules_str)
|
||||
insert_array_after(config_lines, tmp_lines, "#--3")
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mihomo-meta
|
||||
PKG_VERSION:=1.19.28
|
||||
PKG_RELEASE:=12
|
||||
PKG_VERSION:=1.19.29
|
||||
PKG_RELEASE:=13
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
|
||||
PKG_SOURCE_VERSION:=v1.19.28
|
||||
PKG_SOURCE_VERSION:=v1.19.29
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=GPL3.0+
|
||||
@ -18,7 +18,7 @@ PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
PKG_BUILD_VERSION:=v1.19.28
|
||||
PKG_BUILD_VERSION:=v1.19.29
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_TIME:=$(shell date -u -Iseconds)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user