Youtube视频


相关链接

sing-box官方文档

dae官方仓库

dae config

# 全局配置
global {
    # 绑定lan网口提供给内网设备,填自己服务器的网口,多个逗号隔开
    lan_interface: ens18
    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 {
    # 配置socks5出站节点,连接到sing-box的入站
    HK: 'socks5://localhost:1080'
}

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

# dns配置
dns {
  upstream {
    googledns: 'udp://dns.google.com:53'
    alidns: 'udp://dns.alidns.com: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
  
    # 增加将sing-box流量直连不通过dae的路由配置
    pname(sing-box) -> must_direct

    # 默认出站分组
    fallback: elden_proxy
}

sing-box hysteria2 config

{
  "inbounds": [
    {
      "type": "socks",
      "tag": "socks-in",
      "listen": "::",
      "listen_port": 1080,
      "tcp_fast_open": true,
      "tcp_multi_path": false,
      "udp_fragment": true,
      "sniff": false,
      "sniff_override_destination": false,
      "sniff_timeout": "300ms",
      "udp_timeout": 300
    }
  ],
  "outbounds": [
    {
      "type": "hysteria2",
      "tag": "proxy",
      "server": "你的服务器IP或者域名",
      "server_port": 443,
      "up_mbps": 100,
      "down_mbps": 100,
      "password": "你的密码",
      "tls": {
        "enabled": true,
        "server_name": "你的域名"
      },
      "brutal_debug": false
    }
  ],
  "route": {
    "auto_detect_interface": true,
    "final": "proxy"
  }
}
如果觉得我的文章对你有用,请随意赞赏