From 3e99f2f66f50e4742c387fac15bae603f494ab9c Mon Sep 17 00:00:00 2001 From: Eamon-meng <17516219072@163.com> Date: Mon, 20 Jul 2026 16:44:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dv2=E6=8F=90=E5=8F=96IP?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=96=B9=E5=BC=8F=E4=BF=AE=E6=94=B9=E5=BF=85?= =?UTF-8?q?=E5=A1=AB=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(api)/proxies/v2/route.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/(api)/proxies/v2/route.ts b/src/app/(api)/proxies/v2/route.ts index e423912..50af74a 100644 --- a/src/app/(api)/proxies/v2/route.ts +++ b/src/app/(api)/proxies/v2/route.ts @@ -50,6 +50,7 @@ export async function GET(req: NextRequest) { const separator = rSeparator.split(',').map(code => String.fromCharCode(parseInt(code))).join('') switch (format) { + case '2': case 'json': if (hostFormat === 'domain') { const domainFormatData = result.data.map(item => ({ @@ -57,6 +58,7 @@ export async function GET(req: NextRequest) { port: item.port, ...(item.username && item.password ? {username: item.username, password: item.password} : {}), })) + return NextResponse.json(domainFormatData) } else { @@ -65,9 +67,12 @@ export async function GET(req: NextRequest) { port: item.port, ...(item.username && item.password ? {username: item.username, password: item.password} : {}), })) + return NextResponse.json(ipFormatData) } + case '1': case 'text': + default: const text = result.data.map((item) => { let hostValue: string if (hostFormat === 'domain') {