From fea25b7243a51a6588c912eabdbe84ba13fabac8 Mon Sep 17 00:00:00 2001 From: ShareVB Date: Sun, 2 Feb 2025 18:29:36 +0100 Subject: [PATCH] fix(My IP): use https://www.ipify.org/ --- src/tools/my-ip/index.ts | 2 +- src/tools/my-ip/my-ip.vue | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tools/my-ip/index.ts b/src/tools/my-ip/index.ts index 8da30dfb..ce883685 100644 --- a/src/tools/my-ip/index.ts +++ b/src/tools/my-ip/index.ts @@ -4,7 +4,7 @@ import { defineTool } from '../tool'; export const tool = defineTool({ name: 'My IP Address', path: '/my-ip', - description: 'Get your client IP Address (IPv4/6) using https://getjsonip.com/', + description: 'Get your client IP Address (IPv4/6) using https://www.ipify.org/', keywords: ['my', 'client', 'ip'], component: () => import('./my-ip.vue'), icon: World, diff --git a/src/tools/my-ip/my-ip.vue b/src/tools/my-ip/my-ip.vue index a4b1c8f2..f24ee89d 100644 --- a/src/tools/my-ip/my-ip.vue +++ b/src/tools/my-ip/my-ip.vue @@ -4,7 +4,9 @@ import { useCopy } from '@/composable/copy'; const [clientIP, refreshClientIP] = computedRefreshableAsync(async () => { try { - return (await (await fetch('https://jsonip.com', { mode: 'cors' })).json()).ip?.toString(); + return (await (await fetch('https://api64.ipify.org?format=json', { + mode: 'cors', + })).json()).ip?.toString(); } catch (e: any) { return e.toString();