platform: Add tailscale device name and logout

This commit is contained in:
世界
2026-06-02 11:29:06 +08:00
parent 36c8786df1
commit 09ff1a767c
15 changed files with 299 additions and 121 deletions
+1
View File
@@ -51,6 +51,7 @@ type PlatformInterface interface {
LookupUser(username string) (*PlatformUser, error)
LookupSFTPServer() (string, error)
ReadSystemSSHHostKey() ([]byte, error)
TailscaleHostname() string
}
type PlatformUser struct {
+2
View File
@@ -6,6 +6,7 @@ type TailscaleEndpoint interface {
SubscribeTailscaleStatus(ctx context.Context, fn func(*TailscaleEndpointStatus)) error
StartTailscalePing(ctx context.Context, peerIP string, fn func(*TailscalePingResult)) error
SetTailscaleExitNode(ctx context.Context, stableID string) error
Logout(ctx context.Context) error
}
type TailscalePingResult struct {
@@ -25,6 +26,7 @@ type TailscaleEndpointStatus struct {
Self *TailscalePeer
ExitNode *TailscalePeer
UserGroups []*TailscaleUserGroup
KeyAuth bool
}
type TailscaleUserGroup struct {