mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-10 05:10:58 +00:00
feat(inbounds): add Real client IP presets to capture visitor IP behind CDN/relay
Surface the existing sockopt knobs (acceptProxyProtocol, trustedXForwardedFor) as a guided 'Real client IP' preset selector in the inbound form, so the real visitor IP is recovered behind Cloudflare CDN or an L4 tunnel/relay instead of recording the intermediary address. Presets are mutually exclusive, warn on incompatible transports, and add tooltips, docs, and translations for all locales.
This commit is contained in:
@@ -80,6 +80,7 @@ exports[`inbound transport forms > RawForm field structure is stable 1`] = `
|
||||
exports[`inbound transport forms > SockoptForm field structure is stable (enabled + happy eyeballs) 1`] = `
|
||||
[
|
||||
"Sockopt",
|
||||
"Real client IP",
|
||||
"Route Mark",
|
||||
"TCP Keep Alive Interval",
|
||||
"TCP Keep Alive Idle",
|
||||
|
||||
@@ -89,7 +89,7 @@ describe('inbound transport forms', () => {
|
||||
|
||||
it('SockoptForm field structure is stable (enabled + happy eyeballs)', () => {
|
||||
renderInForm(
|
||||
() => <SockoptForm toggleSockopt={noop} />,
|
||||
() => <SockoptForm toggleSockopt={noop} network="tcp" />,
|
||||
{ streamSettings: { sockopt: { happyEyeballs: {} } } },
|
||||
);
|
||||
expect(fieldLabels()).toMatchSnapshot();
|
||||
|
||||
Reference in New Issue
Block a user