Add sing-box API service

This commit is contained in:
世界
2026-06-11 21:11:10 +08:00
parent 1ee3596db9
commit 3a5d654463
36 changed files with 2075 additions and 849 deletions
+2 -2
View File
@@ -121,7 +121,7 @@ func (s *StartedService) StartTailscaleSSHSession(
}
sshClient := ssh.NewClient(sshConn, chans, reqs)
if start.ForwardAgent {
if start.ForwardAgent && s.handler != nil {
agentChannels := sshClient.HandleChannelOpen("auth-agent@openssh.com")
if agentChannels != nil {
go func() {
@@ -176,7 +176,7 @@ func (s *StartedService) StartTailscaleSSHSession(
}))
}
if start.ForwardAgent {
if start.ForwardAgent && s.handler != nil {
err = agent.RequestAgentForwarding(sshSession)
if err != nil {
common.Close(sshSession, sshClient)