Support direct ip in lookupIP function

So users can supply ip directly in config, avoiding unnecessary domain
lookup while bootstrapping.
This commit is contained in:
Cuong Manh Le
2025-03-27 19:42:23 +07:00
committed by Cuong Manh Le
parent b7ccfcb8b4
commit c651003cc4

View File

@@ -473,6 +473,9 @@ func LookupIP(domain string) []string {
}
func lookupIP(domain string, timeout int) (ips []string) {
if net.ParseIP(domain) != nil {
return []string{domain}
}
resolverMutex.Lock()
if or == nil {
ProxyLogger.Load().Debug().Msgf("Initialize OS resolver in lookupIP")