mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-20 10:00:58 +00:00
* feat: support latest Wireguard features from Xray-core Implements support for Xray-core PRs #5833, #5643, and #5850 for Wireguard Inbounds: - Adds 'domainStrategy' and 'workers' to Wireguard inbound configuration. - Enables the Stream Settings tab for Wireguard inbounds to configure 'sockopt' and 'finalmask', hiding the irrelevant 'network' transmission dropdown. - Adds the 'randRange' field to the 'noise' UDP Finalmask obfuscation settings. * fix --------- Co-authored-by: Rqzbeh <Rqzbeh@example.com> Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
This commit is contained in:
@@ -156,10 +156,17 @@ export default function OutboundFormModal({
|
||||
|
||||
useEffect(() => {
|
||||
if (!streamAllowed) return;
|
||||
// Wireguard dials its own UDP — only finalmask/sockopt apply, never a
|
||||
// transport. Don't seed network 'tcp'; clear a leftover one (from a
|
||||
// protocol switch) so the transmission/security blocks stay hidden.
|
||||
if (protocol === 'wireguard') {
|
||||
if (network) form.setFieldValue('streamSettings', { security: 'none' });
|
||||
return;
|
||||
}
|
||||
if (network) return;
|
||||
form.setFieldValue('streamSettings', { ...newStreamSlice('tcp'), security: 'none' });
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [streamAllowed, network]);
|
||||
}, [streamAllowed, network, protocol]);
|
||||
|
||||
useEffect(() => {
|
||||
if (protocol !== 'hysteria') return;
|
||||
@@ -565,7 +572,7 @@ export default function OutboundFormModal({
|
||||
|
||||
{security === 'reality' && realityAllowed && <RealityForm />}
|
||||
|
||||
{((streamAllowed && network) || !streamAllowed) && (
|
||||
{((streamAllowed && network) || !streamAllowed || protocol === 'wireguard') && (
|
||||
<SockoptForm form={form} outboundTags={existingTags} />
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user