udp stun proxy

This commit is contained in:
Simon Ding
2025-05-07 22:09:35 +08:00
parent 9719c6a7c9
commit 2dae168cb2
3 changed files with 125 additions and 106 deletions

View File

@@ -11,6 +11,7 @@ import (
"polaris/pkg/tmdb"
"polaris/pkg/transmission"
"polaris/pkg/utils"
"time"
"github.com/pkg/errors"
"github.com/robfig/cron"
@@ -50,6 +51,12 @@ func (c *Engine) Init() {
go c.reloadTasks()
c.addSysCron()
go c.checkW500PosterOnStartup()
go func() {
time.Sleep(10*time.Second)
if err := c.stunProxyDownloadClient(); err != nil {
log.Errorf("stun proxy error: %v", err)
}
}()
}
func (c *Engine) GetTask(id int) (*Task, bool) {