Skip to content

Added snap installation support#39

Open
BoskyWSMFN wants to merge 1 commit into
joaophi:masterfrom
BoskyWSMFN:master
Open

Added snap installation support#39
BoskyWSMFN wants to merge 1 commit into
joaophi:masterfrom
BoskyWSMFN:master

Conversation

@BoskyWSMFN
Copy link
Copy Markdown

The PR improves compatibility of the extension by allowing it to detect and use the correct tailscaled.sock socket path automatically, depending on how Tailscale is installed:

  • Native installation (apt/dnf):
    /var/run/tailscale/tailscaled.sock
  • Snap installation:
    /var/snap/tailscale/common/socket/tailscaled.sock

The TailscaleApiClient constructor now:

  • Checks if the native socket path exists.
  • Falls back to the snap path if needed.
  • Throws an error if neither socket is found.


class TailscaleApiClient {
constructor() {
const nativePath = "/var/run/tailscale/tailscaled.sock";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a good idea to use a list of values and iterate over them instead of hard coding cases. This way we can simply add "well known" paths later for anything else.

Alternatively (likely a separate PR) would even be great to be able to move this to a configuration setting that users can set.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the idea with a list might be good for custom tailscale builds, yes, but this PR is just a quick fix for my specific case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants