fix(relay): authenticate endpoints and fail closed on missing routes

This commit is contained in:
sagitchu
2026-11-08 23:31:08 +08:00
parent 46bfb86c1b
commit 7f0177491b
50 changed files with 5405 additions and 277 deletions
@@ -0,0 +1,13 @@
package model
// TunnelRuntimeCleanup retains ownership until an obsolete local runtime is
// acknowledged removed. It intentionally survives deletion of its tunnel.
type TunnelRuntimeCleanup struct {
ID int64 `gorm:"primaryKey;autoIncrement"`
TunnelID int64 `gorm:"not null;uniqueIndex:idx_tunnel_cleanup"`
NodeID int64 `gorm:"not null;uniqueIndex:idx_tunnel_cleanup"`
Kind string `gorm:"type:varchar(16);not null;uniqueIndex:idx_tunnel_cleanup"`
Port int `gorm:"not null;default:0;uniqueIndex:idx_tunnel_cleanup"`
}
func (TunnelRuntimeCleanup) TableName() string { return "tunnel_runtime_cleanup" }