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') {