cilium / ebpf

ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.

Home Page:https://ebpf-go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dae can not recognize pppoe dial-up interface and route out correctly.

yesiamchinese opened this issue · comments

Describe the bug

When dae running in a host with a pppoe dial-up interface, No matter whether the configuration 'wan_interface' set to 'auto' or ppp0 (the dial-up ppp interface name), accessing foreign websites always fails (access www.baidu.com is normal).

How to reproduce

1. setup a pppoe dial-up config
2. dail-up to internet, the pppoe interface name is ppp0
3. set dae wan_interface to 'auto' or 'ppp0'
3. start dae
4. access www.baidu.com normally
5. access foreign website fails.

config.dae:
global {
    lan_interface: ens192
    wan_interface: auto # ppp0
    log_level: info # 日志级别:error,warn,info,debug,trace。
    auto_config_kernel_parameter: true
    dial_mode: domain

    # 等待用于嗅探的第一个数据发送的超时时间。如果dial_mode为ip,则始终为0。在高延迟LAN网络中设置较高的值是有用的
    sniffing_timeout: 200ms
    allow_insecure: true

    so_mark_from_dae: 1234

    # tls配置
    tls_implementation: utls
    utls_imitate: chrome_auto

    ##### 节点连接检查。

    tcp_check_url: 'http://cp.cloudflare.com,1.1.1.1'

    # 此DNS将用于检查节点的UDP连接性。如果下面的dns_upstream包含tcp,则还将用于检查节点的TCP DNS连接性。
    udp_check_dns: 'dns.google.com:53,8.8.8.8'

    check_interval: 30s

    # 当新延迟 <= 旧延迟 - 容差时,组将仅切换节点。
    check_tolerance: 50ms
}

# 订阅配置
subscription {
}

# 节点配置
node {
    # 节点URI
    hysteria:    'socks5://localhost:1080' # hysteria verion 2 client socks5 function nomorly
}

# 分组配置,以下采用固定策略,使用第一个节点
group {
    dae_proxy {
        policy: min #fixed(0)
    }
}

# dns配置
dns {
  upstream {
    googledns: 'tcp://dns.google.com:53'
    #alidns: 'udp://dns.alidns.com:53'
    alidns: 'udp://223.5.5.5:53'
  }

  routing {
    request {
      qname(geosite:cn) -> alidns
      fallback: googledns
    }

  response {
      upstream(googledns) -> accept
      ip(geoip:private) && !qname(geosite:cn) -> googledns
      # 以上不匹配,默认
      fallback: accept
    }
  }
}

# 路由配置
routing {
    pname(NetworkManager) -> direct
    pname(hysteria) -> direct # hysteria verion 2 process name

    dip(223.5.5.5/32) -> direct
    dip(224.0.0.0/3, 'ff00::/8') -> direct
    dip(geoip:private) -> direct
    
    ## 规则
    domain(cp.cloudflare.com) -> direct
    ip(8.8.8.8) -> direct
    ip(1.1.1.1/32) -> direct
    ip(223.5.5.5) -> direct
    ip(geoip:cn) -> direct
    domain(geosite:cn) -> direct
    domain(geosite:category-ads) -> block

    # 默认出站分组
    fallback: dae_proxy
}

Version information

github.com/daeuniverse/dae v0.5.1

Hi, I think you'created this issue in the wrong repository! Please reopen this in github.com/daeuniverse/dae.