immortalwrt / homeproxy

The modern ImmortalWrt proxy platform for ARM64/AMD64 (powered by sing-box)
GNU General Public License v2.0
540 stars 160 forks source link

在旁路由中使用自定义路由模式时会强制代理没有将网关指向旁路由的客户机数据 #203

Closed nczyw closed 1 month ago

nczyw commented 1 month ago

Bug description

客户机网关指向主路由10.0.3.1 ,无科学功能,immortalwrt系统 旁路由IP:10.0.3.250,也是immortalwrt系统 当旁路由homeproxy使用了自定义路由模式,局域网中的客户机网关均指向了10.0.3.1路由,但是客户机的数据却被10.0.3.250给代理了,客户机自动翻墙了。 使用非自定义路由模式,没有出现抢数据行为。

Actual behavior

客户机的网关指向了主路由,但客户机的数据被旁路由给抢过去代理了

Expected behavior

客户机的网关指向了主路由,旁路由不应该去抢网关指向主路由的客户机数据进行强制代理。

Steps to reproduce

在局域网中装一个immortalwrt系统当旁路由,homeproxy,使用自定义路由模式,局域网中客户机数据就会被此旁路由给代理,都不用把网关指向旁路由。 主路由也是immortalwrt,不知道是不是这个先决条件导致的。

HomeProxy configuration

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' option china_dns_port '5334' option tun_name 'singtun0' option tun_addr4 '172.19.0.1/30' option tun_addr6 'fdfe:dcba:9876::1/126' option tun_mtu '9000' option tun_gso '0' option table_mark '100' option self_mark '100' option tproxy_mark '101' option tun_mark '102'

config homeproxy 'config' option routing_mode 'custom' option routing_port 'common' option proxy_mode 'redirect_tproxy' option ipv6_support '0'

config homeproxy 'experimental' option clash_api_port '9090' option clash_api_log_level 'warn' option clash_api_enabled '1' option set_dash_backend '1' option dashboard_repo 'metacubex/yacd-meta'

config homeproxy 'control' option lan_proxy_mode 'disabled' list wan_proxy_ipv4_ips '91.105.192.0/23' list wan_proxy_ipv4_ips '91.108.4.0/22' list wan_proxy_ipv4_ips '91.108.8.0/22' list wan_proxy_ipv4_ips '91.108.16.0/22' list wan_proxy_ipv4_ips '91.108.12.0/22' list wan_proxy_ipv4_ips '91.108.20.0/22' list wan_proxy_ipv4_ips '91.108.56.0/22' list wan_proxy_ipv4_ips '149.154.160.0/20' list wan_proxy_ipv4_ips '185.76.151.0/24'

config homeproxy 'routing' option sniff_override '1' option default_outbound 'nil' option udp_timeout '300' option bypass_cn_traffic '0'

config homeproxy 'dns' option dns_strategy 'prefer_ipv4' option default_server 'default-dns'

config homeproxy 'subscription' option auto_update '0' option allow_insecure '0' option packet_encoding 'xudp' option update_via_proxy '0' option filter_nodes 'blacklist' list filter_keywords '重置|到期|过期|剩余|套餐' list filter_keywords 'Expiration|Remaining'

config homeproxy 'server' option enabled '0' option auto_firewall '0'

config dns_rule 'nodes_domain' option label 'NodesDomain' option enabled '1' option mode 'default' list outbound 'any-out' option server 'default-dns'

config ruleset 'rule_geosite_openai' option label 'geosite-openai' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/openai.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_youtube' option label 'geosite-youtube' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/youtube.srs' option outbound 'direct-out'

config ruleset 'rule_geoip_google' option label 'geoip-google' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geoip/google.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_google' option label 'geosite-google' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/google.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_github' option label 'geosite-github' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/github.srs' option outbound 'direct-out'

config ruleset 'rule_geoip_telegram' option label 'geoip-telegram' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geoip/telegram.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_telegram' option label 'geosite-telegram' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/telegram.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_tiktok' option label 'geosite-tiktok' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/tiktok.srs' option outbound 'direct-out'

config ruleset 'rule_geoip_netflix' option label 'geoip-netflix' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geoip/netflix.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_netflix' option label 'geosite-netflix' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/netflix.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_apple' option label 'geosite-apple' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/apple.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_microsoft' option label 'geosite-microsoft' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/microsoft.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_geolocation_nocn' option label 'geosite-geolocation-!cn' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/geolocation-!cn.srs' option outbound 'direct-out'

config ruleset 'rule_geoip_cn' option label 'geoip-cn' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geoip/cn.srs' option outbound 'direct-out'

config ruleset 'rule_geosite_cn' option label 'geosite-cn' option enabled '1' option type 'remote' option format 'binary' option url 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/blob/sing/geo/geosite/cn.srs' option outbound 'direct-out'

config node 'node_select' option label '🚀 节点选择' option type 'selector' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all' list order 'node_select_manually' list order 'node_select_auto' option default_selected 'node_select_auto'

config node 'node_openai' option label '🤖 OpenAI' option type 'selector' option default_selected 'node_japan_all' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_taiwan_all' list order 'node_select_manually'

config node 'node_youbube' option label '📹 YouTube' option type 'selector' list order 'node_select' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all' list order 'node_select_manually'

config node 'node_google' option label '🍀 Google' option type 'selector' list order 'node_select' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all' list order 'node_select_manually'

config node 'node_github' option label '📑 Github' option type 'selector' list order 'node_select' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all' list order 'node_select_manually'

config node 'node_telegram' option label '📲 Telegram' option type 'selector' list order 'node_select' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all' list order 'node_select_manually'

config node 'node_tiktok' option label '🎵 TikTok' option type 'selector' list order 'node_select' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all' list order 'node_select_manually'

config node 'node_netflix' option label '🎥 Netflix' option type 'selector' list order 'node_select' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all'

config node 'node_microsoft' option label '🪟 Microsoft' option type 'selector' list order 'node_select' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all' list order 'node_select_manually' list order 'node_direct'

config node 'node_apple' option label '🍎 Apple' option type 'selector' list order 'node_select' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all' list order 'node_select_manually' list order 'node_direct' option default_selected 'node_direct'

config node 'node_singapore_all' option label '🇸🇬 新加坡节点' option type 'selector' option filter_nodes 'whitelist' list filter_keywords '🇸🇬|SG|sg|新加坡|Singapore'

config node 'node_japan_all' option label '🇯🇵 日本节点' option type 'selector' option filter_nodes 'whitelist' list filter_keywords '🇯🇵|JP|jp|日本|日|Japan'

config node 'node_usa_all' option label '🇺🇲 美国节点' option type 'selector' option filter_nodes 'whitelist' list filter_keywords '🇺🇸|US|us|美国|美|United States'

config node 'node_korea_all' option label '🇰🇷 韩国节点' option type 'selector' option filter_nodes 'whitelist' list filter_keywords '🇰🇷|KR|kr|韩国|韩|Korea'

config node 'node_hongkong_all' option label '🇭🇰 香港节点' option type 'selector' option filter_nodes 'whitelist' list filter_keywords '🇭🇰|HK|hk|香港|港|HongKong'

config node 'node_taiwan_all' option label '🇹🇼 台湾节点' option type 'selector' option filter_nodes 'whitelist' list filter_keywords '🇹🇼|TW|tw|台湾|TaiWan'

config node 'node_select_manually' option label '🐸 手动切换' option type 'selector' option filter_nodes 'blacklist' list filter_keywords '重置|到期|过期|剩余|套餐'

config node 'node_select_auto' option label '♻️ 自动选择' option type 'urltest' option test_url 'http://cp.cloudflare.com/' option interval '10m' option idle_timeout '30m'

config node 'node_direct' option label '🎯 全球直连' option type 'direct'

config node 'node_global' option label '🌏 全球代理' option type 'selector' list order 'node_select' list order 'node_singapore_all' list order 'node_japan_all' list order 'node_usa_all' list order 'node_korea_all' list order 'node_hongkong_all' list order 'node_taiwan_all' list order 'node_select_manually'

config routing_node 'select' option label '节点选择' option enabled '1' option node 'node_select'

config routing_node 'openai' option label 'OpenAI' option enabled '1' option node 'node_openai'

config routing_node 'youtube' option label 'YouTube' option enabled '1' option node 'node_youbube'

config routing_node 'google' option label 'Google' option enabled '1' option node 'node_google'

config routing_node 'github' option label 'Github' option enabled '1' option node 'node_github'

config routing_node 'telegram' option label 'Telegram' option enabled '1' option node 'node_telegram'

config routing_node 'tiktok' option label 'TikTok' option enabled '1' option node 'node_tiktok'

config routing_node 'netflix' option label 'Netflix' option enabled '1' option node 'node_netflix'

config routing_node 'microsoft' option label 'Microsoft' option enabled '1' option node 'node_microsoft'

config routing_node 'apple' option label 'Apple' option enabled '1' option node 'node_apple'

config routing_node 'global' option label 'GLOBAL' option enabled '1' option node 'node_global'

config routing_rule 'clash_mode_direct_host' option label 'clash_mode:direct' option enabled '1' option mode 'default' option clash_mode 'direct' option outbound 'direct-out'

config routing_rule 'clash_mode_global_host' option label 'clash_mode:global' option enabled '1' option mode 'default' option clash_mode 'global' option outbound 'global'

config routing_rule 'router_openai_host' option label 'OpenAI' option enabled '1' option mode 'default' list rule_set 'rule_geosite_openai' option outbound 'openai'

config routing_rule 'router_youtube_host' option label 'YouTube' option enabled '1' option mode 'default' list rule_set 'rule_geosite_youtube' option outbound 'youtube'

config routing_rule 'router_google_host' option label 'Google' option enabled '1' option mode 'default' list rule_set 'rule_geoip_google' list rule_set 'rule_geosite_google' option outbound 'google'

config routing_rule 'router_github_host' option label 'Github' option enabled '1' option mode 'default' list rule_set 'rule_geosite_github' option outbound 'github'

config routing_rule 'router_telegram_host' option label 'Telegram' option enabled '1' option mode 'default' list rule_set 'rule_geoip_telegram' list rule_set 'rule_geosite_telegram' option outbound 'telegram'

config routing_rule 'router_tiktok_host' option label 'Tiktok' option enabled '1' option mode 'default' list rule_set 'rule_geosite_tiktok' option outbound 'tiktok'

config routing_rule 'router_netflix_host' option label 'Netflix' option enabled '1' option mode 'default' list rule_set 'rule_geoip_netflix' list rule_set 'rule_geosite_netflix' option outbound 'netflix'

config routing_rule 'router_microsoft_host' option label 'Microsoft' option enabled '1' option mode 'default' list rule_set 'rule_geosite_microsoft' option outbound 'microsoft'

config routing_rule 'router_apple_host' option label 'Apple' option enabled '1' option mode 'default' list rule_set 'rule_geosite_apple' option outbound 'apple'

config routing_rule 'router_nocn_host' option label '非中国地区' option enabled '1' option mode 'default' list rule_set 'rule_geosite_geolocation_nocn' option outbound 'select'

config routing_rule 'router_cn_host' option label '中国' option enabled '1' option mode 'default' list rule_set 'rule_geoip_cn' list rule_set 'rule_geosite_cn' option outbound 'direct-out'

config dns_server 'dns_direct_dns' option label 'Direct_DNS' option enabled '1' option address '223.5.5.5' option outbound 'direct-out'

config dns_server 'dns_proxy_dns' option label 'Proxy_DNS' option enabled '1' option address 'tls://8.8.8.8' option address_resolver 'dns_direct_dns' option address_strategy 'ipv4_only' option resolve_strategy 'ipv4_only' option outbound 'select'

config dns_rule 'cn_domain' option label '中国规则' option enabled '1' option mode 'default' list rule_set 'rule_geosite_cn' option server 'dns_direct_dns'

config dns_rule 'clash_direct_domain' option label 'Clash:direct' option enabled '1' option mode 'default' option clash_mode 'direct' option server 'dns_direct_dns'

config dns_rule 'clash_global_domain' option label 'Clash:global' option enabled '1' option mode 'default' option clash_mode 'global' option server 'dns_proxy_dns'

config dns_rule 'nocn_domain' option label '非中国规则' option enabled '1' option mode 'default' list rule_set 'rule_geosite_geolocation_nocn' option server 'dns_proxy_dns'

sing-box configuration

HomeProxy log

sing-box log

OpenWrt/ImmortalWrt release

master最新

Device

Additional information

使用下游的homeproxy,支持clash面板的版本 下游Issues,下游反应,路由模式他那边没有改动,追随上游,让将该问题反应到上游。 主路由为一台X86的小主机安装的immortalwrt,旁路由使用esxi平台,安装的immortalwrt。

Terms

1715173329 commented 1 month ago

本项目不支持所谓“旁路由”,不会考虑“旁路由”任何情况。这是错误用法。