Ephemeral exposures: short-lived site and port or hostname with a TTL, for shark expose
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
39659f0144
commit
bce44e21ce
7 files changed
+705
No files matched your search
@@ -218,6 +218,8 @@ type Server struct {
|
||||
verAt time.Time
|
||||
mtaSent map[string]time.Time // reminder throttle for repeat notifications
|
||||
|
||||
expose map[string]time.Time // deadline of each ephemeral mapping, by ID (see expose.go)
|
||||
|
||||
logs *logStore
|
||||
db *DB
|
||||
stop chan struct{}
|
||||
@@ -258,6 +260,7 @@ func New(dir string, opts Options) (*Server, error) {
|
||||
alerts: map[string]*alertState{},
|
||||
mtaSent: map[string]time.Time{},
|
||||
updRuns: map[string]*updRun{},
|
||||
expose: map[string]time.Time{},
|
||||
}
|
||||
s.st.Sessions = map[string]*Session{}
|
||||
s.st.Secrets = map[string]*Secret{}
|
||||
@@ -298,6 +301,7 @@ func New(dir string, opts Options) (*Server, error) {
|
||||
}
|
||||
s.loadAlerts()
|
||||
go s.housekeeping()
|
||||
go s.exposeLoop()
|
||||
go s.alertLoop()
|
||||
return s, nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user