[PR #1663] [MERGED] embed (hidden) tailsql for debugging #2240

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1663
Author: @kradalby
Created: 12/20/2023
Status: Merged
Merged: 12/20/2023
Merged by: @kradalby

Base: mainHead: tailsql


📝 Commits (1)

  • e37069f embed tailsql for debugging

📊 Changes

7 files changed (+324 additions, -32 deletions)

View changed files

📝 flake.nix (+1 -8)
📝 go.mod (+45 -6)
📝 go.sum (+137 -6)
📝 hscontrol/app.go (+30 -3)
📝 hscontrol/derp/server/derp_server.go (+2 -8)
hscontrol/tailsql.go (+99 -0)
📝 hscontrol/util/log.go (+10 -1)

📄 Description

This PR embeds a tailsql instance inside headscale, it is not on by default, and not advertised.

It is intended for debug mode for now, and will allow the exposure of a tailsql playground for headcale database to join a tailnet. Currently, it can only join a tailscale.com tailnet, and for the time being, this is probably only useful to me.

This feature could be quite cool to extend in the future and have it join the headscale network, but I do not have any plan for that right now, and do not know whats needed to achieve that, it might be as simple as:

  1. programatically create an authkey for tsnet
  2. set the tsnet controlserver to localhost
  3. profit.

🔄 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/1663 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 12/20/2023 **Status:** ✅ Merged **Merged:** 12/20/2023 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `tailsql` --- ### 📝 Commits (1) - [`e37069f`](https://github.com/juanfont/headscale/commit/e37069f63dd27db5f21a5b48b04b7650d53a26ac) embed tailsql for debugging ### 📊 Changes **7 files changed** (+324 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `flake.nix` (+1 -8) 📝 `go.mod` (+45 -6) 📝 `go.sum` (+137 -6) 📝 `hscontrol/app.go` (+30 -3) 📝 `hscontrol/derp/server/derp_server.go` (+2 -8) ➕ `hscontrol/tailsql.go` (+99 -0) 📝 `hscontrol/util/log.go` (+10 -1) </details> ### 📄 Description This PR embeds a [tailsql](https://github.com/tailscale/tailsql) instance inside headscale, it is not on by default, and not advertised. It is intended for debug mode for now, and will allow the exposure of a tailsql playground for headcale database to join a tailnet. Currently, it can only join a tailscale.com tailnet, and for the time being, this is probably only useful to me. This feature could be quite cool to extend in the future and have it join the headscale network, but I do not have any plan for that right now, and do not know whats needed to achieve that, it might be as simple as: 1. programatically create an authkey for tsnet 2. set the tsnet controlserver to localhost 3. profit. --- <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:21 +01:00
adam closed this issue 2025-12-29 03:20:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2240