Simplify proxy routing and configuration
This commit is contained in:
12
test/server/subscription.test.js
Normal file
12
test/server/subscription.test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
|
||||
import { parseSubscriptionBody } from '../../src/server/subscription.js';
|
||||
|
||||
test('subscription server tags are trimmed for selection', () => {
|
||||
const { servers } = parseSubscriptionBody(JSON.stringify({
|
||||
outbounds: [{ type: 'vless', tag: 'de-frankfurt ', server: 'de.example', server_port: 443 }],
|
||||
}));
|
||||
|
||||
assert.equal(servers[0].tag, 'de-frankfurt');
|
||||
});
|
||||
Reference in New Issue
Block a user