add more logs
This commit is contained in:
@@ -3,9 +3,7 @@ package config
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
C "github.com/sagernet/sing-box/constant"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
@@ -170,10 +168,7 @@ func patchOutbound(base option.Outbound, configOpt ConfigOptions) (*option.Outbo
|
||||
|
||||
func patchWarp(base *option.Outbound) error {
|
||||
if base.Type == C.TypeWireGuard {
|
||||
splt := strings.Split(base.WireGuardOptions.Server, "*")
|
||||
host := splt[rand.Intn(len(splt))]
|
||||
base.WireGuardOptions.Server = host
|
||||
fmt.Printf("Selected Host is:%s\n", host)
|
||||
host := base.WireGuardOptions.Server
|
||||
if host == "default" || host == "random" || host == "auto" || isBlockedDomain(host) {
|
||||
base.WireGuardOptions.Server = getRandomIP()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user