mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-11 03:36:37 +08:00
修复v6 添加隧道类型选择
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-gost/gost/traffic"
|
||||
|
||||
@@ -129,9 +130,15 @@ func main() {
|
||||
// 设置流量记录器给 handler 使用
|
||||
traffic.SetupTrafficRecorder(trafficMgr)
|
||||
|
||||
// 设置实时流量记录器
|
||||
traffic.SetupRealtimeTrafficRecorder(trafficMgr)
|
||||
|
||||
fmt.Println("✅ 流量管理器已初始化(使用内存存储)")
|
||||
logger.Default().Info("Traffic manager initialized (using memory storage)")
|
||||
|
||||
// 启动实时流量统计(每5秒收集一次)
|
||||
traffic.StartRealtimeTrafficStatistics(5 * time.Second)
|
||||
|
||||
traffic.SetHTTPReportURL(config.Addr, config.Secret)
|
||||
traffic.StartTrafficReporter(trafficMgr)
|
||||
wsReporter := traffic.StartWebSocketReporterWithConfig(config.Addr, config.Secret)
|
||||
|
||||
Reference in New Issue
Block a user