feat: collect and display usage stats

This commit is contained in:
2023-09-24 12:21:44 -06:00
parent bf14a70efe
commit 6b1637d1d8
17 changed files with 394 additions and 25 deletions

View File

@ -11,6 +11,8 @@ import (
"github.com/pkg/errors"
)
var Version string = "unknown"
func main() {
opts := rebound.DefaultOptions()
@ -18,8 +20,12 @@ func main() {
log.Fatalf("[ERROR] %+v", errors.WithStack(err))
}
opts.HTTP.TemplateData.Version = Version
server := rebound.NewServer(
rebound.WithAddress(opts.Address),
rebound.WithStatsFile(opts.StatsFile),
rebound.WithStatsFileSaveInterval(opts.StatsFileSaveInterval),
rebound.WithSSHOption(
ssh.WithSockDir(opts.SSH.SockDir),
ssh.WithPublicHost(opts.SSH.PublicHost),