mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-04 09:27:15 +00:00
fix(sub): restore compatible SOCKS subscription inbound (#6395)
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user