mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
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:
committed by
Cuong Manh Le
parent
b7ccfcb8b4
commit
c651003cc4
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user