mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-16 23:27:14 +00:00
feat(xray): update xray-core to v26.9.8 and adapt panel
Bump xtls/xray-core to 37ceb8b4b6 (v26.9.8) and the three binary pins (DockerInit.sh, release.yml Linux + Windows) in lockstep. No deleted symbols; the impact is entirely on the JSON config surface. Outbound "proxySettings" is now refused by the config loader (moved to streamSettings.sockopt.dialerProxy) and a freedom outbound rejects sockopt.addressPortStrategy. Either key in a stored template would keep the core from starting after the upgrade, so a new OutboundRemovedKeysFix seeder rewrites xrayTemplateConfig once: proxySettings.tag becomes sockopt.dialerProxy (an existing dialerProxy wins) and addressPortStrategy is dropped from freedom outbounds. Template saves and outbound subscriptions already run through the vendored loader, so the new refusals surface there with the core's own message. REALITY no longer applies a built-in minClientVer (26.3.27) when the field is empty. The form placeholder and the min/max hints in all 13 locales now say that empty means no minimum. New upstream keys the Zod schemas would otherwise strip, with form support where a sibling field already had it: - blackhole response type "custom" with base64 customResponseData - realm finalmask ipMode (dual/v4/v6) and portMapping (UPnP / NAT-PMP) - quicParams brutalDisableLossCompensation, disableChromeParrot, disableGSO, disableStatelessReset - hysteria masquerade proxy xForwarded - wireguard outbound remoteDNS - routing rule localOS freedom.domainStrategy is only deprecated upstream (auto-migrated to sockopt.domainStrategy with a warning) and is left untouched.
This commit is contained in:
@@ -62,6 +62,23 @@ exports[`FinalMaskStreamSettingsSchema fixtures > parses quic-params byte-stably
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`FinalMaskStreamSettingsSchema fixtures > parses quic-params-flags byte-stably 1`] = `
|
||||
{
|
||||
"quicParams": {
|
||||
"brutalDisableLossCompensation": true,
|
||||
"brutalDown": "100 mbps",
|
||||
"brutalUp": "60 mbps",
|
||||
"congestion": "brutal",
|
||||
"disableChromeParrot": true,
|
||||
"disableGSO": true,
|
||||
"disablePathMTUDiscovery": false,
|
||||
"disableStatelessReset": true,
|
||||
},
|
||||
"tcp": [],
|
||||
"udp": [],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`FinalMaskStreamSettingsSchema fixtures > parses realm-tls byte-stably 1`] = `
|
||||
{
|
||||
"tcp": [],
|
||||
|
||||
@@ -74,6 +74,17 @@ exports[`RuleObjectSchema fixtures > parses full byte-stably 1`] = `
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`RuleObjectSchema fixtures > parses local-os byte-stably 1`] = `
|
||||
{
|
||||
"localOS": [
|
||||
"linux",
|
||||
"darwin",
|
||||
],
|
||||
"outboundTag": "direct",
|
||||
"type": "field",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`RuleObjectSchema fixtures > parses minimal byte-stably 1`] = `
|
||||
{
|
||||
"outboundTag": "direct",
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"quicParams": {
|
||||
"congestion": "brutal",
|
||||
"brutalUp": "60 mbps",
|
||||
"brutalDown": "100 mbps",
|
||||
"brutalDisableLossCompensation": true,
|
||||
"disablePathMTUDiscovery": false,
|
||||
"disableChromeParrot": true,
|
||||
"disableGSO": true,
|
||||
"disableStatelessReset": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"type": "field",
|
||||
"localOS": ["linux", "darwin"],
|
||||
"outboundTag": "direct"
|
||||
}
|
||||
@@ -264,6 +264,54 @@ describe('outbound-form-adapter: round-trip', () => {
|
||||
expect(withType.settings).toEqual({ response: { type: 'http' } });
|
||||
});
|
||||
|
||||
it('blackhole carries customResponseData only for the custom response type', () => {
|
||||
const custom = formValuesToWirePayload(
|
||||
rawOutboundToFormValues({
|
||||
protocol: 'blackhole',
|
||||
settings: { response: { type: 'custom', customResponseData: 'SFRUUC8xLjEgNDAz' } },
|
||||
}),
|
||||
);
|
||||
expect(custom.settings).toEqual({
|
||||
response: { type: 'custom', customResponseData: 'SFRUUC8xLjEgNDAz' },
|
||||
});
|
||||
|
||||
const http = formValuesToWirePayload(
|
||||
rawOutboundToFormValues({
|
||||
protocol: 'blackhole',
|
||||
settings: { response: { type: 'http', customResponseData: 'ignored' } },
|
||||
}),
|
||||
);
|
||||
expect(http.settings).toEqual({ response: { type: 'http' } });
|
||||
});
|
||||
|
||||
it('wireguard csv-joins remoteDNS on read and splits it on write', () => {
|
||||
const wire = {
|
||||
protocol: 'wireguard',
|
||||
settings: {
|
||||
secretKey: 'YFVmTVCBsLxXJCe4i+jK8PgD3S6vUqfZ4Zl0JVNDfHA=',
|
||||
remoteDNS: ['1.1.1.1', '2606:4700:4700::1111'],
|
||||
peers: [{ publicKey: 'pk', endpoint: 'wg.example.com:51820' }],
|
||||
},
|
||||
};
|
||||
const form = rawOutboundToFormValues(wire);
|
||||
if (form.protocol === 'wireguard') {
|
||||
expect(form.settings.remoteDNS).toBe('1.1.1.1,2606:4700:4700::1111');
|
||||
}
|
||||
const back = formValuesToWirePayload(form);
|
||||
expect((back.settings as { remoteDNS?: string[] }).remoteDNS).toEqual([
|
||||
'1.1.1.1',
|
||||
'2606:4700:4700::1111',
|
||||
]);
|
||||
|
||||
const unset = formValuesToWirePayload(
|
||||
rawOutboundToFormValues({
|
||||
protocol: 'wireguard',
|
||||
settings: { secretKey: wire.settings.secretKey, peers: wire.settings.peers },
|
||||
}),
|
||||
);
|
||||
expect((unset.settings as { remoteDNS?: string[] }).remoteDNS).toBeUndefined();
|
||||
});
|
||||
|
||||
it('dns rules normalize qType numeric strings, split domains, carry rCode', () => {
|
||||
const wire = {
|
||||
protocol: 'dns',
|
||||
|
||||
Reference in New Issue
Block a user