cmd/ctrld,internal/controld: do not set bootstrap IP

This commit is contained in:
Cuong Manh Le
2023-01-05 19:09:58 +07:00
committed by Cuong Manh Le
parent b021833ed6
commit 3014556f2d
2 changed files with 3 additions and 29 deletions

View File

@@ -13,35 +13,10 @@ const resolverDataURL = "https://api.controld.com/utility"
// ResolverConfig represents Control D resolver data.
type ResolverConfig struct {
V4 []string `json:"v4"`
V6 []string `json:"v6"`
DOH string `json:"doh"`
Exclude []string `json:"exclude"`
}
func (r *ResolverConfig) IP(v6 bool) string {
ip4 := r.v4()
ip6 := r.v6()
if v6 && ip6 != "" {
return ip6
}
return ip4
}
func (r *ResolverConfig) v4() string {
for _, ip := range r.V4 {
return ip
}
return ""
}
func (r *ResolverConfig) v6() string {
for _, ip := range r.V6 {
return ip
}
return ""
}
type utilityResponse struct {
Success bool `json:"success"`
Body struct {