daeuniverse / dae

eBPF-based Linux high-performance transparent proxy solution.
GNU Affero General Public License v3.0
3.24k stars 201 forks source link

dae v0.7.0 使用hysteria2失败,提示failed to parse node: parse "hysteria2:// #590

Closed hiifeng closed 3 months ago

hiifeng commented 3 months ago

Checks

Support Request

帮忙分析故障原因

Current Behavior

详细情况如下:

Expected Behavior

No response

Steps to Reproduce

root@armbian:~# uname -r
6.6.28-ophub

Environment

root@armbian:~# dae -v
dae version v0.7.0
go runtime go1.22.5 linux/arm64
Copyright (c) 2022-2024 @daeuniverse
License GNU AGPLv3 <https://github.com/daeuniverse/dae/blob/main/LICENSE>
root@armbian:~# systemctl restart dae
root@armbian:~# systemctl status dae
● dae.service - dae Service
     Loaded: loaded (/etc/systemd/system/dae.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2024-07-23 15:47:43 CST; 2s ago
       Docs: https://github.com/daeuniverse/dae
    Process: 2736 ExecStartPre=/usr/bin/dae validate -c /etc/dae/config.dae (code=exited, status=0/SUCCESS)
   Main PID: 2744 (dae)
      Tasks: 12 (limit: 1744)
     Memory: 134.1M
        CPU: 28.065s
     CGroup: /system.slice/dae.service
             └─2744 /usr/bin/dae run --disable-timestamp -c /etc/dae/config.dae

Jul 23 15:47:42 armbian dae[2744]: level=info msg="Loaded eBPF programs and maps"
Jul 23 15:47:42 armbian dae[2744]: level=info msg="Bind to LAN: eth0"
Jul 23 15:47:42 armbian dae[2744]: level=info msg="Bind to WAN: eth0"
Jul 23 15:47:42 armbian dae[2744]: level=info msg="failed to parse node: parse "hysteria2://authpassword@example.com:10086,25000-30000/>
Jul 23 15:47:42 armbian dae[2744]: level=info msg="Group "ifeng_proxy" node list:"
Jul 23 15:47:42 armbian dae[2744]: level=info msg="        <Empty>"
Jul 23 15:47:42 armbian dae[2744]: level=info msg="Routing match set len: 10/64"
Jul 23 15:47:43 armbian systemd[1]: Started dae Service.
Jul 23 15:47:43 armbian dae[2744]: level=info msg="192.168.0.152:57350 <-> 114.114.114.114:53" _qname=static-pcs-sdk-server.alibaba.com. dialer=direct dscp=0 m>
Jul 23 15:47:43 armbian dae[2744]: level=info msg="192.168.0.152:60140 <-> 114.114.114.114:53" _qname=static-pcs-sdk-server.alibaba.com. dialer=direct dscp=0 m>
lines 1-22/22 (END)

Anything else?

root@armbian:~# cat /etc/dae/config.dae
# 全局配置
global {
    # 绑定lan网口提供给内网设备,填自己服务器的网口,多个逗号隔开
    lan_interface: eth0
    wan_interface: auto
    log_level: info
    auto_config_kernel_parameter: true
    dial_mode: domain
    allow_insecure: false
    so_mark_from_dae: 1234

    # tls配置
    tls_implementation: utls
    utls_imitate: chrome_auto
}
# 订阅配置
subscription {
}
# 节点配置
node {
    # 节点URI
    US: 'hysteria2://authpassword@example.com:10086,25000-30000/?obfs=salamander&obfs-password=obfspassword'
}
# 分组配置,以下采用固定策略,使用第一个节点
group {
    ifeng_proxy {
        policy: fixed(0)
    }
}
# dns配置
dns {
  upstream {
    googledns: 'tcp+udp://dns.google.com:53'
    alidns: 'udp://114.114.114.114:53'
  }
  routing {
    request {
      qname(geosite:cn) -> alidns
      fallback: googledns
    }
    response {
        upstream(googledns) -> accept
        fallback: accept
    }
  }
}
# 路由配置
routing {
    pname(NetworkManager) -> direct
    dip(224.0.0.0/3, 'ff00::/8') -> direct
    dip(geoip:private) -> direct

    ### 以下是自定义规则
    ## 规则
    ip(geoip:cn) -> direct
    domain(geosite:cn) -> direct
    domain(geosite:category-ads) -> block

    ## hysteria 配置
    pname(hysteria) -> must_direct

    # 默认出站分组
    fallback: ifeng_proxy
}
dae-prow[bot] commented 3 months ago

Thanks for opening this issue!

wanlce commented 3 months ago

@hiifeng The obfuscation feature has not been implemented yet

hiifeng commented 3 months ago

@hiifeng 混淆功能尚未实现

感谢回复,我换了一个没有混淆的hy2节点,出现如下提示:

journalctl -xeu dae.service -a
......
Jul 23 16:19:26 armbian dae[3187]: level=info msg="failed to parse node: parse "hysteria2://***@abc.com:8550,45000-50000/": invalid port ":8550,45000-50000" after host"
Jul 23 16:19:26 armbian dae[3187]: level=info msg="Group "ifeng_proxy" node list:"
Jul 23 16:19:26 armbian dae[3187]: level=info msg="     <Empty>"
......
wanlce commented 3 months ago

端口跳跃好像也还没支持(

hiifeng commented 3 months ago

端口跳跃好像也还没支持(

非常感谢你的回复,告诉我这些信息。我关闭混淆,改为单端口后,从日志信息里看到在启动dae时,解析hy2 URL里的域名失败了。。。

journalctl -xeu dae.service -a
Jul 23 16:45:13 armbian dae[4040]: level=info msg="failed to parse node: create hysteria2://***@abc.com:8550: lookup abc.com on  [当地运营商IPV6 dns]:53: read udp [本机ipv6地址]:63930->[当地运营商ipv6 dns]:53: i/o timeout"
Jul 23 16:45:13 armbian dae[4040]: level=info msg="Group "ifeng_proxy" node list:"
Jul 23 16:45:13 armbian dae[4040]: level=info msg="     <Empty>"
lcx12901 commented 3 months ago

使用hysteria2://authpassword@example.com,主机名是域名时,无法进行nslookup

hiifeng commented 3 months ago

使用hysteria2://authpassword@example.com,主机名是域名时,无法进行nslookup

我这样理解正确吗?dae目前不支持hysteria2 URL中的域名解析,必须使用hysteria2://[authpassword@IP/?sin=domainname这种格式?

hiifeng commented 3 months ago

@wanlce @lcx12901 再次感谢两位大佬的回复,目前我已用上 hysteria2 了。 经测试 dae v0.7.0 版本在使用 hysteria2 时,不支持混淆和端口跳跃功能,URL中的主机名时域名时,无法正常解析。 dae v0.7.0 版本目前可用的 URL 格式为: hysteria2://authpassword@serverIP:port/?sin=domainname

Alex-Joe-Lee commented 2 months ago

armbian的固件是从哪里下载的?

hiifeng commented 2 months ago

armbian的固件是从哪里下载的?

不同的设备使用的固件不同,你是什么设备?

Alex-Joe-Lee commented 2 months ago

armbian的固件是从哪里下载的?

不同的设备使用的固件不同,你是什么设备?

H28K