Skip to content

Commit

Permalink
Update IPv6 retrieval method to prioritize local IP
Browse files Browse the repository at this point in the history
  • Loading branch information
jqknono committed Sep 2, 2024
1 parent b817ab4 commit 2fc8b60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AliyunDDNS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static string GetIPv6()
});
Task<string>[] tasks =
{
client.GetStringAsync("https://ip.jqknono.com"),
client.GetStringAsync("https://ip.jqknono.com/ip"),
client.GetStringAsync("https://6.ipw.cn"),
client.GetStringAsync("https://api64.ipify.org"),
};
Expand Down Expand Up @@ -287,10 +287,10 @@ private bool UpdateRecord(DescribeDomainRecords_Record? record = null)

private bool AddRecord()
{
string ip = GetIPv6Locally();
string ip = GetIPv6();
if (string.IsNullOrEmpty(ip))
{
ip = GetIPv6();
ip = GetIPv6Locally();
}
if (string.IsNullOrEmpty(ip))
{
Expand Down

0 comments on commit 2fc8b60

Please sign in to comment.