This commit is contained in:
ShareVB committed 2025-02-02 18:29:36 +01:00
1 parent 81258f603e
commit 68f8e3921b
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ import { defineTool } from '../tool';
export const tool = defineTool({ export const tool = defineTool({
name: 'My IP Address', name: 'My IP Address',
path: '/my-ip', 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'], keywords: ['my', 'client', 'ip'],
component: () => import('./my-ip.vue'), component: () => import('./my-ip.vue'),
icon: World, icon: World,
+3 -1
View File
@@ -4,7 +4,9 @@ import { useCopy } from '@/composable/copy';
const [clientIP, refreshClientIP] = computedRefreshableAsync(async () => { const [clientIP, refreshClientIP] = computedRefreshableAsync(async () => {
try { 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) { catch (e: any) {
return e.toString(); return e.toString();