[GH-ISSUE #5141] [Bug]: scMinPostsIntervalMs: 30 is automatically added in 3.x.x and triggers TSPU blocking on mobile networks in Russia #3612

Closed
opened 2026-10-31 20:33:42 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @ttrroyy on GitHub (Jun 9, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5141

Describe the bug

After updating to the 3.x.x branch, many users started experiencing mass connection blocks.
The panel now automatically injects the following parameters into the Xray configuration:
JSON"scMaxEachPostBytes": "1000000",
"scMinPostsIntervalMs": "30"
The value scMinPostsIntervalMs: 30 is quickly detected by Russia’s TSPU (traffic filtering system) on mobile networks, causing immediate blocking.
These parameters are being added to:

The Advanced Xray template
The Extra block in client links and subscriptions

How to reproduce the problem

Workaround:
Manually remove both lines from the Advanced template and from the Extra block in client configs.
Request:
Please make scMinPostsIntervalMs optional or remove the automatic injection of this aggressive default value, as it breaks usability on Russian mobile networks.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.x.x

Xray-core version

25.x.x

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @ttrroyy on GitHub (Jun 9, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5141 ### Describe the bug After updating to the 3.x.x branch, many users started experiencing mass connection blocks. The panel now automatically injects the following parameters into the Xray configuration: JSON"scMaxEachPostBytes": "1000000", "scMinPostsIntervalMs": "30" The value scMinPostsIntervalMs: 30 is quickly detected by Russia’s TSPU (traffic filtering system) on mobile networks, causing immediate blocking. These parameters are being added to: The Advanced Xray template The Extra block in client links and subscriptions ### How to reproduce the problem Workaround: Manually remove both lines from the Advanced template and from the Extra block in client configs. Request: Please make scMinPostsIntervalMs optional or remove the automatic injection of this aggressive default value, as it breaks usability on Russian mobile networks. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.x.x ### Xray-core version 25.x.x ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24.04 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
Author
Owner

@github-actions[bot] commented on GitHub (Jun 9, 2026):

Thanks for the detailed report. I traced this through the source code and can confirm the root cause.

Root cause

In frontend/src/schemas/protocols/stream/xhttp.ts, the Zod schema for XHTTP stream settings declares these defaults:

// line 44
scMaxEachPostBytes: z.string().default('1000000'),
// line 54
scMinPostsIntervalMs: z.string().default('30'),

Any XHTTP inbound or outbound created (or re-saved) through the 3.x frontend gets these values written to the database. From there, the subscription service (sub/subService.go:1581–1591) emits them into the extra blob of share links/subscriptions whenever the stored string is non-empty:

stringFields := []string{
    ...
    "scMaxEachPostBytes", "scMinPostsIntervalMs",
}
for _, field := range stringFields {
    if v, ok := xhttp[field].(string); ok && len(v) > 0 {
        extra[field] = v   // emitted because "30" and "1000000" are non-empty
    }
}

The wire-normalizer (frontend/src/lib/xray/stream-wire-normalize.ts) correctly strips scMinPostsIntervalMs for inbound configs (line 123), but leaves it in place for outbound configs in auto or packet-up mode — which is most clients.

Workaround (until a fix lands)

For each affected XHTTP inbound, open its edit form in the panel and clear the scMinPostsIntervalMs and scMaxEachPostBytes fields (set them to empty), then save. Once the fields are empty, the subscription service will no longer include them in generated links (len(v) > 0 guard). You do not need to touch the raw xray JSON template directly.

Proper fix

The cleanest fix is to change the default in frontend/src/schemas/protocols/stream/xhttp.ts from '30' to '' for scMinPostsIntervalMs (and possibly also for scMaxEachPostBytes). An empty default means the field is omitted from new configs and from subscriptions, letting xray-core use its own internal default without injecting an explicit value into every share link.

This would be a one-line change on line 54 of that file:

- scMinPostsIntervalMs: z.string().default('30'),
+ scMinPostsIntervalMs: z.string().default(''),

Existing configs already stored with '30' would need a one-time re-save with the field cleared, or a direct DB update.

<!-- gh-comment-id:4662126656 --> @github-actions[bot] commented on GitHub (Jun 9, 2026): Thanks for the detailed report. I traced this through the source code and can confirm the root cause. ## Root cause In `frontend/src/schemas/protocols/stream/xhttp.ts`, the Zod schema for XHTTP stream settings declares these defaults: ```typescript // line 44 scMaxEachPostBytes: z.string().default('1000000'), // line 54 scMinPostsIntervalMs: z.string().default('30'), ``` Any XHTTP inbound or outbound created (or re-saved) through the 3.x frontend gets these values written to the database. From there, the subscription service (`sub/subService.go:1581–1591`) emits them into the `extra` blob of share links/subscriptions whenever the stored string is non-empty: ```go stringFields := []string{ ... "scMaxEachPostBytes", "scMinPostsIntervalMs", } for _, field := range stringFields { if v, ok := xhttp[field].(string); ok && len(v) > 0 { extra[field] = v // emitted because "30" and "1000000" are non-empty } } ``` The wire-normalizer (`frontend/src/lib/xray/stream-wire-normalize.ts`) correctly strips `scMinPostsIntervalMs` for **inbound** configs (line 123), but leaves it in place for **outbound** configs in `auto` or `packet-up` mode — which is most clients. ## Workaround (until a fix lands) For each affected XHTTP inbound, open its edit form in the panel and **clear** the `scMinPostsIntervalMs` and `scMaxEachPostBytes` fields (set them to empty), then save. Once the fields are empty, the subscription service will no longer include them in generated links (`len(v) > 0` guard). You do **not** need to touch the raw xray JSON template directly. ## Proper fix The cleanest fix is to change the default in `frontend/src/schemas/protocols/stream/xhttp.ts` from `'30'` to `''` for `scMinPostsIntervalMs` (and possibly also for `scMaxEachPostBytes`). An empty default means the field is omitted from new configs and from subscriptions, letting xray-core use its own internal default without injecting an explicit value into every share link. This would be a one-line change on line 54 of that file: ```diff - scMinPostsIntervalMs: z.string().default('30'), + scMinPostsIntervalMs: z.string().default(''), ``` Existing configs already stored with `'30'` would need a one-time re-save with the field cleared, or a direct DB update.
Author
Owner

@SpeedeMiner commented on GitHub (Jun 10, 2026):

Is this the only parameter that triggers blocking?
"scMinPostsIntervalMs": "30".
I only use this parameter, scMaxEachPostBytes": "2000000". Should I remove it as well?

<!-- gh-comment-id:4666445969 --> @SpeedeMiner commented on GitHub (Jun 10, 2026): Is this the only parameter that triggers blocking? "scMinPostsIntervalMs": "30". I only use this parameter, scMaxEachPostBytes": "2000000". Should I remove it as well?
Author
Owner

@MHSanaei commented on GitHub (Jun 11, 2026):

Fixed in d94c3fc5.

Root cause confirmed: the panel seeded every XHTTP config with scMaxEachPostBytes=1000000 and scMinPostsIntervalMs=30 — which are xray-core''s own internal defaults — and then emitted them into every generated config and share link. The literal scMinPostsIntervalMs=30 is exactly the stable fingerprint TSPU keys on.

The fix has two parts so it helps both new and existing setups:

  • New configs no longer seed these values at all (empty defaults in the inbound/outbound schemas and templates), so xray-core applies its own defaults silently with nothing on the wire to fingerprint.
  • Existing stored configs don''t need to be re-saved: the share-link builder, the raw subscription, and the JSON subscription now drop any value that equals xray-core''s default (1000000 / 30) instead of advertising it. Values you set deliberately to something else are still emitted.

So after upgrading, your existing inbounds will stop carrying scMinPostsIntervalMs=30 in their links automatically. @SpeedeMiner — to answer your question: yes, scMaxEachPostBytes was being injected the same way; with this fix you no longer need to clear either field by hand. A custom scMaxEachPostBytes=2000000 that you actually want is preserved. Will be in the next release.

<!-- gh-comment-id:4686077082 --> @MHSanaei commented on GitHub (Jun 11, 2026): Fixed in d94c3fc5. Root cause confirmed: the panel seeded every XHTTP config with `scMaxEachPostBytes=1000000` and `scMinPostsIntervalMs=30` — which are xray-core''s own internal defaults — and then emitted them into every generated config and share link. The literal `scMinPostsIntervalMs=30` is exactly the stable fingerprint TSPU keys on. The fix has two parts so it helps both new and existing setups: - **New configs** no longer seed these values at all (empty defaults in the inbound/outbound schemas and templates), so xray-core applies its own defaults silently with nothing on the wire to fingerprint. - **Existing stored configs** don''t need to be re-saved: the share-link builder, the raw subscription, and the JSON subscription now drop any value that equals xray-core''s default (`1000000` / `30`) instead of advertising it. Values you set deliberately to something else are still emitted. So after upgrading, your existing inbounds will stop carrying `scMinPostsIntervalMs=30` in their links automatically. @SpeedeMiner — to answer your question: yes, `scMaxEachPostBytes` was being injected the same way; with this fix you no longer need to clear either field by hand. A custom `scMaxEachPostBytes=2000000` that you actually want is preserved. Will be in the next release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3612
No description provided.