mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 12:44:22 +00:00
Moves the two outbound-side consts out of models/outbound.ts and into schemas/primitives/outbound-protocol.ts. Renames the export to OutboundProtocols to disambiguate from the inbound Protocols const (different key casing — PascalCase vs ALL CAPS — and partly different member set, so they cannot share a single const). OutboundsTab.tsx keeps its 15+ Protocols.X call sites by aliasing the import. FinalMaskForm.tsx and BasicsTab.tsx swap directly. Drops a stale `as string[]` cast in BasicsTab that no longer fits the new readonly-tuple typing. After this commit only the two big form modals (InboundFormModal/OutboundFormModal) plus three intentional parity tests still import from @/models/.
30 lines
614 B
TypeScript
30 lines
614 B
TypeScript
export const OutboundProtocols = Object.freeze({
|
|
Freedom: 'freedom',
|
|
Blackhole: 'blackhole',
|
|
DNS: 'dns',
|
|
VMess: 'vmess',
|
|
VLESS: 'vless',
|
|
Trojan: 'trojan',
|
|
Shadowsocks: 'shadowsocks',
|
|
Wireguard: 'wireguard',
|
|
Hysteria: 'hysteria',
|
|
Socks: 'socks',
|
|
HTTP: 'http',
|
|
Loopback: 'loopback',
|
|
});
|
|
|
|
export const OutboundDomainStrategies = Object.freeze([
|
|
'AsIs',
|
|
'UseIP',
|
|
'UseIPv4',
|
|
'UseIPv6',
|
|
'UseIPv6v4',
|
|
'UseIPv4v6',
|
|
'ForceIP',
|
|
'ForceIPv6v4',
|
|
'ForceIPv6',
|
|
'ForceIPv4v6',
|
|
'ForceIPv4',
|
|
] as const);
|
|
|
|
export type OutboundDomainStrategy = (typeof OutboundDomainStrategies)[number];
|