Refactor VPN proxy components and update related behavior
This commit is contained in:
@@ -75,8 +75,20 @@ test('typed endpoint facade preserves exact request contracts and raw payload id
|
||||
}],
|
||||
[() => api.subscription.refresh(), '/api/subscription/refresh', { method: 'POST' }],
|
||||
[() => api.subscription.forget(), '/api/subscription', { method: 'DELETE' }],
|
||||
[() => api.apply('server-1'), '/api/apply', {
|
||||
method: 'POST', body: JSON.stringify({ serverId: 'server-1', selectedTag: 'server-1' }),
|
||||
[() => api.profiles.add('Личный', 'https://sub', 4), '/api/profiles', {
|
||||
method: 'POST', body: JSON.stringify({ label: 'Личный', url: 'https://sub', expectedRevision: 4 }),
|
||||
}],
|
||||
[() => api.profiles.rename('profile-1', 'Работа', 5), '/api/profiles/profile-1', {
|
||||
method: 'PATCH', body: JSON.stringify({ label: 'Работа', expectedRevision: 5 }),
|
||||
}],
|
||||
[() => api.profiles.selectServer('profile-1', 'server-1', 6), '/api/profiles/profile-1/server', {
|
||||
method: 'PUT', body: JSON.stringify({ serverId: 'server-1', expectedRevision: 6 }),
|
||||
}],
|
||||
[() => api.profiles.activate('profile-1', 7), '/api/profiles/profile-1/activate', {
|
||||
method: 'POST', body: JSON.stringify({ expectedRevision: 7 }),
|
||||
}],
|
||||
[() => api.apply('profile-1', 'server-1', 8), '/api/apply', {
|
||||
method: 'POST', body: JSON.stringify({ profileId: 'profile-1', serverId: 'server-1', expectedRevision: 8 }),
|
||||
}],
|
||||
[() => api.gatewayAuto.setEnabled(true), '/api/gateway-auto', {
|
||||
method: 'POST', body: JSON.stringify({ enabled: true }),
|
||||
@@ -101,7 +113,7 @@ test('typed endpoint facade preserves exact request contracts and raw payload id
|
||||
}],
|
||||
[() => api.singbox.stop(), '/api/singbox/stop', { method: 'POST' }],
|
||||
[() => api.singbox.restart(), '/api/singbox/restart', { method: 'POST' }],
|
||||
[() => api.servers.ping(['one', 'two']), '/api/servers/ping-all', {
|
||||
[() => api.servers.ping('profile-1', ['one', 'two']), '/api/profiles/profile-1/servers/ping', {
|
||||
method: 'POST', body: JSON.stringify({ serverIds: ['one', 'two'] }),
|
||||
}],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user