fix: probe warp status through interface

This commit is contained in:
RickeyRen 2026-06-04 03:26:35 +08:00
parent abaf3cac62
commit 9dcf863e2a
2 changed files with 2 additions and 1 deletions

View file

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

View file

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