[PR #983] [CLOSED] Add Random IP Assignment #1792

Closed
opened 2025-12-29 02:31:43 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/983
Author: @blobcode
Created: 11/19/2022
Status: Closed

Base: mainHead: main


📝 Commits (10+)

📊 Changes

5 files changed (+57 additions, -2 deletions)

View changed files

📝 config-example.yaml (+4 -0)
📝 config.go (+5 -1)
📝 machine.go (+9 -1)
📝 utils.go (+28 -0)
📝 utils_test.go (+11 -0)

📄 Description

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

Adds / Fixes #968
This PR adds a config option for optional random ip assignment within the predefined ip prefix(es).
I'm a bit rusty in go so I'm open to feedback if there are any issues / suggestions.


🔄 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/983 **Author:** [@blobcode](https://github.com/blobcode) **Created:** 11/19/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (10+) - [`feadc44`](https://github.com/juanfont/headscale/commit/feadc4435c145229b25e9a6ee95c21fa23472e6c) create getRandomAvailableIP function - [`9ebd2ed`](https://github.com/juanfont/headscale/commit/9ebd2ed2af45b723efda4be79f2f5f0c22b6812d) basic working - [`14872fd`](https://github.com/juanfont/headscale/commit/14872fd6bcc56db2537f18ffaa24dedcaace0716) Merge branch 'juanfont:main' into main - [`d6455cc`](https://github.com/juanfont/headscale/commit/d6455cc147a80e8a63025db55bb944feb0490a44) add seeding and refactoring - [`2a0d317`](https://github.com/juanfont/headscale/commit/2a0d317a706506d2804638bb122b29aa66b2a3f8) Merge branch 'main' of https://github.com/blobcode/headscale-dev - [`0dfb587`](https://github.com/juanfont/headscale/commit/0dfb58771000b14063f6f8a45372ad39061125cb) add return type - [`0746b87`](https://github.com/juanfont/headscale/commit/0746b87ae28456fd6a442ed8e1b226f0db71eb43) TestGetRandomAvailableIp added - [`c302e04`](https://github.com/juanfont/headscale/commit/c302e04a2c245cd5fbe0240867e31770655e1bd4) example config - [`dc269c6`](https://github.com/juanfont/headscale/commit/dc269c6836e3077c0691d412eb0838024ce20f1a) fix config-example naming - [`62b904c`](https://github.com/juanfont/headscale/commit/62b904ca183b9f912c6154eb22596769e2703159) Merge branch 'main' into main ### 📊 Changes **5 files changed** (+57 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `config-example.yaml` (+4 -0) 📝 `config.go` (+5 -1) 📝 `machine.go` (+9 -1) 📝 `utils.go` (+28 -0) 📝 `utils_test.go` (+11 -0) </details> ### 📄 Description <!-- Please tick if the following things apply. You… --> - [x] read the [CONTRIBUTING guidelines](README.md#contributing) - [ ] raised a GitHub issue or discussed it on the projects chat beforehand - [x] added unit tests - [ ] added integration tests - [x] updated documentation if needed - [ ] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> Adds / Fixes #968 This PR adds a config option for optional random ip assignment within the predefined ip prefix(es). I'm a bit rusty in go so I'm open to feedback if there are any issues / suggestions. --- <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 02:31:43 +01:00
adam closed this issue 2025-12-29 02:31:43 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1792