added login and permission fix

This commit is contained in:
2026-02-18 23:59:16 +01:00
parent 6172d9e2aa
commit 3579924883
5 changed files with 60 additions and 35 deletions
+8 -1
View File
@@ -272,6 +272,7 @@ func (um *UseManager) tunnelReadLoop(tunnel *useTunnel) {
}
if err := um.client.SendTunnelData(tunnel.id, buf[:n]); err != nil {
log.Printf("[use] tunnel send error: %v", err)
return
}
}
@@ -326,11 +327,17 @@ func (um *UseManager) handleTunnelData(tunnelID string, data []byte) {
um.mu.RUnlock()
if !exists {
log.Printf("[use] tunnel data for unknown tunnel %s (%d bytes)", tunnelID[:8], len(data))
return
}
// Write to the tunnel socket (relay -> VHCI)
tunnel.conn.Write(data)
n, err := tunnel.conn.Write(data)
if err != nil {
log.Printf("[use] tunnel write error: %v", err)
} else if n != len(data) {
log.Printf("[use] tunnel short write: %d/%d", n, len(data))
}
}
func (um *UseManager) handleClientLeft(msg *protocol.ClientLeft) {