feat: Add support for hysteria2 dialer and protocol (#533)

Co-authored-by: mzz <2017@duck.com>
This commit is contained in:
Mix
2024-06-16 20:41:27 +08:00
committed by GitHub
parent 76a4fe9be7
commit cb61bf90b2
9 changed files with 29 additions and 13 deletions

View File

@ -9,6 +9,7 @@ import (
"context"
"errors"
"fmt"
"math/rand/v2"
"net"
"net/http"
"os"
@ -21,7 +22,6 @@ import (
"time"
"github.com/daeuniverse/outbound/netproxy"
"github.com/daeuniverse/outbound/pkg/fastrand"
"github.com/daeuniverse/outbound/protocol/direct"
"gopkg.in/natefinch/lumberjack.v2"
@ -62,7 +62,7 @@ func init() {
runCmd.PersistentFlags().BoolVarP(&disableTimestamp, "disable-timestamp", "", false, "Disable timestamp.")
runCmd.PersistentFlags().BoolVarP(&disablePidFile, "disable-pidfile", "", false, "Not generate /var/run/dae.pid.")
fastrand.Rand().Shuffle(len(CheckNetworkLinks), func(i, j int) {
rand.Shuffle(len(CheckNetworkLinks), func(i, j int) {
CheckNetworkLinks[i], CheckNetworkLinks[j] = CheckNetworkLinks[j], CheckNetworkLinks[i]
})
}