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

This commit is contained in:
dawn authored and GitHub committed 2026-09-03 16:33:14 +02:00
1 parent 04e8458054
commit 0c72dd8384
8 files changed
+57 -6

No files matched your search

+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',
+1 -1
View File
@@ -146,7 +146,7 @@ function subJsonSkeleton(): Record<string, unknown> {
inbounds: [
{
port: 10808,
protocol: 'mixed',
protocol: 'socks',
settings: { auth: 'noauth', udp: true, userLevel: 8 },
sniffing: { destOverride: ['http', 'tls', 'quic', 'fakedns'], enabled: true },
tag: 'mixed',