Refactor VPN proxy client implementation
Build and Deploy Gateway / build-and-push (push) Failing after 2s
Build and Deploy Gateway / deploy (push) Has been skipped

This commit is contained in:
2026-08-09 00:41:52 +03:00
parent 32be4380a3
commit 34d8b681ad
190 changed files with 20064 additions and 9761 deletions
+28 -5
View File
@@ -10,9 +10,9 @@ import {
assertStateSnapshot,
createStateSnapshot,
normalizeStoredState,
} from '../../src/shared/contracts/state.js';
import { createServerId } from '../../src/shared/serverIdentity.js';
import { HARBOR_VERSIONS } from '../../src/shared/versions.js';
} from '../../dist/shared/contracts/state.js';
import { createServerId } from '../../dist/shared/serverIdentity.js';
import { HARBOR_VERSIONS } from '../../dist/shared/versions.js';
const root = path.resolve(import.meta.dirname, '../..');
@@ -113,7 +113,7 @@ test('startup discards a rejected cached subscription and returns to first-run',
}));
fs.writeFileSync(path.join(dir, 'sing-box-config.json'), '{}');
const child = spawn(process.execPath, ['src/server/index.js'], {
const child = spawn(process.execPath, ['dist/server/main.js'], {
cwd: root,
env: {
...process.env,
@@ -254,7 +254,7 @@ setInterval(() => {}, 60_000);
}));
const port = await freePort();
const child = spawn(process.execPath, ['src/server/index.js'], {
const child = spawn(process.execPath, ['dist/server/main.js'], {
cwd: root,
env: {
...process.env,
@@ -294,6 +294,29 @@ setInterval(() => {}, 60_000);
assert.equal(initial.route.localRulesPendingRestart, false);
assert.equal(JSON.stringify(initial).includes(subscriptionUrl), false);
const stateKeys = Object.keys(initial).sort();
assert.deepEqual(stateKeys, [
'apiVersion',
'configExists',
'connection',
'fetchedAt',
'gatewayAuto',
'generatedAt',
'hasSubscription',
'mode',
'operation',
'port',
'proxyPort',
'revision',
'route',
'selectedTag',
'selection',
'servers',
'singboxRunning',
'singboxStartedAt',
'subscription',
'subscriptionHost',
'userInfo',
]);
let revision = initial.revision;
let rulesRevision = initial.route.localRulesRevision;