feat/optimize(hy2): support human-readable bandwidth configuration (#666)

Co-authored-by: mzz <2017@duck.com>
This commit is contained in:
douglarek
2024-10-30 22:22:03 +08:00
committed by GitHub
parent 382dc5cd58
commit 0e1301b851
5 changed files with 16 additions and 9 deletions

View File

@ -13,6 +13,7 @@ import (
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/dae/pkg/logger"
"github.com/daeuniverse/outbound/pkg/fastrand"
"github.com/sirupsen/logrus"
)
const (
@ -26,7 +27,11 @@ var TestNetworkType = &dialer.NetworkType{
IsDns: false,
}
var log = logger.NewLogger("trace", false, nil)
var log = logrus.New()
func init() {
logger.SetLogger(log, "trace", false, nil)
}
func newDirectDialer(option *dialer.GlobalOption, fullcone bool) *dialer.Dialer {
_d, p := dialer.NewDirectDialer(option, true)