Commit Graph
11 Commits
Author SHA1 Message Date
iceBear67 7eb35f82b1 fix gui 2026-07-26 20:44:49 +08:00
iceBear67 ae79082481 Merge remote-tracking branch 'homelab/sfcraft' into sfcraft 2026-07-26 17:41:37 +08:00
iceBear67 5b3a7e147c add: gui and tsdiag 2026-07-26 09:39:17 +00:00
iceBear67 ac27db76f9 fix: connectivity check fails on split-DNS destinations at startup
The diagnostics never got the split-DNS fix from 20097a0. That commit
  taught the dial path to resolve through the tailnet's own resolver
  (resolveDialAddr) but left getPeerFromRules on resolveAddr, so the two
  disagreed about how to look a destination up: connecting through a
  split-DNS name worked while the startup check called it unresolvable.

  Both paths now share resolveHostToIP, which honors MagicDNS, split-DNS
  routes and the DoH fallback.

  The check also resolved once at startup and cached the result for the
  process lifetime. tsnet reports Running before the netmap's DNS config
  reaches its resolver, and accept-routes is only applied after Up()
  returns, so a split-DNS name can fail for the first few seconds and
  resolve fine after. That transient failure dropped the peer permanently
  -- and when every rule failed, the goroutine returned and diagnostics
  never ran at all. Peers are re-resolved every round now, with a warm-up
  retry so the first report waits for DNS rather than racing it.

  Destinations outside the tailnet are no longer reported as failures.
  mc.lxns.net resolves fine but belongs to no peer, which is not an error,
  just not something to ping. errNotTailnetPeer separates "cannot resolve"
  from "resolved, not a peer"; only the former is retried or warned about.
  Unresolved rules now log their tag and dst, which the old message
  omitted entirely.

  Also fixed:

    * NormalizeDstAddrWithSuffix passed "host:port" to resolveAddr, so
      every existence check failed on the stray colon. Fixing that made
      the pass wait on cold-start DNS and delayed the listeners by ~5s,
      so it is now bounded by normalizeDNSBudget.

    * Peer lookup matched any AllowedIPs prefix containing the address.
      An exit node advertises 0.0.0.0/0, which contains everything, so a
      tailnet with an exit node picked the wrong peer at random depending
      on map iteration order. Default routes are skipped, the most
      specific route wins, ties break deterministically.

    * peer.AllowedIPs is a nillable pointer, dereferenced unguarded.
2026-07-26 14:52:14 +08:00
iceBear67 5dc1759d80 add doh support 2026-07-26 14:14:03 +08:00
iceBear67 20097a02a1 fix: domain names aren't resolved by tailscale's dns resolver. 2026-07-21 01:18:01 +08:00
iceBear67 3edddb406b fix: use system dns when tailscale resolver fails 2026-06-05 10:43:18 +08:00
iceBear67 ca03dce36a fix: use correct tailscale dns behaviour 2026-06-05 01:23:40 +08:00
iceBear67 2f3d6e6aa4 update readme 2026-05-31 15:53:21 +08:00
iceBear67 5204500d73 Merge remote-tracking branch 'origin/master' into sf 2026-05-31 15:48:07 +08:00
iceBear67 26aa088d58 add remote fetch support 2026-05-31 15:46:33 +08:00