diff --git a/frp/Makefile b/frp/Makefile index 5671459e5..eacacbef3 100644 --- a/frp/Makefile +++ b/frp/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=frp -PKG_VERSION:=0.71.0 -PKG_RELEASE:=10 +PKG_VERSION:=0.71.1 +PKG_RELEASE:=11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v$(PKG_VERSION)? diff --git a/luci-app-fchomo/htdocs/luci-static/resources/fchomo/listeners.js b/luci-app-fchomo/htdocs/luci-static/resources/fchomo/listeners.js index 546617b04..9629240d7 100644 --- a/luci-app-fchomo/htdocs/luci-static/resources/fchomo/listeners.js +++ b/luci-app-fchomo/htdocs/luci-static/resources/fchomo/listeners.js @@ -813,9 +813,23 @@ function renderListeners(s, uciconfig, isClient) { o.depends('type', 'vless'); o.modalonly = true; - const initVlessEncryptionOption = function(o, key) { + o = s.taboption('field_vless_encryption', form.Value, 'vless_encryption_hmpayload', _('Payload')); + o.readonly = true; + o.depends('vless_decryption', '1'); + o.modalonly = true; + + o = s.taboption('field_vless_encryption', CBIDummyCopyValue, '_vless_encryption_decryption', _('decryption')); + o.depends('vless_decryption', '1'); + o.modalonly = true; + + o = s.taboption('field_vless_encryption', CBIDummyCopyValue, '_vless_encryption_encryption', _('encryption')); + o.depends('vless_decryption', '1'); + o.modalonly = true; + + // common part + const initVlessEncryptionOption = function(o, key, load_callback = v => v) { o.load = function(section_id) { - return new VlessEncryption(uci.get(uciconfig, section_id, 'vless_encryption_hmpayload'))[key]; + return load_callback(new VlessEncryption(uci.get(uciconfig, section_id, 'vless_encryption_hmpayload'))[key]); } o.onchange = function(ev, section_id, value) { let UIEl = this.section.getUIElement(section_id, 'vless_encryption_hmpayload'); @@ -832,29 +846,16 @@ function renderListeners(s, uciconfig, isClient) { }); } o.write = function() {}; + o.depends('vless_decryption', '1'); + o.modalonly = true; } - o = s.taboption('field_vless_encryption', form.Value, 'vless_encryption_hmpayload', _('Payload')); - o.readonly = true; - o.depends('vless_decryption', '1'); - o.modalonly = true; - - o = s.taboption('field_vless_encryption', CBIDummyCopyValue, '_vless_encryption_decryption', _('decryption')); - o.depends('vless_decryption', '1'); - o.modalonly = true; - - o = s.taboption('field_vless_encryption', CBIDummyCopyValue, '_vless_encryption_encryption', _('encryption')); - o.depends('vless_decryption', '1'); - o.modalonly = true; - o = s.taboption('field_vless_encryption', form.ListValue, 'vless_encryption_method', _('Encryption method')); o.default = hm.vless_encryption.methods[0][0]; hm.vless_encryption.methods.forEach((res) => { o.value.apply(o, res); }) initVlessEncryptionOption(o, 'method'); - o.depends('vless_decryption', '1'); - o.modalonly = true; o = s.taboption('field_vless_encryption', form.RichListValue, 'vless_encryption_xormode', _('XOR mode')); o.default = hm.vless_encryption.xormodes[0][0]; @@ -862,8 +863,6 @@ function renderListeners(s, uciconfig, isClient) { o.value.apply(o, res); }) initVlessEncryptionOption(o, 'xormode'); - o.depends('vless_decryption', '1'); - o.modalonly = true; o = s.taboption('field_vless_encryption', hm.RichValue, 'vless_encryption_ticket', _('Server') +' '+ _('RTT')); o.default = hm.vless_encryption.tickets[0][0]; @@ -881,8 +880,6 @@ function renderListeners(s, uciconfig, isClient) { return true; } o.rmempty = false; - o.depends('vless_decryption', '1'); - o.modalonly = true; o = s.taboption('field_vless_encryption', form.ListValue, 'vless_encryption_rtt', _('Client') +' '+ _('RTT')); o.default = hm.vless_encryption.rtts[0][0]; @@ -891,8 +888,6 @@ function renderListeners(s, uciconfig, isClient) { }) initVlessEncryptionOption(o, 'rtt'); o.rmempty = false; - o.depends('vless_decryption', '1'); - o.modalonly = true; o = s.taboption('field_vless_encryption', hm.less_25_12 ? hm.DynamicList : form.DynamicList, 'vless_encryption_paddings', _('Paddings'), // @less_25_12 _('The server and client can set different padding parameters.') + '
' + @@ -912,8 +907,6 @@ function renderListeners(s, uciconfig, isClient) { return true; } o.allowduplicates = true; - o.depends('vless_decryption', '1'); - o.modalonly = true; o = s.taboption('field_vless_encryption', hm.GenText, 'vless_encryption_keypairs', _('Keypairs')); o.placeholder = '[\n {\n "type": "vless-x25519",\n "server": "cP5Oy9MOpTaBKKE17Pfd56mbb1CIfp5EMpyBYqr2EG8",\n "client": "khEcQMT8j41xWmGYKpZtQ4vd8_9VWyFVmmCDIhRJ-Uk"\n },\n {\n "type": "vless-mlkem768",\n "server": "UHPx3nf-FVxF95byAw0YG025aQNw9HxKej-MiG5AhTcdW_WFpHlTVYQU5NHmXP6tmljSnB2iPmSQ29fisGxEog",\n "client": "h4sdZgCc5-ZefvQ8mZmReOWQdxYb0mwngMdl7pKhYEZZpGWHUPKAmxug87Bgj3GqSHs195QeVpxfrMLNB5J..."\n },\n ...\n]'; @@ -985,9 +978,11 @@ function renderListeners(s, uciconfig, isClient) { return node; } - o.load = function(section_id) { - return JSON.stringify(new VlessEncryption(uci.get(uciconfig, section_id, 'vless_encryption_hmpayload'))['keypairs'], null, 2); - } + initVlessEncryptionOption(o, 'keypairs', + (keypairs) => JSON.stringify(keypairs, null, 2) + ); + const keypairs_onchange = o.onchange; + o.onchange = function() {}; o.validate = function(section_id, value) { let result = hm.validateJson.call(this, section_id, value); @@ -995,18 +990,7 @@ function renderListeners(s, uciconfig, isClient) { let keypairs = JSON.parse(value.trim()); if (Array.isArray(keypairs) && keypairs.length >= 1) { - let UIEl = this.section.getUIElement(section_id, 'vless_encryption_hmpayload'); - let newpayload = new VlessEncryption(UIEl.getValue()).setKey('keypairs', keypairs); - - UIEl.setValue(newpayload.toString()); - - [ - ['server', '_vless_encryption_decryption'], - ['client', '_vless_encryption_encryption'] - ].forEach(([side, option]) => { - UIEl = this.section.getUIElement(section_id, option); - UIEl.setValue(newpayload.toString('mihomo', side)); - }); + keypairs_onchange.call(this, null, section_id, keypairs); } else return _('Expecting: %s').format(_('least one keypair required')); @@ -1015,8 +999,6 @@ function renderListeners(s, uciconfig, isClient) { return result; } o.rmempty = false; - o.depends('vless_decryption', '1'); - o.modalonly = true; // @xhttp-config其他的配置 diff --git a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js index 84cc2e400..6f56fa495 100644 --- a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js +++ b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js @@ -1382,6 +1382,19 @@ return view.extend({ so.depends('type', 'vless'); so.modalonly = true; + so = ss.taboption('field_vless_encryption', form.Value, 'vless_encryption_encryption', _('encryption')); + so.renderWidget = function(/* ... */) { + let node = form.Value.prototype.renderWidget.apply(this, arguments); + + node.firstChild.style.width = '30em'; + + return node; + } + so.rmempty = false; + so.depends('vless_encryption', '1'); + so.modalonly = true; + + // common part const initVlessEncryptionClientOption = function(o, key) { o.load = function(section_id) { const value = uci.get(data[0], section_id, 'vless_encryption_encryption'); @@ -1398,20 +1411,10 @@ return view.extend({ UIEl.setValue(newpayload.toString()); } o.write = function() {}; + o.depends('vless_encryption', '1'); + o.modalonly = true; } - so = ss.taboption('field_vless_encryption', form.Value, 'vless_encryption_encryption', _('encryption')); - so.renderWidget = function(/* ... */) { - let node = form.Value.prototype.renderWidget.apply(this, arguments); - - node.firstChild.style.width = '30em'; - - return node; - } - so.rmempty = false; - so.depends('vless_encryption', '1'); - so.modalonly = true; - so = ss.taboption('field_vless_encryption', form.ListValue, 'vless_encryption_rtt', _('Client') +' '+ _('RTT')); so.default = hm.vless_encryption.rtts[0][0]; hm.vless_encryption.rtts.forEach((res) => { @@ -1419,8 +1422,6 @@ return view.extend({ }) initVlessEncryptionClientOption(so, 'rtt'); so.rmempty = false; - so.depends('vless_encryption', '1'); - so.modalonly = true; so = ss.taboption('field_vless_encryption', hm.less_25_12 ? hm.DynamicList : form.DynamicList, 'vless_encryption_paddings', _('Paddings'), // @less_25_12 _('The server and client can set different padding parameters.') + '
' + @@ -1440,8 +1441,6 @@ return view.extend({ return true; } so.allowduplicates = true; - so.depends('vless_encryption', '1'); - so.modalonly = true; // @ 下面支持填写针对download-settings的上下行分离配置 diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 6aadc683d..9daa096b3 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall PKG_VERSION:=26.11.11 -PKG_RELEASE:=375 +PKG_RELEASE:=376 PKG_PO_VERSION:=$(PKG_VERSION) PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_listvalue_com.htm b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_listvalue_com.htm index 5fdb5e667..ad8ce3908 100644 --- a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_listvalue_com.htm +++ b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_listvalue_com.htm @@ -256,7 +256,7 @@ document.head.appendChild(styleNode) // trace back from option -> select -> body for background color const panelRadius = styleSelect.borderRadius; - const optionColor = !lv_isTransparent(styleSelect.backgroundColor) ? styleSelect.backgroundColor : !lv_isTransparent(styleOption.backgroundColor) ? styleOption.backgroundColor : styleBody.backgroundColor + const optionColor = !lv_isTransparent(styleOption.backgroundColor) ? styleOption.backgroundColor : !lv_isTransparent(styleSelect.backgroundColor) ? styleSelect.backgroundColor : styleBody.backgroundColor const titleColor = lv_getColorSchema(optionColor) === "light" ? lv_darker(optionColor, 30) : lv_lighter(optionColor, 30) // 自带箭头已占据布局空间,右内边距使用主题的左内边距 const selectStyleCSS = [`#${CSS.escape(cbid + ".display")} {`, lv_style2Css(styleSelect, styleNames), lv_style2Css(styleSelect, ["backgroundColor"]), `padding-right: ${styleSelect.paddingLeft} !important;`, "}"] diff --git a/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm b/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm index aeb4e7f9f..d209ff9f3 100644 --- a/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm +++ b/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm @@ -23,7 +23,7 @@ if node then end end -%> - +