[Bug Report] <geosite flag not working>
Closed this issue · 8 comments
Checks
- I have searched the existing issues
- I have read the documentation
- Is it your first time sumbitting an issue
Current Behavior
dae routing policy doesn't work with the flag "gfw" in geosite.dat(from github.com/Loyalsoldier/v2ray-rules-dat). I noticed that dae only knows flag "cn".
my config:
global {
tproxy_port: 12345
tproxy_port_protect: true
pprof_port: 0
so_mark_from_dae: 0
log_level: info
disable_waiting_network: false
enable_local_tcp_fast_redirect: false
lan_interface: ens11
wan_interface: ens12
auto_config_kernel_parameter: true
tcp_check_url: 'http://cp.cloudflare.com,1.1.1.1,2606:4700:4700::1111'
tcp_check_http_method: HEAD
udp_check_dns: 'dns.google.com:53,8.8.8.8,2001:4860:4860::8888'
check_interval: 30s
# Group will switch node only when new_latency <= old_latency - tolerance.
check_tolerance: 50ms
dial_mode: domain
allow_insecure: false
sniffing_timeout: 100ms
tls_implementation: tls
utls_imitate: chrome_auto
}
subscription {
}
node {
node1: 'http://192.168.0.3:9999'
}
dns {
ipversion_prefer: 4
upstream {
alidns: 'udp://223.5.5.5:53'
googledns: 'tcp+udp://8.8.8.8:53'
}
routing {
request {
# Lookup China mainland domains using alidns, otherwise googledns.
qname(geosite:cn) -> alidns
!qname(geosite:cn) -> googledns
# fallback is also called default.
fallback: alidns
}
}
}
group {
proxy {
policy: min_moving_avg
}
}
routing {
pname(NetworkManager, systemd-resolved) -> must_direct
dip(224.0.0.0/3, 'ff00::/8') -> direct
dip(geoip:private) -> direct
dscp(4) -> direct
dip(geoip:cn) -> direct
domain(geosite:cn) -> direct
domain(geosite:gfw) -> proxy
#domain(ext:"geosite.dat:proxy") -> proxy
fallback: direct
#fallback: proxy
}
Environment
- Dae version (use
dae --version
): - OS (e.g
cat /etc/os-release
): - Kernel (e.g.
uname -a
): - Others:
dae version v0.7.0
OS: Debian 6.1.99-1 (2024-07-15) x86_64
kernel: 6.1.0-23-amd64
Thanks for opening this issue!
什么意思,run 不起来?报错是什么?你把.dat放到哪里的
什么意思,run 不起来?报错是什么?你把.dat放到哪里的
config.dae文件内设置的路由策略中还是只有“geosite:cn“起作用,”geosite:gfw"不起作用。
路由策略配置如下:
dip(geoip:cn) -> direct
domain(geosite:cn) -> direct
domain(geosite:gfw) -> proxy
#domain(ext:"geosite.dat:proxy") -> proxy
fallback: direct
没有报错,服务运行正常,就是路由不对。
geosite.dat和geoip.dat都放在 ”/usr/local/share/dae/“ 文件夹下。
@julicis 什么的路由不对,日志看看?
路由策略里面只有改成fallback:proxy才能通过dae代理访问google。 请帮忙看看是什么原因。谢谢!
日志信息如下:
Aug 21 06:40:42 router dae[2727]: level=info msg="Group selects dialer" dialer=node1 group=proxy network=tcp4
Aug 21 06:40:42 router dae[2727]: level=info msg="Group selects dialer" dialer=node1 group=proxy network=tcp6
Aug 21 06:40:42 router dae[2727]: level=info msg="Group selects dialer" dialer=node1 group=proxy network="udp4(DNS)"
Aug 21 06:40:42 router dae[2727]: level=info msg="Group selects dialer" dialer=node1 group=proxy network="udp6(DNS)"
Aug 21 06:40:42 router dae[2727]: level=info msg="Group selects dialer" dialer=node1 group=proxy network="tcp4(DNS)"
Aug 21 06:40:42 router dae[2727]: level=info msg="Group selects dialer" dialer=node1 group=proxy network="tcp6(DNS)"
Aug 21 06:40:42 router dae[2727]: level=info msg="Routing match set len: 10/64"
Aug 21 06:40:44 router systemd[1]: Started dae.service - dae Service.
░░ Subject: A start job for unit dae.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit dae.service has finished successfully.
░░
░░ The job identifier is 11585.
Aug 21 06:40:44 router dae[2727]: level=info msg="[ALIVE --udp4(DNS)-> NOT ALIVE]" dialer=node1 group=proxy
Aug 21 06:40:44 router dae[2727]: level=info msg="Group has no dialer alive" group=proxy network="udp4(DNS)"
Aug 21 06:40:44 router dae[2727]: level=info msg="[ALIVE --udp6(DNS)-> NOT ALIVE]" dialer=node1 group=proxy
Aug 21 06:40:44 router dae[2727]: level=info msg="Group has no dialer alive" group=proxy network="udp6(DNS)"
Aug 21 06:40:44 router dae[2727]: level=info msg="[ALIVE --tcp6(DNS)-> NOT ALIVE]" dialer=node2 group=proxy
Aug 21 06:40:44 router dae[2727]: level=info msg="[ALIVE --udp4(DNS)-> NOT ALIVE]" dialer=node2 group=proxy
Aug 21 06:40:44 router dae[2727]: level=info msg="[ALIVE --udp6(DNS)-> NOT ALIVE]" dialer=node2 group=proxy
Aug 21 06:40:44 router dae[2727]: level=info msg="[ALIVE --tcp6-> NOT ALIVE]" dialer=node2 group=proxy
Aug 21 06:40:44 router dae[2727]: level=info msg="[ALIVE --tcp4-> NOT ALIVE]" dialer=node2 group=proxy
Aug 21 06:40:44 router dae[2727]: level=info msg="[ALIVE --tcp4(DNS)-> NOT ALIVE]" dialer=node2 group=proxy
Aug 21 06:40:45 router dae[2727]: level=info msg="[ALIVE --tcp4(DNS)-> NOT ALIVE]" dialer=node1 group=proxy
Aug 21 06:40:45 router dae[2727]: level=info msg="Group has no dialer alive" group=proxy network="tcp4(DNS)"
Aug 21 06:40:45 router dae[2727]: level=info msg="[ALIVE --tcp6(DNS)-> NOT ALIVE]" dialer=node1 group=proxy
Aug 21 06:40:45 router dae[2727]: level=info msg="Group has no dialer alive" group=proxy network="tcp6(DNS)"
Aug 21 06:40:54 router dae[2727]: level=info msg="[ALIVE --tcp6(DNS)-> NOT ALIVE]" dialer=node3 group=proxy
Aug 21 06:40:54 router dae[2727]: level=info msg="[ALIVE --tcp4-> NOT ALIVE]" dialer=node3 group=proxy
@julicis 什么的路由不对,日志看看?
@mzz2017 感觉DNS解析都对,但是还是访问不到youtube。请教一下什么原因?
Aug 22 08:35:53 router dae[4932]: level=info msg="Group "proxy" node list:"
Aug 22 08:35:53 router dae[4932]: level=info msg=" node1"
Aug 22 08:35:53 router dae[4932]: level=info msg="Group selects dialer" dialer=node1 group=proxy network=tcp4
Aug 22 08:35:53 router dae[4932]: level=trace msg="Outbound <> tcp4 -> ALIVE, notify the kernel program." outboundId=2
Aug 22 08:35:53 router dae[4932]: level=info msg="Group selects dialer" dialer=node1 group=proxy network=tcp6
Aug 22 08:35:53 router dae[4932]: level=trace msg="Outbound <> tcp6 -> ALIVE, notify the kernel program." outboundId=2
Aug 22 08:35:53 router dae[4932]: level=info msg="Group selects dialer" dialer=node1 group=proxy network="udp4(DNS)"
Aug 22 08:35:53 router dae[4932]: level=trace msg="Outbound <> udp4 -> ALIVE, notify the kernel program." outboundId=2
Aug 22 08:35:53 router dae[4932]: level=info msg="Group selects dialer" dialer=node1 group=proxy network="udp6(DNS)"
Aug 22 08:35:53 router dae[4932]: level=trace msg="Outbound <> udp6 -> ALIVE, notify the kernel program." outboundId=2
Aug 22 08:35:53 router dae[4932]: level=info msg="Group selects dialer" dialer=node1 group=proxy network="tcp4(DNS)"
Aug 22 08:35:53 router dae[4932]: level=info msg="Group selects dialer" dialer=node1 group=proxy network="tcp6(DNS)"
Aug 22 08:35:53 router dae[4932]: level=debug msg="Search "geoip.dat" in [/etc/dae, /root/.local/share/dae, /usr/local/share/dae, /usr/share/dae]"
Aug 22 08:35:53 router dae[4932]: level=debug msg="Found "geoip.dat" at /usr/local/share/dae/geoip.dat"
Aug 22 08:35:53 router dae[4932]: level=debug msg="Read geoip "geoip.dat:private" from /usr/local/share/dae/geoip.dat"
Aug 22 08:35:53 router dae[4932]: level=debug msg="Read geoip "geoip.dat:cn" from /usr/local/share/dae/geoip.dat"
Aug 22 08:35:53 router dae[4932]: level=debug msg="Search "geosite.dat" in [/etc/dae, /root/.local/share/dae, /usr/local/share/dae, /usr/share/dae]"
Aug 22 08:35:53 router dae[4932]: level=debug msg="Found "geosite.dat" at /usr/local/share/dae/geosite.dat"
Aug 22 08:35:53 router dae[4932]: level=debug msg="Read geosite "geosite.dat:cn" from /usr/local/share/dae/geosite.dat"
Aug 22 08:35:53 router dae[4932]: level=debug msg="Read geosite "geosite.dat:gfw" from /usr/local/share/dae/geosite.dat"
Aug 22 08:35:53 router dae[4932]: level=debug msg="RoutingA:
Aug 22 08:35:53 router dae[4932]: pname([n = 1]) -> direct(must)
Aug 22 08:35:53 router dae[4932]: ip([n = 18]) -> direct
Aug 22 08:35:53 router dae[4932]: dscp([n = 1]) -> direct
Aug 22 08:35:53 router dae[4932]: ip([n = 18864]) -> direct
Aug 22 08:35:53 router dae[4932]: domain([n = 88615]) -> direct
Aug 22 08:35:53 router dae[4932]: domain([n = 6118]) -> proxy
Aug 22 08:35:53 router dae[4932]: fallback: direct
Aug 22 08:35:53 router dae[4932]: "
Aug 22 08:35:53 router dae[4932]: level=info msg="Routing match set len: 9/64"
Aug 22 08:35:54 router dae[4932]: level=debug msg="Connectivity Check Failed" err="connect server using proxy error, StatusCode [403]" network="tcp4(DNS)" node=node1
Aug 22 08:35:54 router dae[4932]: level=info msg="[ALIVE --tcp4(DNS)-> NOT ALIVE]" dialer=node1 group=proxy
Aug 22 08:35:54 router dae[4932]: level=info msg="Group has no dialer alive" group=proxy network="tcp4(DNS)"
Aug 22 08:35:54 router dae[4932]: level=warning msg="[Reload] Stopped old control plane"
Aug 22 08:35:54 router dae[4932]: level=warning msg="[Reload] Serve"
Aug 22 08:35:54 router dae[4932]: level=debug msg="Skip check due to no DNS record." dialer=node1 link=[dns.google.com:53 8.8.8.8] network="tcp6(DNS)"
Aug 22 08:35:54 router dae[4932]: level=info msg="[ALIVE --tcp6(DNS)-> NOT ALIVE]" dialer=node1 group=proxy
Aug 22 08:35:54 router dae[4932]: level=info msg="Group has no dialer alive" group=proxy network="tcp6(DNS)"
Aug 22 08:35:54 router dae[4932]: level=debug msg="Connectivity Check Failed" err="unknown network unsupported tunnel type" network="udp4(DNS)" node=node1
Aug 22 08:35:54 router dae[4932]: level=info msg="[ALIVE --udp4(DNS)-> NOT ALIVE]" dialer=node1 group=proxy
Aug 22 08:35:54 router dae[4932]: level=info msg="Group has no dialer alive" group=proxy network="udp4(DNS)"
Aug 22 08:35:54 router dae[4932]: level=debug msg="Skip check due to no DNS record." link=[dns.google.com:53 8.8.8.8] network="udp6(DNS)"
Aug 22 08:35:54 router dae[4932]: level=info msg="[ALIVE --udp6(DNS)-> NOT ALIVE]" dialer=node1 group=proxy
Aug 22 08:35:54 router dae[4932]: level=info msg="Group has no dialer alive" group=proxy network="udp6(DNS)"
Aug 22 08:35:54 router dae[4932]: level=debug msg="Skip check due to no DNS record." dialer=node1 link=[http://cp.cloudflare.com 1.1.1.1] network=tcp6
Aug 22 08:35:54 router dae[4932]: level=info msg="[ALIVE --tcp6-> NOT ALIVE]" dialer=node1 group=proxy
Aug 22 08:35:54 router dae[4932]: level=info msg="Group has no dialer alive" group=proxy network=tcp6
Aug 22 08:35:54 router dae[4932]: level=warning msg="[Reload] Finished"
Aug 22 08:35:54 router dae[4932]: level=debug msg="Connectivity Check Failed" err="connect server using proxy error, StatusCode [403]" network="tcp4(DNS)" node=node1
Aug 22 08:35:54 router dae[4932]: level=info msg="[ALIVE --tcp4(DNS)-> NOT ALIVE]" dialer=node1 group=proxy
Aug 22 08:35:54 router dae[4932]: level=info msg="Group has no dialer alive" group=proxy network="tcp4(DNS)"
Aug 22 08:35:55 router dae[4932]: level=debug msg="Connectivity Check" avg_10=1.052s last=1.052s mov_avg=526ms network=tcp4 node=node1
Aug 22 08:36:08 router dae[4932]: level=debug msg="UDP(DNS) 192.168.10.250:57170 <-> Cache: www.baidu.com. A"
Aug 22 08:36:08 router dae[4932]: level=info msg="192.168.10.250:57170 <-> 223.5.5.5:53" _qname=www.baidu.com. dialer=direct dscp=0 mac="60:45:cb:9e:24:4f" network="udp4(DNS)" outbound=direct pid=0 pname= policy=fixed qtype=AAAA
Aug 22 08:36:48 router dae[4932]: level=trace msg="Received UDP(DNS) 192.168.10.250:59440 <-> 192.168.10.11:53: www.youtube.com. A"
Aug 22 08:36:48 router dae[4932]: level=trace msg="Received UDP(DNS) 192.168.10.250:56430 <-> 192.168.10.11:53: www.youtube.com. HTTPS"
Aug 22 08:36:48 router dae[4932]: level=trace msg="Request to DNS upstream" question=[{www.youtube.com. 1 1}] upstream="udp://dns.alidns.com:53"
Aug 22 08:36:48 router dae[4932]: level=trace msg="Request to DNS upstream" question=[{www.youtube.com. 28 1}] upstream="udp://dns.alidns.com:53"
Aug 22 08:36:48 router dae[4932]: level=trace msg="Request to DNS upstream" question=[{www.youtube.com. 65 1}] upstream="udp://dns.alidns.com:53"
Aug 22 08:36:48 router dae[4932]: level=trace msg="Choose DNS path" choose="udp+4" ipversions=[4 6] l4protos=[udp] upstream="udp://dns.alidns.com:53" use="223.6.6.6:53"
Aug 22 08:36:48 router dae[4932]: level=trace msg="Choose DNS path" choose="udp+4" ipversions=[4 6] l4protos=[udp] upstream="udp://dns.alidns.com:53" use="223.6.6.6:53"
Aug 22 08:36:48 router dae[4932]: level=trace msg="Choose DNS path" choose="udp+4" ipversions=[4 6] l4protos=[udp] upstream="udp://dns.alidns.com:53" use="223.6.6.6:53"
Aug 22 08:36:48 router dae[4932]: level=trace msg=Accept question=[{www.youtube.com. 28 1}] upstream="udp://dns.alidns.com:53"
Aug 22 08:36:48 router dae[4932]: level=info msg="192.168.10.250:59440 <-> 223.6.6.6:53" _qname=www.youtube.com. dialer=direct dscp=0 mac="60:45:cb:9e:24:4f" network="udp4(DNS)" outbound=direct pid=0 pname= policy=fixed qtype=AAAA
Aug 22 08:36:48 router dae[4932]: level=trace msg="Update DNS record cache" _qname=www.youtube.com. ans="www.youtube.com.(AAAA): 2001::1" rcode=0
Aug 22 08:36:48 router dae[4932]: level=trace msg=Accept question=[{www.youtube.com. 65 1}] upstream="udp://dns.alidns.com:53"
Aug 22 08:36:48 router dae[4932]: level=info msg="192.168.10.250:56430 <-> 223.6.6.6:53" _qname=www.youtube.com. dialer=direct dscp=0 mac="60:45:cb:9e:24:4f" network="udp4(DNS)" outbound=direct pid=0 pname= policy=fixed qtype=HTTPS
Aug 22 08:36:48 router dae[4932]: level=trace msg="Update DNS record cache" _qname=www.youtube.com. ans= rcode=0
Aug 22 08:36:48 router dae[4932]: level=trace msg=Accept question=[{www.youtube.com. 1 1}] upstream="udp://dns.alidns.com:53"
Aug 22 08:36:48 router dae[4932]: level=info msg="192.168.10.250:59440 <-> 223.6.6.6:53" _qname=www.youtube.com. dialer=direct dscp=0 mac="60:45:cb:9e:24:4f" network="udp4(DNS)" outbound=direct pid=0 pname= policy=fixed qtype=A
Aug 22 08:36:48 router dae[4932]: level=trace msg="Update DNS record cache" _qname=www.youtube.com. ans="www.youtube.com.(A): 199.59.148.20" rcode=0