Add vmess inbound/outbound

This commit is contained in:
世界
2022-07-18 12:32:31 +08:00
parent d1e83882e5
commit 6b1a68908d
18 changed files with 476 additions and 105 deletions

9
box.go
View File

@@ -59,6 +59,15 @@ func New(ctx context.Context, options option.Options) (*Box, error) {
TimestampFormat: "-0700 2006-01-02 15:04:05",
}
logFactory = log.NewFactory(logFormatter, logWriter)
if logOptions.Level != "" {
logLevel, err := log.ParseLevel(logOptions.Level)
if err != nil {
return nil, E.Cause(err, "parse log level")
}
logFactory.SetLevel(logLevel)
} else {
logFactory.SetLevel(log.LevelTrace)
}
}
router, err := route.NewRouter(