refactoring logic in main

This commit is contained in:
afeiszli
2021-05-05 20:42:17 +00:00
parent 731f938efe
commit 46a81c9767
10 changed files with 380 additions and 265 deletions

View File

@@ -518,7 +518,7 @@ func getLocalIP(localrange string) (string, error) {
func getPublicIP() (string, error) {
iplist := []string{"https://ifconfig.me", "http://api.ipify.org", "http://ipinfo.io/ip"}
iplist := []string{"http://ip.client.gravitl.com","https://ifconfig.me", "http://api.ipify.org", "http://ipinfo.io/ip"}
endpoint := ""
var err error
for _, ipserver := range iplist {