Commit Graph
59 Commits
Author SHA1 Message Date
iceBear67 b24cfcd560 fix: gui 2026-07-26 14:03:51 +00:00
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
nc e1cfd61d46 add USAGE.md 2026-06-10 15:38:43 +08:00
nc bfd3bcdff5 chore(readme): quick start 2026-06-10 15:32:12 +08:00
nc 91722048cf fix(ci): release artifact & filename 2026-06-10 05:04:10 +08:00
nc 3c8d685385 fix(ci): release artifact & filename 2026-06-10 04:55:21 +08:00
nc 6b06cb03f8 feat(ci): auto upload to ghcr and release artifact 2026-06-10 04:43:13 +08:00
nc c725d40d80 fix(tsnet): revert unexpected changes 2026-06-10 02:10:03 +08:00
nc 30330a1525 Merge branch 'fix-multi-layer-magicdns-resolve'
# Conflicts:
#	core/utils.go
#	main.go
2026-06-10 01:32:26 +08:00
nc aaf56fef69 Merge remote-tracking branch 'origin/fix-multi-layer-magicdns-resolve' into fix-multi-layer-magicdns-resolve 2026-06-10 01:30:48 +08:00
nc 74618fff4c chore(forwarder): adjust log level 2026-06-10 01:30:04 +08:00
nc cb6ebb03e6 chore(forwarder): adjust log level 2026-06-10 01:25:59 +08:00
nc 35f92fa781 feat(forwarder): split forwarder to different file 2026-06-10 01:23:38 +08:00
nc 7c5904cc47 feat(config): add config validator to avoid wrong settings 2026-06-10 01:22:18 +08:00
iceBear67 3edddb406b fix: use system dns when tailscale resolver fails 2026-06-05 10:43:18 +08:00
nc 125bc4bf3d feat(utils): resolveAddr can resolve subnet ip at domain properly 2026-06-05 03:56:52 +08:00
nc 390946e0a2 fix(utils): normalizer cannot handle domain with dot
such as cm.any->cm.any.ts.net
2026-06-05 02:35:09 +08:00
iceBear67 ca03dce36a fix: use correct tailscale dns behaviour 2026-06-05 01:23:40 +08:00
nullcat 186e29663e chore(utils): remove deprecated code 2026-06-01 16:32:46 +08:00
nullcat 2c11609437 feat(tsnet): embedded web client only runs on diagnose flag is set 2026-06-01 16:31:27 +08:00
nullcat e60a6b76c7 feat(utils): implement MagicDNS suffix handling and normalization for dst_addr
- Added support for extracting and setting MagicDNS suffix.
- Normalized `dst_addr` using the MagicDNS suffix to simplify configuration.
- Improved logging for normalized and failed addresses during `connect` rule processing.
2026-06-01 16:07:23 +08:00
nullcat a9828b4461 fix(forwarder): potential error on udpSession 2026-06-01 15:25:14 +08:00
nullcat bad69e16cb feat(config): fetch config from remote server
Merge pull request #1 from saltedfishclub/feat-fetch-from-server
2026-05-31 16:16:04 +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
nullcat ea246896e1 chore: add README.md 2026-05-30 17:28:23 +08:00
nullcat 0a5fde7925 chore(forward): adjust log level 2026-05-30 17:27:47 +08:00
nullcat da17faa6dc fix(utils): adjust getPeerInfo position 2026-05-30 17:11:44 +08:00
nullcat bcbe8fb5e3 fix(tsnet): add timeout handling for tsnet server initialization 2026-05-30 17:10:47 +08:00
nullcat c853084a7b fix(utils): move ping logic after peer info lookup and deduplicate address retrieval logic 2026-05-29 14:56:17 +08:00
nullcat 4dde0942ce fix(utils): panic on ping logic 2026-05-29 14:31:32 +08:00
nullcat f97540b8d0 chore(utils): add remote name into ping logger 2026-05-25 15:12:31 +08:00
nullcat 702dd6bc24 chore(ci): update dependency 2026-05-25 01:43:20 +08:00
nullcat b4ba8e1de9 chore(ci): add build flag for smaller size 2026-05-25 01:24:10 +08:00
nullcat e72f03dfe2 chore(ci): add build flag for smaller size 2026-05-25 01:19:33 +08:00
nullcat 0ef729db72 chore(ci): add build flag for smaller size 2026-05-25 01:18:21 +08:00
nullcat ad335bba71 fix(ci): upx compress runs on unsupported platforms 2026-05-25 01:12:17 +08:00
nullcat fb6965cd94 fix(ci): upx compress runs on unsupported platforms 2026-05-25 01:07:10 +08:00
nullcat 7bf362cc66 chore(ci): compress artifact with upx and update binary name 2026-05-25 00:59:41 +08:00
nullcat 6d02437087 fix(ci): add missing go.sum 2026-05-25 00:50:08 +08:00
nullcat 808bcd121a fix(ci): wrong push trigger 2026-05-25 00:47:06 +08:00
nullcat 8913f8abda fix(ci): not working 2026-05-25 00:40:50 +08:00
nullcat 284111360c chore: add MIT license file 2026-05-25 00:21:49 +08:00
nullcat 8435d283f9 chore(ci): add GitHub Actions workflow for cross-platform Go build 2026-05-25 00:15:29 +08:00