daed启动失败

sudo systemctl start daed是没有报错的, 报错在用webui的开关启动的时候

sudo systemctl status daed

daed.service - daed is a integration solution of dae, API and UI.
     Loaded: loaded (/usr/lib/systemd/system/daed.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Fri 2025-11-21 13:25:58 CST; 39s ago
   Duration: 1min 18.255s
 Invocation: b8763aeccb094d4cb722f12ea877e282
       Docs: https://github.com/daeuniverse/daed
    Process: 5305 ExecStart=/usr/bin/daed run -c /etc/daed/ (code=exited, status=2)
   Main PID: 5305 (code=exited, status=2)
   Mem peak: 116.9M
        CPU: 932ms

Nov 21 13:25:58 archlinux daed[5305]:         github.com/daeuniverse/dae-wing/dae/run.go:220 +0x499
Nov 21 13:25:58 archlinux daed[5305]: github.com/daeuniverse/dae-wing/dae.Run(0x5c5d7202d420, 0xc0004f4908, {0xc000576000, 0x1, 0x1}, 0x0, 0x0)
Nov 21 13:25:58 archlinux daed[5305]:         github.com/daeuniverse/dae-wing/dae/run.go:157 +0x875
Nov 21 13:25:58 archlinux daed[5305]: github.com/daeuniverse/dae-wing/cmd.init.func6.1()
Nov 21 13:25:58 archlinux daed[5305]:         github.com/daeuniverse/dae-wing/cmd/run.go:98 +0x7c
Nov 21 13:25:58 archlinux daed[5305]: created by github.com/daeuniverse/dae-wing/cmd.init.func6 in goroutine 1
Nov 21 13:25:58 archlinux daed[5305]:         github.com/daeuniverse/dae-wing/cmd/run.go:97 +0x233
Nov 21 13:25:58 archlinux systemd[1]: daed.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 21 13:25:58 archlinux systemd[1]: daed.service: Failed with result 'exit-code'.
Nov 21 13:25:58 archlinux systemd[1]: daed.service: Consumed 932ms CPU time, 116.9M memory peak.

用的是archlinuxcn源里的包

journalctl -u daed -o cat -e

Started daed is a integration solution of dae, API and UI..
time="2025-11-21T14:58:04+08:00" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFr
omDae type=uint32
time="2025-11-21T14:58:04+08:00" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFr
omDae type=uint32
time="2025-11-21T14:58:04+08:00" level=info msg="Listen on http://127.0.0.1:2023"
time="2025-11-21T14:58:04+08:00" level=info msg="Listen on http://192.168.0.58:2023"
time="2025-11-21T14:58:04+08:00" level=info msg="Listen on http://[::1]:2023"
time="2025-11-21T14:58:04+08:00" level=info msg="Listen on http://[fe80::3f02:9919:3eb5:8c95]:2023"
time="2025-11-21T14:58:05+08:00" level=info msg="Loading eBPF programs and maps into the kernel..."
time="2025-11-21T14:58:05+08:00" level=info msg="The loading process takes about 120MB free memory, which will be releas
ed after loading. Insufficient memory will cause loading failure."
time="2025-11-21T14:58:05+08:00" level=info msg="Loaded eBPF programs and maps"
time="2025-11-21T14:58:05+08:00" level=info msg="Routing match set len: 1/1024"
time="2025-11-21T14:58:05+08:00" level=info msg=Ready
time="2025-11-21T14:58:06+08:00" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFr
omDae type=uint32
time="2025-11-21T14:58:06+08:00" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFr
omDae type=uint32
time="2025-11-21T14:58:07+08:00" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFr
omDae type=uint32
time="2025-11-21T14:58:07+08:00" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFr
omDae type=uint32
time="2025-11-21T14:58:07+08:00" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFr
omDae type=uint32
time="2025-11-21T14:58:07+08:00" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFr
omDae type=uint32
time="2025-11-21T14:58:12+08:00" level=warning msg="[Reload] Received reload signal; prepare to reload"
time="Nov 21 14:58:12" level=warning msg="[Reload] Load new control plane"
panic: not an ip:port
goroutine 23 [running]:
net/netip.MustParseAddrPort(...)
        net/netip/netip.go:1131
github.com/daeuniverse/dae-wing/dae.newControlPlane(0xc00320ca00, {0x14fffa0, 0xc00067b260}, 0xc003227b30, 0x1?, {0xc000
13e160, 0x1, 0x1})
        github.com/daeuniverse/dae-wing/dae/run.go:220 +0x485
github.com/daeuniverse/dae-wing/dae.Run(0x2ae6380, 0xc0004ea008, {0xc00013e160, 0x1, 0x1}, 0x0, 0x0)
        github.com/daeuniverse/dae-wing/dae/run.go:157 +0x877
github.com/daeuniverse/dae-wing/cmd.init.func6.1()
        github.com/daeuniverse/dae-wing/cmd/run.go:98 +0x7c
created by github.com/daeuniverse/dae-wing/cmd.init.func6 in goroutine 1
        github.com/daeuniverse/dae-wing/cmd/run.go:97 +0x233
daed.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
daed.service: Failed with result 'exit-code'.
daed.service: Consumed 844ms CPU time, 105.2M memory peak.

路由配置

pname(NetworkManager, systemd-resolved, dnsmasq) -> must_direct
dip(geoip:private) -> direct
dip(geoip:cn) -> direct
domain(geosite:cn) -> direct
fallback: proxy

dns配置

upstream {
  alidns: 'udp://223.5.5.5:53'
  googledns: 'tcp+udp://8.8.8.8:53'
}
routing {
  request {
    qname(geosite:cn) -> alidns
    fallback: googledns
  }
}

这是啥原因? -_-

MustParseAddrPort解析地址失败。

是在解析后备DNS服务器的时候。

所以是不支持这里写协议名。只能写IP地址:端口号

改成了这样

upstream {
  alidns: '223.5.5.5:53'
  googledns: '8.8.8.8:53'
}
routing {
  request {
    qname(geosite:cn) -> alidns
    fallback: googledns
  }
}

好像没变化呢

daed run                                                                                      ✘ 2
WARN[0000] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0000] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
INFO[0000] Listen on http://127.0.0.1:2023
INFO[0000] Listen on http://192.168.0.58:2023
INFO[0000] Listen on http://[::1]:2023
INFO[0000] Listen on http://[fe80::3f02:9919:3eb5:8c95]:2023
WARN[0000] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0000] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
INFO[0000] Loading eBPF programs and maps into the kernel...
INFO[0000] The loading process takes about 120MB free memory, which will be released after loading. Insufficient memory will cause loading failure.
INFO[0000] Loaded eBPF programs and maps
INFO[0000] Routing match set len: 1/1024
INFO[0000] Ready
WARN[0003] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0003] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0015] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0015] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0016] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0016] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0026] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0026] dangerous converting: may exceeds graphQL int32 range  name=SoMarkFromDae type=uint32
WARN[0031] [Reload] Received reload signal; prepare to reload
[Nov 21 16:47:34]  WARN Reload: Load new control plane
panic: not an ip:port

goroutine 19 [running]:
net/netip.MustParseAddrPort(...)
        net/netip/netip.go:1131
github.com/daeuniverse/dae-wing/dae.newControlPlane(0xc003327200, {0x14fffa0, 0xc000b28000}, 0xc0033bade0, 0x1?, {0xc0005a4000, 0x1, 0x1})
        github.com/daeuniverse/dae-wing/dae/run.go:220 +0x485
github.com/daeuniverse/dae-wing/dae.Run(0x2ae6380, 0xc000586008, {0xc0005a4000, 0x1, 0x1}, 0x0, 0x0)
        github.com/daeuniverse/dae-wing/dae/run.go:157 +0x877
github.com/daeuniverse/dae-wing/cmd.init.func6.1()
        github.com/daeuniverse/dae-wing/cmd/run.go:98 +0x7c
created by github.com/daeuniverse/dae-wing/cmd.init.func6 in goroutine 1
        github.com/daeuniverse/dae-wing/cmd/run.go:97 +0x233

和我跑在虚拟机里有关系么

诶,那不知道了……

:smiling_face_with_tear:
那我再去扒拉扒拉别的地方看看

解决了, 确实是DNS写法问题, 写成这样

upstream {
  alidns: 'udp://223.5.5.5:53'
  googledns: 'udp://8.8.8.8:53'
}
routing {
  request {
    qname(geosite:cn) -> alidns
    fallback: googledns
  }
}

就行, 然后把global那里的fallbackResolver加上端口号
"fallbackResolver": "119.29.29.29:53",
现在是代理不通

curl -I -v https://www.google.com

* Could not resolve host: www.google.com
* Store negative name resolve for www.google.com:443
* shutting down connection #0
curl: (6) Could not resolve host: www.google.com

出现了这个

time="Nov 21 17:54:53" level=warning msg="handlePkt: no proper dialer for DNS upstream: udp://8.8.8.8:53"

针对8.8.8.8加了一个dialer以后

curl -v https://www.google.com                                                               ✘ 35
* Host www.google.com:443 was resolved.
* IPv6: 2001::1
* IPv4: 157.240.17.35
*   Trying [2001::1]:443...
* Immediate connect fail for 2001::1: Network is unreachable
*   Trying 157.240.17.35:443...
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* SSL Trust Anchors:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
* TLSv1.3 (OUT), TLS alert, decode error (562):
* TLS connect error: error:0A000126:SSL routines::unexpected eof while reading
* closing connection #0
curl: (35) TLS connect error: error:0A000126:SSL routines::unexpected eof while reading

又去研究了一下, 发现DNS那块是这样写的:

upstream {
    googledns: 'tcp+udp://dns.google.com:53'
    alidns: 'udp://dns.alidns.com:53'
  }
  routing {
    request {
      fallback: alidns
    }
    response {
      upstream(googledns) -> accept
      ip(geoip:private) && !qname(geosite:cn) -> googledns
      fallback: accept
    }
  }

然后路由规则是这样

pname(NetworkManager) -> direct
dip(224.0.0.0/3, 'ff00::/8') -> direct
# 这里是禁用 H3, 因为文档说这东西消耗很多 CPU 和内存, 虽然我不知道啥是H3
l4proto(udp) && dport(443) -> block
dip(geoip:private) -> direct
dip(geoip:cn) -> direct
domain(geosite:cn) -> direct
fallback: proxy

然后把群组改为fixed并只添加一个节点, 可以连通代理, 使用min_moving_avg不行

而且开机以后如果直接在终端里curl -v https://www.google.com还是TLS connect error:

 curl -v https://www.google.com
* Host www.google.com:443 was resolved.
* IPv6: 2001::1
* IPv4: 31.13.94.41
*   Trying [2001::1]:443...
* Immediate connect fail for 2001::1: Network is unreachable
*   Trying 31.13.94.41:443...
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* SSL Trust Anchors:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
* TLSv1.3 (OUT), TLS alert, decode error (562):
* TLS connect error: error:0A000126:SSL routines::unexpected eof while reading
* closing connection #0
curl: (35) TLS connect error: error:0A000126:SSL routines::unexpected eof while reading

但是如果我打开firefox访问一下https://google.com, 就又能curl通了, 暂时不知道问题出在哪 :-\

这解析结果不对劲啊。

这怎么是个facebook的ip, 这是DNS污染了?那我应该把谷歌的dns换掉么?

~ ❯❯❯ curl -v https://www.google.com
* Host www.google.com:443 was resolved.
* IPv6: 2404:6800:4012:8::2004
* IPv4: 142.250.198.68
*   Trying [2404:6800:4012:8::2004]:443...
* Immediate connect fail for 2404:6800:4012:8::2004: Network is unreachable
*   Trying 142.250.198.68:443...
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* SSL Trust Anchors:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
* TLSv1.3 (OUT), TLS alert, decode error (562):
* TLS connect error: error:0A000126:SSL routines::unexpected eof while reading
* closing connection #0
curl: (35) TLS connect error: error:0A000126:SSL routines::unexpected eof while reading

~ ❯❯❯ curl -v https://www.google.com                                                                                   ✘ 35
* Host www.google.com:443 was resolved.
* IPv6: 2404:6800:4012:8::2004
* IPv4: 142.250.198.68
*   Trying [2404:6800:4012:8::2004]:443...
* Immediate connect fail for 2404:6800:4012:8::2004: Network is unreachable
*   Trying 142.250.198.68:443...
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* SSL Trust Anchors:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519MLKEM768 / id-ecPublicKey
* ALPN: server accepted h2
* Server certificate:
*   subject: CN=www.google.com
*   start date: Oct 27 08:35:45 2025 GMT
*   expire date: Jan 19 08:35:44 2026 GMT
*   issuer: C=US; O=Google Trust Services; CN=WR2
*   Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 2: Public key type RSA (4096/152 Bits/secBits), signed using sha384WithRSAEncryption
*   subjectAltName: "www.google.com" matches cert's "www.google.com"
* SSL certificate verified via OpenSSL.
* Established connection to www.google.com (142.250.198.68 port 443) from 192.168.0.58 port 37224 
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://www.google.com/
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: www.google.com]
* [HTTP/2] [1] [:path: /]
* [HTTP/2] [1] [user-agent: curl/8.17.0]
* [HTTP/2] [1] [accept: */*]
> GET / HTTP/2
> Host: www.google.com
> User-Agent: curl/8.17.0
> Accept: */*
> 
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/2 302 
< location: https://www.google.com.hk/url?sa=p&hl=zh-CN&pref=hkredirect&pval=yes&q=https://www.google.com.hk/&ust=1764639092668676&usg=AOvVaw39_iQrC3Z2eXFiwwgVjYYL
< cache-control: private
< content-type: text/html; charset=UTF-8
< content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-O94cCZuDu57Jder0nWdV3g' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
< p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
< date: Tue, 02 Dec 2025 01:31:02 GMT
< server: gws
< content-length: 372
< x-xss-protection: 0
< x-frame-options: SAMEORIGIN
< set-cookie: AEC=AaJma5tT29bTXZCFH9eIgtes225QfAwQyTVl3Zljdip18LT4ba7BEJpLZgE; expires=Sun, 31-May-2026 01:31:02 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
< set-cookie: NID=526=DJBDDIzIcHb-ZXsueL_0DYqo0fsFlil80StQ6pOmSD3v7817Xjlcbn_7DftzwatdD8QSJeGcPgXU7MefGw65a9MUrF2sMsReO6-HQTmm3xtyWsp-L6pMgbgkg7qngem9CykITixSmICD3CFJ92qfXFti6JJlSDvSXRgR5SDrqU0xt0Jfelr4fwGxLC-f0iJ-bfNIgt6VUvIKBqJOgYqEmCLwdXVW; expires=Wed, 03-Jun-2026 01:31:02 GMT; path=/; domain=.google.com; HttpOnly
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
< 
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com.hk/url?sa=p&amp;hl=zh-CN&amp;pref=hkredirect&amp;pval=yes&amp;q=https://www.google.com.hk/&amp;ust=1764639092668676&amp;usg=AOvVaw39_iQrC3Z2eXFiwwgVjYYL">here</A>.
</BODY></HTML>
* Connection #0 to host www.google.com:443 left intact

现在可以正常解析到谷歌云了, 换了个DNS, 好像不影响浏览器啥的, 只有命令行会第一次跑不通, 问题不是很大