diff --git a/htdocs/luci-static/resources/view/homeproxy/client.js b/htdocs/luci-static/resources/view/homeproxy/client.js index 8a15f683..44a21167 100644 --- a/htdocs/luci-static/resources/view/homeproxy/client.js +++ b/htdocs/luci-static/resources/view/homeproxy/client.js @@ -264,14 +264,18 @@ return view.extend({ o.depends('routing_mode', 'custom'); ss = o.subsection; + so = ss.option(form.Flag, 'tun_gso', _('Generic segmentation offload')); + so.default = so.disabled; + so.depends('homeproxy.config.proxy_mode', 'redirect_tun'); + so.depends('homeproxy.config.proxy_mode', 'tun'); + so.rmempty = false; + so = ss.option(form.ListValue, 'tcpip_stack', _('TCP/IP stack'), _('TCP/IP stack.')); if (features.with_gvisor) { so.value('mixed', _('Mixed')); so.value('gvisor', _('gVisor')); } - if (features.with_lwip) - so.value('lwip', _('LWIP')); so.value('system', _('System')); so.default = 'system'; so.depends('homeproxy.config.proxy_mode', 'redirect_tun'); diff --git a/htdocs/luci-static/resources/view/homeproxy/node.js b/htdocs/luci-static/resources/view/homeproxy/node.js index 161cafde..184d69bd 100644 --- a/htdocs/luci-static/resources/view/homeproxy/node.js +++ b/htdocs/luci-static/resources/view/homeproxy/node.js @@ -944,6 +944,12 @@ return view.extend({ /* Transport config end */ /* Wireguard config start */ + so = ss.option(form.Flag, 'wireguard_gso', _('Generic segmentation offload')); + so.default = so.disabled; + so.depends('type', 'wireguard'); + so.rmempty = false; + so.modalonly = true; + so = ss.option(form.DynamicList, 'wireguard_local_address', _('Local address'), _('List of IP (v4 or v6) addresses prefixes to be assigned to the interface.')); so.datatype = 'cidr'; @@ -1168,6 +1174,11 @@ return view.extend({ so.value('360', _('360')); so.value('android', _('Android')); so.value('chrome', _('Chrome')); + so.value('chrome_psk', _('Chrome PSK')); + so.value('chrome_psk_shuffle', _('Chrome PSK Shuffle')); + so.value('chrome_padding_psk_shuffle', _('Chrome Padding PSK Shuffle')); + so.value('chrome_pq', _('Chrome pq')); + so.value('chrome_pq_psk', _('Chrome pq PSK')); so.value('edge', _('Edge')); so.value('firefox', _('Firefox')); so.value('ios', _('iOS')); diff --git a/root/etc/homeproxy/scripts/generate_client.uc b/root/etc/homeproxy/scripts/generate_client.uc index 6e608935..cd1f8b2a 100755 --- a/root/etc/homeproxy/scripts/generate_client.uc +++ b/root/etc/homeproxy/scripts/generate_client.uc @@ -82,7 +82,7 @@ const proxy_mode = uci.get(uciconfig, ucimain, 'proxy_mode') || 'redirect_tproxy const mixed_port = uci.get(uciconfig, uciinfra, 'mixed_port') || '5330'; let self_mark, redirect_port, tproxy_port, - tun_name, tun_addr4, tun_addr6, tun_mtu, + tun_name, tun_addr4, tun_addr6, tun_mtu, tun_gso, tcpip_stack, endpoint_independent_nat; if (match(proxy_mode, /redirect/)) { self_mark = uci.get(uciconfig, 'infra', 'self_mark') || '100'; @@ -96,6 +96,7 @@ if (match(proxy_mode), /tun/) { tun_addr4 = uci.get(uciconfig, uciinfra, 'tun_addr4') || '172.19.0.1/30'; tun_addr6 = uci.get(uciconfig, uciinfra, 'tun_addr6') || 'fdfe:dcba:9876::1/126'; tun_mtu = uci.get(uciconfig, uciinfra, 'tun_mtu') || '9000'; + tun_gso = uci.get(uciconfig, uciinfra, 'tun_gso') || '0'; tcpip_stack = 'system'; if (routing_mode === 'custom') { tcpip_stack = uci.get(uciconfig, uciroutingsetting, 'tcpip_stack') || 'system'; @@ -188,6 +189,7 @@ function generate_outbound(node) { packet_encoding: node.packet_encoding, /* WireGuard */ system_interface: (node.type === 'wireguard') || null, + gso: (node.wireguard_gso === '1') || null, interface_name: (node.type === 'wireguard') ? 'wg-' + node['.name'] + '-out' : null, local_address: node.wireguard_local_address, private_key: node.wireguard_private_key, @@ -480,6 +482,7 @@ if (match(proxy_mode, /tun/)) inet4_address: tun_addr4, inet6_address: (ipv6_support === '1') ? tun_addr6 : null, mtu: strToInt(tun_mtu), + gso: (tun_gso === '1'), auto_route: false, endpoint_independent_nat: strToBool(endpoint_independent_nat), stack: tcpip_stack,