[PR #2150] [MERGED] use tsaddr library and cleanups #2526

Closed
opened 2025-12-29 03:21:39 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2150
Author: @kradalby
Created: 9/25/2024
Status: Merged
Merged: 10/2/2024
Merged by: @kradalby

Base: mainHead: kradalby/use-tsaddr


📝 Commits (5)

  • 3d23608 resuse tsaddr code instead of handrolled
  • 019b599 ensure we dont give out internal tailscale IPs
  • b1d8f04 use prefix instead of string for routes
  • e0c53b7 remove old custom compare func
  • 8152fd0 trim unused util code

📊 Changes

19 files changed (+123 additions, -153 deletions)

View changed files

📝 cmd/headscale/cli/routes.go (+2 -2)
📝 flake.nix (+1 -1)
📝 go.mod (+5 -6)
📝 go.sum (+18 -14)
📝 hscontrol/db/ip.go (+10 -2)
📝 hscontrol/db/ip_test.go (+26 -0)
📝 hscontrol/db/node.go (+6 -21)
📝 hscontrol/db/node_test.go (+7 -9)
📝 hscontrol/db/routes.go (+4 -3)
📝 hscontrol/db/routes_test.go (+15 -11)
📝 hscontrol/mapper/mapper_test.go (+3 -2)
📝 hscontrol/mapper/tail_test.go (+3 -2)
📝 hscontrol/policy/acls.go (+9 -7)
📝 hscontrol/policy/acls_test.go (+8 -6)
📝 hscontrol/poll.go (+3 -8)
📝 hscontrol/types/routes.go (+2 -6)
📝 hscontrol/util/addr.go (+1 -12)
📝 hscontrol/util/key.go (+0 -23)
📝 hscontrol/util/net.go (+0 -18)

📄 Description

This PR reuses upstream tailscale functions from their libraries, cleans up unused code and ensure we use proper types and not strings in route enablement.

depens on https://github.com/tailscale/tailscale/pull/13569

Signed-off-by: Kristoffer Dalby kristoffer@tailscale.com


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2150 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 9/25/2024 **Status:** ✅ Merged **Merged:** 10/2/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/use-tsaddr` --- ### 📝 Commits (5) - [`3d23608`](https://github.com/juanfont/headscale/commit/3d23608d882453a126eb09ff553b9212a6a1cc9a) resuse tsaddr code instead of handrolled - [`019b599`](https://github.com/juanfont/headscale/commit/019b599fc7064164722bd3d1a24aaefb8a1c4988) ensure we dont give out internal tailscale IPs - [`b1d8f04`](https://github.com/juanfont/headscale/commit/b1d8f04fe3e7142554847914831860836bf7ff0f) use prefix instead of string for routes - [`e0c53b7`](https://github.com/juanfont/headscale/commit/e0c53b72700b6e0ed6626b54faa7cd50315cab32) remove old custom compare func - [`8152fd0`](https://github.com/juanfont/headscale/commit/8152fd0a8bb3a0ca200165b7cae8e9d43c803b2e) trim unused util code ### 📊 Changes **19 files changed** (+123 additions, -153 deletions) <details> <summary>View changed files</summary> 📝 `cmd/headscale/cli/routes.go` (+2 -2) 📝 `flake.nix` (+1 -1) 📝 `go.mod` (+5 -6) 📝 `go.sum` (+18 -14) 📝 `hscontrol/db/ip.go` (+10 -2) 📝 `hscontrol/db/ip_test.go` (+26 -0) 📝 `hscontrol/db/node.go` (+6 -21) 📝 `hscontrol/db/node_test.go` (+7 -9) 📝 `hscontrol/db/routes.go` (+4 -3) 📝 `hscontrol/db/routes_test.go` (+15 -11) 📝 `hscontrol/mapper/mapper_test.go` (+3 -2) 📝 `hscontrol/mapper/tail_test.go` (+3 -2) 📝 `hscontrol/policy/acls.go` (+9 -7) 📝 `hscontrol/policy/acls_test.go` (+8 -6) 📝 `hscontrol/poll.go` (+3 -8) 📝 `hscontrol/types/routes.go` (+2 -6) 📝 `hscontrol/util/addr.go` (+1 -12) 📝 `hscontrol/util/key.go` (+0 -23) 📝 `hscontrol/util/net.go` (+0 -18) </details> ### 📄 Description This PR reuses upstream tailscale functions from their libraries, cleans up unused code and ensure we use proper types and not strings in route enablement. depens on https://github.com/tailscale/tailscale/pull/13569 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 03:21:39 +01:00
adam closed this issue 2025-12-29 03:21:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2526