add socks5 udp relay

This commit is contained in:
ginuerzh
2021-11-08 15:26:23 +08:00
parent 16f34d3e94
commit 10f53e18a0
12 changed files with 459 additions and 43 deletions
+12
View File
@@ -2,6 +2,8 @@ package main
import (
stdlog "log"
"net/http"
_ "net/http/pprof"
"github.com/go-gost/gost/pkg/config"
"github.com/go-gost/gost/pkg/logger"
@@ -19,6 +21,16 @@ func main() {
}
log = logFromConfig(cfg.Log)
if cfg.Profiling != nil && cfg.Profiling.Enabled {
go func() {
addr := cfg.Profiling.Addr
if addr == "" {
addr = ":6060"
}
log.Info("profiling serve on: ", addr)
log.Fatal(http.ListenAndServe(addr, nil))
}()
}
services := buildService(cfg)
for _, svc := range services {
go svc.Run()