gost通讯改为ws

This commit is contained in:
qaq
2025-06-25 10:49:06 +08:00
parent f3e9b31ed3
commit f7e82cdc8b
47 changed files with 3528 additions and 1513 deletions
+5 -3
View File
@@ -14,6 +14,7 @@ import (
"github.com/go-gost/core/logger"
xlogger "github.com/go-gost/x/logger"
"github.com/go-gost/x/socket"
"github.com/go-gost/x/traffic"
"github.com/judwhite/go-svc"
)
@@ -124,9 +125,10 @@ func main() {
fmt.Println("✅ 使用内存流量管理器")
logger.Default().Info("Using memory traffic manager")
SetHTTPReportURL(config.Addr, config.Secret)
StartTrafficReporter(trafficMgr)
wsReporter := StartWebSocketReporterWithConfig(config.Addr, config.Secret)
traffic.SetHTTPReportURL(config.Addr, config.Secret)
traffic.StartTrafficReporter(trafficMgr)
wsReporter := socket.StartWebSocketReporterWithConfig(config.Addr, config.Secret)
defer wsReporter.Stop()
p := &program{}