use random warp ip if it can not be resolved

This commit is contained in:
Hiddify
2024-02-12 08:01:12 +01:00
parent df750c3f9c
commit e2d1917110
2 changed files with 9 additions and 5 deletions

View File

@@ -156,12 +156,14 @@ func generateRandomPort() uint16 {
}
func generateWarp(license string, host string, port uint16, fakePackets string) (*T.Outbound, error) {
if host == "" {
if host == "" || isBlockedDomain(host) {
host = "auto"
}
if host == "auto" && fakePackets == "" {
fakePackets = "5-10"
}
// warp.UpdatePath("./secondary")
if _, err := os.Stat("./wgcf-identity.json"); err == nil {
os.Remove("./wgcf-identity.json")
}