mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
test: 尝试启用xray splice拷贝
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"github.com/InazumaV/V2bX/node"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"gopkg.in/natefinch/lumberjack.v2"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -56,14 +55,11 @@ func serverHandle(_ *cobra.Command, _ []string) {
|
||||
log.SetLevel(log.ErrorLevel)
|
||||
}
|
||||
if c.LogConfig.Output != "" {
|
||||
w := &lumberjack.Logger{
|
||||
Filename: c.LogConfig.Output,
|
||||
MaxSize: 100,
|
||||
MaxBackups: 3,
|
||||
MaxAge: 28,
|
||||
Compress: true,
|
||||
f, err := os.OpenFile(c.LogConfig.Output, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
|
||||
if err != nil {
|
||||
log.WithField("err", err).Error("Open log file failed, using stdout instead")
|
||||
}
|
||||
log.SetOutput(w)
|
||||
log.SetOutput(f)
|
||||
}
|
||||
limiter.Init()
|
||||
log.Info("Start V2bX...")
|
||||
@@ -125,7 +121,7 @@ func serverHandle(_ *cobra.Command, _ []string) {
|
||||
// wait exit signal
|
||||
{
|
||||
osSignals := make(chan os.Signal, 1)
|
||||
signal.Notify(osSignals, syscall.SIGINT, syscall.SIGKILL, syscall.SIGTERM)
|
||||
signal.Notify(osSignals, syscall.SIGINT, syscall.SIGTERM)
|
||||
<-osSignals
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user