From 9dcf863e2ab2c8bcebbf860a38dcef6a6111f014 Mon Sep 17 00:00:00 2001 From: RickeyRen Date: Thu, 4 Jun 2026 03:26:35 +0800 Subject: [PATCH] fix: probe warp status through interface --- src/modules/warp/warp.service.ts | 2 +- test/warp-status.test.mjs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/warp/warp.service.ts b/src/modules/warp/warp.service.ts index 114405f..8bbd971 100644 --- a/src/modules/warp/warp.service.ts +++ b/src/modules/warp/warp.service.ts @@ -284,7 +284,7 @@ export class WarpService { try { const result = await this.execFixed( '/usr/bin/curl', - ['--max-time', '5', '-fsSL', WARP_TRACE_URL], + ['--max-time', '5', '-4', '--interface', WARP_INTERFACE, '-fsSL', WARP_TRACE_URL], 8_000, ); diff --git a/test/warp-status.test.mjs b/test/warp-status.test.mjs index b897939..cf8bac7 100644 --- a/test/warp-status.test.mjs +++ b/test/warp-status.test.mjs @@ -55,6 +55,7 @@ describe('WARP contract shape', () => { assert.match(service, /WGCF_RELEASES_API_URL/); assert.match(service, /WARP_ENDPOINT = '162\.159\.192\.1:2408'/); assert.match(service, /Endpoint = \$\{WARP_ENDPOINT\}/); + assert.match(service, /'--interface', WARP_INTERFACE/); assert.match(service, /normalizeWarpConfig/); assert.match(service, /stopRunningInterface/); assert.match(service, /install -m 600 wgcf-profile\.conf/);