feat: Custom Tailscale client for Headscale
Changes from upstream tailscale v1.97.0: - Renamed service/pipe/registry to 'Tailscale-Custom' for coexistence - Default control URL: https://vpn.softs.business - TUN adapter: WintunTunnelType='Tailscale-Custom', unique GUID - Named pipe: Tailscale-Custom\tailscaled - Registry: SOFTWARE\Tailscale-Custom IPN - ProgramData/LocalAppData paths: Tailscale-Custom New components: - cmd/tailscale-tray: Windows system tray app with multi-profile support - installer/TailscaleCustom.wxs: WiX v5 MSI installer Modified files (~22 production files): - ipn/prefs.go, paths/paths.go, paths/paths_windows.go - cmd/tailscaled/tailscaled.go, tailscaled_windows.go - control/controlclient/direct.go - net/tstun/tun_windows.go - util/winutil/winutil_windows.go - logpolicy/logpolicy.go - and more (see git diff for full list)
This commit is contained in:
+3
-3
@@ -23,7 +23,7 @@ var AppSharedDir syncs.AtomicValue[string]
|
||||
// or the empty string if there's no reasonable default.
|
||||
func DefaultTailscaledSocket() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
return `\\.\pipe\ProtectedPrefix\Administrators\Tailscale\tailscaled`
|
||||
return `\\.\pipe\ProtectedPrefix\Administrators\Tailscale-Custom\tailscaled`
|
||||
}
|
||||
if runtime.GOOS == "darwin" {
|
||||
return "/var/run/tailscaled.socket"
|
||||
@@ -66,7 +66,7 @@ func DefaultTailscaledStateFile() string {
|
||||
return f()
|
||||
}
|
||||
if runtime.GOOS == "windows" {
|
||||
return filepath.Join(os.Getenv("ProgramData"), "Tailscale", "server-state.conf")
|
||||
return filepath.Join(os.Getenv("ProgramData"), "Tailscale-Custom", "server-state.conf")
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -118,7 +118,7 @@ func MkStateDir(dirPath string) error {
|
||||
// It is only called on Windows.
|
||||
func LegacyStateFilePath() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
return filepath.Join(os.Getenv("LocalAppData"), "Tailscale", "server-state.conf")
|
||||
return filepath.Join(os.Getenv("LocalAppData"), "Tailscale-Custom", "server-state.conf")
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ func ensureStateDirPermsWindows(dirPath string) error {
|
||||
if !fi.IsDir() {
|
||||
return os.ErrInvalid
|
||||
}
|
||||
if strings.ToLower(filepath.Base(dirPath)) != "tailscale" {
|
||||
if strings.ToLower(filepath.Base(dirPath)) != "tailscale-custom" {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user