Closed musikele closed 3 years ago
Sorry, it has taken so long but this is finally fixed. I have rebuilt the codebase and moved to OpenDNS which is faster than the HTTP method and will also not change the format of the IP that is returned as was the issue here.
Hi there, when I run this script on my Synology NAS I get this output:
After debugging a little bit, with my limited GO knowledge, I think the problem is in file clientip.go , function
GetPublicIPv4()
. It seems to expect a json, while the answer is a plaintext string containing the ip only.Also, I tried to manually call
https://v4.ident.me/.json
and i couldn't find any documentation about the json response type.Probably by fixing those functions to parse the plain string as IP address we'd the script may continue to work?