fix(sub): restore compatible SOCKS subscription inbound (#6395)

This commit is contained in:
dawn
2026-09-03 22:33:14 +08:00
committed by GitHub
parent 04e8458054
commit 0c72dd8384
8 changed files with 57 additions and 6 deletions
+13
View File
@@ -120,6 +120,19 @@ describe('buildJsonSubscription', () => {
expect(cfg.remarks).toBe('HK-01');
});
it('uses the iOS-compatible SOCKS inbound while preserving the mixed tag and HTTP inbound', () => {
const cfg = JSON.parse(buildJsonSubscription([vlessClient]));
const socks = cfg.inbounds.find((inbound: { port: number }) => inbound.port === 10808);
const http = cfg.inbounds.find((inbound: { port: number }) => inbound.port === 10809);
expect(socks).toMatchObject({
protocol: 'socks',
tag: 'mixed',
settings: { udp: true },
});
expect(http).toMatchObject({ protocol: 'http' });
});
it('trojan uses servers[] with a password and no method', () => {
const trojan: SubClient = {
protocol: 'trojan',