diff --git a/root/etc/config/homeproxy b/root/etc/config/homeproxy index 7a89c2f7..97db63f8 100644 --- a/root/etc/config/homeproxy +++ b/root/etc/config/homeproxy @@ -2,6 +2,7 @@ config homeproxy 'infra' option __warning 'DO NOT EDIT THIS SECTION, OR YOU ARE ON YOUR OWN!' option common_port '22,53,80,143,443,465,853,873,993,995,8080,8443,9418' + option mixed_port '5330' option redirect_port '5331' option tproxy_port '5332' option dns_port '5333' diff --git a/root/etc/homeproxy/scripts/generate_client.uc b/root/etc/homeproxy/scripts/generate_client.uc index 3e323a81..5affda92 100755 --- a/root/etc/homeproxy/scripts/generate_client.uc +++ b/root/etc/homeproxy/scripts/generate_client.uc @@ -44,6 +44,7 @@ if (wan_dns.exitcode === 0 && trim(wan_dns.stdout)) else wan_dns = (routing_mode in ['proxy_mainland_china', 'global']) ? '208.67.222.222' : '114.114.114.114'; +const mixed_port = uci.get(uciconfig, uciinfra, 'mixed_port') || '5330'; const dns_port = uci.get(uciconfig, uciinfra, 'dns_port') || '5333'; let main_node, main_udp_node, dedicated_udp_node, default_outbound, sniff_override = '1', @@ -414,6 +415,16 @@ push(config.inbounds, { listen_port: int(dns_port) }); +push(config.inbounds, { + type: 'mixed', + tag: 'mixed-in', + listen: '::', + listen_port: int(mixed_port), + sniff: true, + sniff_override_destination: (sniff_override === '1'), + set_system_proxy: false +}); + if (match(proxy_mode, /redirect/)) push(config.inbounds, { type: 'redirect',