Skip to content

Commit d5fa105

Browse files
committed
API4 URL changed.
1 parent 6f6e592 commit d5fa105

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/utils/network.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
'https://api4.ipify.org/',
2525
'https://ipinfo.io/ip',
2626
'https://www.trackip.net/ip',
27-
'https://api4.my-ip.io/ip' # they have an issue with their cert atm, hope they get it fixed
27+
'https://api4.my-ip.io/v1/ip' # they have an issue with their cert atm, hope they get it fixed
2828
]
2929

3030

@@ -41,8 +41,7 @@ async def get_public_ip(node: "Node | None" = None):
4141
async with session.get(url, proxy=node.proxy if node else None,
4242
proxy_auth=node.proxy_auth if node else None) as resp:
4343
return ipaddress.ip_address(await resp.text()).compressed
44-
else:
45-
raise TimeoutError("Public IP could not be retrieved.")
44+
raise TimeoutError("Public IP could not be retrieved.")
4645

4746

4847
if sys.version_info >= (3, 14):

0 commit comments

Comments
 (0)