mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-07 05:14:27 +00:00
fix(routing): write lowercase L4 network to xray config, display uppercase in UI
This commit is contained in:
@@ -55,7 +55,7 @@ const initialForm = (): FormState => ({
|
||||
balancerTag: '',
|
||||
});
|
||||
|
||||
const NETWORKS = ['', 'TCP', 'UDP', 'TCP,UDP'];
|
||||
const NETWORKS = ['', 'tcp', 'udp', 'tcp,udp'];
|
||||
const PROTOCOLS = ['http', 'tls', 'bittorrent', 'quic'];
|
||||
|
||||
function csv(value: string): string[] {
|
||||
|
||||
@@ -83,7 +83,7 @@ export function ruleCriteriaChips(rule: RuleRow) {
|
||||
if (rule.port) chips.push({ label: 'Port', value: rule.port });
|
||||
if (rule.sourceIP) chips.push({ label: 'Src IP', value: rule.sourceIP });
|
||||
if (rule.sourcePort) chips.push({ label: 'Src Port', value: rule.sourcePort });
|
||||
if (rule.network) chips.push({ label: 'L4', value: rule.network });
|
||||
if (rule.network) chips.push({ label: 'L4', value: rule.network.toUpperCase() });
|
||||
if (rule.protocol) chips.push({ label: 'Protocol', value: rule.protocol });
|
||||
if (rule.user) chips.push({ label: 'User', value: rule.user });
|
||||
if (rule.vlessRoute) chips.push({ label: 'VLESS', value: rule.vlessRoute });
|
||||
|
||||
@@ -133,7 +133,7 @@ export function useRoutingColumns({
|
||||
key: 'network',
|
||||
render: (_v, record) => (
|
||||
<div className="criterion-flow">
|
||||
{record.network && <CriterionRow label="L4" value={record.network} title={`L4: ${record.network}`} />}
|
||||
{record.network && <CriterionRow label="L4" value={record.network.toUpperCase()} title={`L4: ${record.network.toUpperCase()}`} />}
|
||||
{record.protocol && <CriterionRow label="Protocol" value={record.protocol} title={`Protocol: ${record.protocol}`} />}
|
||||
{record.attrs && <CriterionRow label="Attrs" value={record.attrs} title={`Attrs: ${record.attrs}`} />}
|
||||
{!record.network && !record.protocol && !record.attrs && <span className="criterion-empty">—</span>}
|
||||
|
||||
Reference in New Issue
Block a user