mirror of
https://github.com/go-gost/gost.git
synced 2026-10-09 12:35:45 +00:00
add socks5 udp relay
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user