This commit is contained in:
ShareVB 2025-02-02 18:29:36 +01:00
parent 76425c94b7
commit fea25b7243
2 changed files with 4 additions and 2 deletions

View file

@ -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,

View file

@ -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();