diff --git a/frontend/src/schemas/protocols/inbound/masque.ts b/frontend/src/schemas/protocols/inbound/masque.ts index 5de9b1a98..a3e681875 100644 --- a/frontend/src/schemas/protocols/inbound/masque.ts +++ b/frontend/src/schemas/protocols/inbound/masque.ts @@ -1,8 +1,7 @@ import { z } from 'zod'; -// MASQUE inbound (CONNECT-IP over HTTP/3 or HTTP/2). Clients log in with their email -// and password over Basic auth; the panel stores `password` and the backend hands it -// to xray-core as `pass`. +// MASQUE clients log in with email and password over Basic auth; the panel stores +// `password` and the backend hands it to xray-core as `pass`. export const MasqueClientSchema = z.object({ password: z.string().min(1), email: z.string().min(1), diff --git a/frontend/src/schemas/protocols/stream/xdrive.ts b/frontend/src/schemas/protocols/stream/xdrive.ts index f3387b5f6..10e82d503 100644 --- a/frontend/src/schemas/protocols/stream/xdrive.ts +++ b/frontend/src/schemas/protocols/stream/xdrive.ts @@ -1,8 +1,7 @@ import { z } from 'zod'; -// XDRIVE tunnels the stream through files in shared cloud storage, so both ends -// carry the same service, folder and secrets. Zero/absent tuning knobs take the -// core's defaults; segmentBytes and concurrency are capped there at 16 MiB / 64. +// Both XDRIVE ends carry the same service, folder and secrets; an absent tuning knob takes +// the core's default (segmentBytes and concurrency are capped there at 16 MiB / 64). export const XDriveServiceSchema = z.enum(['Google Drive', 'local', 'template']); export type XDriveService = z.infer; diff --git a/frontend/src/test/inbound-defaults.test.ts b/frontend/src/test/inbound-defaults.test.ts index 7f8f72ea4..190e10a5e 100644 --- a/frontend/src/test/inbound-defaults.test.ts +++ b/frontend/src/test/inbound-defaults.test.ts @@ -247,7 +247,7 @@ describe('createTlsSettingsWithDefaultCert', () => { } }); - it("defaults ALPN to http/1.1 for WebSocket (issue #6782)", () => { + it('defaults ALPN to http/1.1 for WebSocket (issue #6782)', () => { const tls = createTlsSettingsWithDefaultCert('ws'); expect(tls.alpn).toEqual(['http/1.1']); // The overridden value must still satisfy the TLS settings schema. diff --git a/internal/sub/service.go b/internal/sub/service.go index fa1493cdb..0dacf9500 100644 --- a/internal/sub/service.go +++ b/internal/sub/service.go @@ -816,11 +816,8 @@ func mergeStreamFromMaster(childStream, masterStream string) string { return string(out) } -// GetLink dispatches to the protocol-specific generator for one (inbound, client) -// pair. Returns "" when the inbound's protocol doesn't produce a subscription URL -// (socks, http, mixed, wireguard, dokodemo, tunnel) or its transport has no link -// format (xdrive). The returned string may contain multiple `\n`-separated URLs -// when the inbound has externalProxy set. +// GetLink returns one (inbound, client) pair's links, `\n`-separated per externalProxy; +// "" for a protocol (socks, http, mixed, wireguard, tunnel) or transport (xdrive) without one. func (s *SubService) GetLink(inbound *model.Inbound, email string) string { if network, _ := unmarshalStreamSettings(inbound.StreamSettings)["network"].(string); network == "xdrive" { return "" diff --git a/internal/xray/api_masque_test.go b/internal/xray/api_masque_test.go index ffd03908d..502619348 100644 --- a/internal/xray/api_masque_test.go +++ b/internal/xray/api_masque_test.go @@ -6,9 +6,8 @@ import ( "github.com/xtls/xray-core/proxy/masque" ) -// Panel paths hand AddUser the client's "password"; the hot diff hands it the user -// as GetXrayConfig emitted it, keyed "pass". Without an account the core adds a -// MASQUE user it can never authenticate. +// Panel paths hand AddUser the client's "password", the hot diff the emitted user's +// "pass"; without an account the core adds a MASQUE user it can never authenticate. func TestBuildUserAccountMasque(t *testing.T) { tests := []struct { name string