[PR #1869] [MERGED] Migrate IP fields in database to dedicated columns #2359

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1869
Author: @kradalby
Created: 4/12/2024
Status: Merged
Merged: 4/17/2024
Merged by: @kradalby

Base: mainHead: rework-ip


📝 Commits (8)

  • 736bad8 improve prefix errors, allow only v4 or v6
  • 4af1460 migrate ip_addresses to ipv4, ipv6
  • c1a05f4 use ipv4/6 everywhere instead of address list
  • b169b98 add option to randomly assign IPs from prefix
  • 599d4ec add backfill ip function
  • f7b2540 add cli for backfilling ips
  • febba4f generate backfillip cli boiler
  • 885f59c Merge branch 'main' into rework-ip

📊 Changes

39 files changed (+1871 additions, -1041 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 cmd/headscale/cli/nodes.go (+53 -0)
📝 config-example.yaml (+5 -0)
📝 gen/go/headscale/v1/apikey.pb.go (+1 -1)
📝 gen/go/headscale/v1/device.pb.go (+1 -1)
📝 gen/go/headscale/v1/headscale.pb.go (+153 -141)
📝 gen/go/headscale/v1/headscale.pb.gw.go (+87 -0)
📝 gen/go/headscale/v1/headscale_grpc.pb.go (+37 -0)
📝 gen/go/headscale/v1/node.pb.go (+150 -23)
📝 gen/go/headscale/v1/preauthkey.pb.go (+1 -1)
📝 gen/go/headscale/v1/routes.pb.go (+1 -1)
📝 gen/go/headscale/v1/user.pb.go (+1 -1)
📝 gen/openapiv2/headscale/v1/headscale.swagger.json (+41 -0)
📝 hscontrol/app.go (+11 -3)
📝 hscontrol/auth.go (+2 -3)
📝 hscontrol/db/db.go (+61 -0)
📝 hscontrol/db/ip.go (+228 -46)
📝 hscontrol/db/ip_test.go (+401 -64)
📝 hscontrol/db/node.go (+10 -10)
📝 hscontrol/db/node_test.go (+7 -28)

...and 19 more files

📄 Description

This PR implements #1828, ergonomically improving our handling of the IPv4/6 configuration and internals.

Closes #1828
Closes #1785
Closes #1827
Closes #614
Closes #968


🔄 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/1869 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 4/12/2024 **Status:** ✅ Merged **Merged:** 4/17/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `rework-ip` --- ### 📝 Commits (8) - [`736bad8`](https://github.com/juanfont/headscale/commit/736bad8b43e9be99060291990cbcea5117472552) improve prefix errors, allow only v4 or v6 - [`4af1460`](https://github.com/juanfont/headscale/commit/4af1460ad347edbb66f4e35c835725870db4b777) migrate ip_addresses to ipv4, ipv6 - [`c1a05f4`](https://github.com/juanfont/headscale/commit/c1a05f451bfe2302c428a9d876a8832697bdd58e) use ipv4/6 everywhere instead of address list - [`b169b98`](https://github.com/juanfont/headscale/commit/b169b9823e5d22cfe2ba607696e87b81e88aed50) add option to randomly assign IPs from prefix - [`599d4ec`](https://github.com/juanfont/headscale/commit/599d4ecd1143411f996081d16e4fe9393afedba7) add backfill ip function - [`f7b2540`](https://github.com/juanfont/headscale/commit/f7b25405e9767229e0eb4c5090ea5558a661a8a7) add cli for backfilling ips - [`febba4f`](https://github.com/juanfont/headscale/commit/febba4f0cecf836278a4bbacad26880464083d62) generate backfillip cli boiler - [`885f59c`](https://github.com/juanfont/headscale/commit/885f59c77be58769c1946d7c39fbd5107af70867) Merge branch 'main' into rework-ip ### 📊 Changes **39 files changed** (+1871 additions, -1041 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `cmd/headscale/cli/nodes.go` (+53 -0) 📝 `config-example.yaml` (+5 -0) 📝 `gen/go/headscale/v1/apikey.pb.go` (+1 -1) 📝 `gen/go/headscale/v1/device.pb.go` (+1 -1) 📝 `gen/go/headscale/v1/headscale.pb.go` (+153 -141) 📝 `gen/go/headscale/v1/headscale.pb.gw.go` (+87 -0) 📝 `gen/go/headscale/v1/headscale_grpc.pb.go` (+37 -0) 📝 `gen/go/headscale/v1/node.pb.go` (+150 -23) 📝 `gen/go/headscale/v1/preauthkey.pb.go` (+1 -1) 📝 `gen/go/headscale/v1/routes.pb.go` (+1 -1) 📝 `gen/go/headscale/v1/user.pb.go` (+1 -1) 📝 `gen/openapiv2/headscale/v1/headscale.swagger.json` (+41 -0) 📝 `hscontrol/app.go` (+11 -3) 📝 `hscontrol/auth.go` (+2 -3) 📝 `hscontrol/db/db.go` (+61 -0) 📝 `hscontrol/db/ip.go` (+228 -46) 📝 `hscontrol/db/ip_test.go` (+401 -64) 📝 `hscontrol/db/node.go` (+10 -10) 📝 `hscontrol/db/node_test.go` (+7 -28) _...and 19 more files_ </details> ### 📄 Description This PR implements #1828, ergonomically improving our handling of the IPv4/6 configuration and internals. Closes #1828 Closes #1785 Closes #1827 Closes #614 Closes #968 --- <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:20:54 +01:00
adam closed this issue 2025-12-29 03:20:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2359