paths: socket path can be configured from environment variable "TS_SOCKET"
Signed-off-by: Maximilian Pachl <m@ximilian.info>pull/7538/head
parent
958c89470b
commit
ea704ec877
|
@ -21,6 +21,11 @@ var AppSharedDir syncs.AtomicValue[string]
|
||||||
// DefaultTailscaledSocket returns the path to the tailscaled Unix socket
|
// DefaultTailscaledSocket returns the path to the tailscaled Unix socket
|
||||||
// or the empty string if there's no reasonable default.
|
// or the empty string if there's no reasonable default.
|
||||||
func DefaultTailscaledSocket() string {
|
func DefaultTailscaledSocket() string {
|
||||||
|
envSocket := os.Getenv("TS_SOCKET")
|
||||||
|
if envSocket != "" {
|
||||||
|
return envSocket
|
||||||
|
}
|
||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
return `\\.\pipe\ProtectedPrefix\Administrators\Tailscale\tailscaled`
|
return `\\.\pipe\ProtectedPrefix\Administrators\Tailscale\tailscaled`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue