test: 尝试启用xray splice拷贝

This commit is contained in:
wyx2685
2025-08-22 05:22:47 +09:00
parent 7d52a8932d
commit 6e8297c553
9 changed files with 473 additions and 454 deletions

View File

@@ -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
}
}