[PR #6083] [MERGED] Bug-label issue sweep: 16 fixes #6076

Closed
opened 2026-11-02 04:06:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6083
Author: @MHSanaei
Created: 7/23/2026
Status: ✅ Merged
Merged: 7/23/2026
Merged by: @MHSanaei

Base: main ← Head: fix/bug-triage-sweep


📝 Commits (10+)

  • 366e3f0 fix(xray): block private-range egress in default freedom finalRules (#6037)
  • d0c6fca fix(sub): version-gate unencrypted-outbound drops in outbound subscriptions (#6033)
  • a00257c fix(xray): resolve geodata assets before building outbound configs (#5928)
  • 3a60c0c fix(api): use a real i18n key in the client get handler (#5911)
  • 161fdfb fix(sub): carry host record Host header and path into Clash/JSON output (#5944)
  • 19f19cd fix(metrics): accept Unicode outbound tags in the observatory (#5972)
  • 03a33d2 fix(database): default sqlite to WAL to stop background-job lock storms (#6057, #6068)
  • 44b68b2 fix(database): strip finalmask.tcp from REALITY inbounds on upgrade (#6038)
  • 2a6312e fix(xray): stop deleting hand-written direct routing rules on save (#6056)
  • 8c73c22 fix(clients): resolve email lookups through client_inbounds after a move (#6059)

📊 Changes

34 files changed (+1172 additions, -85 deletions)

View changed files

📝 frontend/src/lib/xray/inbound-form-adapter.ts (+8 -0)
📝 frontend/src/pages/inbounds/form/useSecurityActions.ts (+2 -1)
📝 frontend/src/pages/xray/outbounds/OutboundsTab.tsx (+12 -3)
📝 frontend/src/test/inbound-form-adapter.test.ts (+16 -0)
📝 internal/database/db.go (+193 -5)
➕ internal/database/freedom_finalrules_migration_test.go (+87 -0)
➕ internal/database/journal_mode_test.go (+82 -0)
📝 internal/database/model/model.go (+1 -0)
➕ internal/database/reality_finalmask_migration_test.go (+93 -0)
📝 internal/sub/host_sub.go (+14 -0)
📝 internal/sub/host_sub_test.go (+33 -0)
📝 internal/web/controller/client.go (+4 -4)
📝 internal/web/controller/server.go (+2 -1)
📝 internal/web/controller/xray_setting.go (+6 -3)
📝 internal/web/service/config.json (+1 -0)
📝 internal/web/service/inbound.go (+48 -29)
➕ internal/web/service/inbound_client_move_test.go (+60 -0)
📝 internal/web/service/inbound_clients.go (+30 -0)
➕ internal/web/service/inbound_fallback_runtime_test.go (+78 -0)
📝 internal/web/service/inbound_node.go (+8 -1)

...and 14 more files

📄 Description

Bug-label issue sweep: 16 fixes

Triage of all 35 open bug-labeled issues. This branch carries the code fixes; the invalid / already-fixed / not-fixable-panel-side issues are closed separately with evidence-bearing comments (not part of this diff).

Fixes (16 commits)

Issue Fix
#6037 Block private-range egress in the default freedom finalRules (+ FreedomFinalRulesPrivateEgressBlock migration) — closes an SSRF path to loopback services via AsIs domain resolution
#6033 Version-gate unencrypted-outbound drops in outbound subscriptions (mirrors the CheckXrayConfig gate from #6028)
#5928 Point the in-process loader at the bin folder before building outbound configs, so geoip:private finalRules don't fail with a missing geoip.dat
#5911 Use a real i18n key in the client get handler (kills the message "get" not found log spam)
#5944 Carry a Host record's WebSocket Host header/path into Clash/Mihomo and JSON subscriptions
#5972 Accept Unicode (flag-emoji) outbound tags in the observatory metrics
#6057, #6068 Default SQLite to WAL to end background-job database is locked storms; Checkpoint() truncates the WAL so backups stay single-file; XUI_DB_JOURNAL_MODE=DELETE opt-out
#6038 Strip finalmask.tcp from REALITY inbounds on upgrade so the core doesn't crash at boot
#6056 Tag panel-managed DNS allow-rules (ruleTag: xui-dns-allow) and only strip tagged rules, so hand-written direct rules survive a save
#6059 Re-resolve email lookups through client_inbounds after a client moves between inbounds (fixes Telegram bot link/QR)
#5963 Inject settings.fallbacks into the node runtime payload and reconcile on it, so fallbacks replicate to nodes
#6023 Retry the initial PostgreSQL connection with backoff + surface the real error; add systemd StartLimit* so an unreachable DB stops the unit instead of looping
#6010 Force a full core restart when REALITY stream settings change (gRPC hot-swap doesn't rebuild the REALITY authenticator)
#6067 Per-subscription "Allow insecure" toggle for self-signed HTTPS subscription fetches
#6082 Send a PROXY-protocol header (v1/v2) in the REALITY target scanner when the inbound's xver >= 1
#5956 Re-parse streamSettings.sockopt through its schema on load so TProxy (and other sockopt fields) display for stored inbounds

Notes

  • One focused commit per issue; each has a test where the area supports it.
  • Conventions followed: no // comments in Go/TS, migrations/seeders in internal/database/db.go make gen diff clean, reused i18n keys (no new locale keys needed).

Verification

gofmt, go vet, go build, full go test ./... -shuffle=on, and frontend lint + typecheck + test (886 tests) all pass; make gen diff clean. golangci-lint was not available in the dev environment — CI will run it.

Deliberately excluded

  • #5613 already has an open PR (#5613 by @n0ctal, upstream-c-writeonly-node-token) — not duplicated here.
  • #5947 was already fixed on main — dropped from this branch.

Not in this diff (closed separately as won't-fix, with rationale)

#5983 (XHTTP extra blob is intentional for xray-core clients), #6007 (WireGuard endpoint is configurable via Share Address Strategy), #5988 (subId uniqueness is a deliberate aggregation constraint).

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6083 **Author:** [@MHSanaei](https://github.com/MHSanaei) **Created:** 7/23/2026 **Status:** ✅ Merged **Merged:** 7/23/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/bug-triage-sweep` --- ### 📝 Commits (10+) - [`366e3f0`](https://github.com/MHSanaei/3x-ui/commit/366e3f008eefb19187cdb3192c7663dd842a5a9f) fix(xray): block private-range egress in default freedom finalRules (#6037) - [`d0c6fca`](https://github.com/MHSanaei/3x-ui/commit/d0c6fcab79c187645cbd8c649a32f7b85f85c54f) fix(sub): version-gate unencrypted-outbound drops in outbound subscriptions (#6033) - [`a00257c`](https://github.com/MHSanaei/3x-ui/commit/a00257cec931eaefb90c38b8e4e89b0ae28e8d06) fix(xray): resolve geodata assets before building outbound configs (#5928) - [`3a60c0c`](https://github.com/MHSanaei/3x-ui/commit/3a60c0c2267782f2a5e8da4427459cb7117552ef) fix(api): use a real i18n key in the client get handler (#5911) - [`161fdfb`](https://github.com/MHSanaei/3x-ui/commit/161fdfba4fd4fb780239fc0583339a90d7eb9a6b) fix(sub): carry host record Host header and path into Clash/JSON output (#5944) - [`19f19cd`](https://github.com/MHSanaei/3x-ui/commit/19f19cd37690f86214b1dedb92d5d9eb6d8a015e) fix(metrics): accept Unicode outbound tags in the observatory (#5972) - [`03a33d2`](https://github.com/MHSanaei/3x-ui/commit/03a33d28d47cc5cb7c9a34cca3365ac3690f41cf) fix(database): default sqlite to WAL to stop background-job lock storms (#6057, #6068) - [`44b68b2`](https://github.com/MHSanaei/3x-ui/commit/44b68b2bcddf5fb5bb56e0bca0a884df7413b04a) fix(database): strip finalmask.tcp from REALITY inbounds on upgrade (#6038) - [`2a6312e`](https://github.com/MHSanaei/3x-ui/commit/2a6312e61bfbb6d4ca4a27bfb4f150f11dfb1f96) fix(xray): stop deleting hand-written direct routing rules on save (#6056) - [`8c73c22`](https://github.com/MHSanaei/3x-ui/commit/8c73c22e1694155875ad4b0c8a261ec108d5ecb1) fix(clients): resolve email lookups through client_inbounds after a move (#6059) ### 📊 Changes **34 files changed** (+1172 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/lib/xray/inbound-form-adapter.ts` (+8 -0) 📝 `frontend/src/pages/inbounds/form/useSecurityActions.ts` (+2 -1) 📝 `frontend/src/pages/xray/outbounds/OutboundsTab.tsx` (+12 -3) 📝 `frontend/src/test/inbound-form-adapter.test.ts` (+16 -0) 📝 `internal/database/db.go` (+193 -5) ➕ `internal/database/freedom_finalrules_migration_test.go` (+87 -0) ➕ `internal/database/journal_mode_test.go` (+82 -0) 📝 `internal/database/model/model.go` (+1 -0) ➕ `internal/database/reality_finalmask_migration_test.go` (+93 -0) 📝 `internal/sub/host_sub.go` (+14 -0) 📝 `internal/sub/host_sub_test.go` (+33 -0) 📝 `internal/web/controller/client.go` (+4 -4) 📝 `internal/web/controller/server.go` (+2 -1) 📝 `internal/web/controller/xray_setting.go` (+6 -3) 📝 `internal/web/service/config.json` (+1 -0) 📝 `internal/web/service/inbound.go` (+48 -29) ➕ `internal/web/service/inbound_client_move_test.go` (+60 -0) 📝 `internal/web/service/inbound_clients.go` (+30 -0) ➕ `internal/web/service/inbound_fallback_runtime_test.go` (+78 -0) 📝 `internal/web/service/inbound_node.go` (+8 -1) _...and 14 more files_ </details> ### 📄 Description ## Bug-label issue sweep: 16 fixes Triage of all 35 open `bug`-labeled issues. This branch carries the code fixes; the invalid / already-fixed / not-fixable-panel-side issues are closed separately with evidence-bearing comments (not part of this diff). ### Fixes (16 commits) | Issue | Fix | |---|---| | #6037 | Block private-range egress in the default freedom `finalRules` (+ `FreedomFinalRulesPrivateEgressBlock` migration) — closes an SSRF path to loopback services via `AsIs` domain resolution | | #6033 | Version-gate unencrypted-outbound drops in outbound subscriptions (mirrors the CheckXrayConfig gate from #6028) | | #5928 | Point the in-process loader at the bin folder before building outbound configs, so `geoip:private` finalRules don't fail with a missing `geoip.dat` | | #5911 | Use a real i18n key in the client `get` handler (kills the `message "get" not found` log spam) | | #5944 | Carry a Host record's WebSocket Host header/path into Clash/Mihomo and JSON subscriptions | | #5972 | Accept Unicode (flag-emoji) outbound tags in the observatory metrics | | #6057, #6068 | Default SQLite to WAL to end background-job `database is locked` storms; `Checkpoint()` truncates the WAL so backups stay single-file; `XUI_DB_JOURNAL_MODE=DELETE` opt-out | | #6038 | Strip `finalmask.tcp` from REALITY inbounds on upgrade so the core doesn't crash at boot | | #6056 | Tag panel-managed DNS allow-rules (`ruleTag: xui-dns-allow`) and only strip tagged rules, so hand-written direct rules survive a save | | #6059 | Re-resolve email lookups through `client_inbounds` after a client moves between inbounds (fixes Telegram bot link/QR) | | #5963 | Inject `settings.fallbacks` into the node runtime payload and reconcile on it, so fallbacks replicate to nodes | | #6023 | Retry the initial PostgreSQL connection with backoff + surface the real error; add systemd `StartLimit*` so an unreachable DB stops the unit instead of looping | | #6010 | Force a full core restart when REALITY stream settings change (gRPC hot-swap doesn't rebuild the REALITY authenticator) | | #6067 | Per-subscription "Allow insecure" toggle for self-signed HTTPS subscription fetches | | #6082 | Send a PROXY-protocol header (v1/v2) in the REALITY target scanner when the inbound's `xver >= 1` | | #5956 | Re-parse `streamSettings.sockopt` through its schema on load so TProxy (and other sockopt fields) display for stored inbounds | ### Notes - One focused commit per issue; each has a test where the area supports it. - Conventions followed: no `//` comments in Go/TS, migrations/seeders in `internal/database/db.go` `make gen` diff clean, reused i18n keys (no new locale keys needed). ### Verification `gofmt`, `go vet`, `go build`, full `go test ./... -shuffle=on`, and frontend `lint` + `typecheck` + `test` (886 tests) all pass; `make gen` diff clean. `golangci-lint` was not available in the dev environment — CI will run it. ### Deliberately excluded - **#5613** already has an open PR (#5613 by @n0ctal, `upstream-c-writeonly-node-token`) — not duplicated here. - **#5947** was already fixed on `main` — dropped from this branch. ### Not in this diff (closed separately as won't-fix, with rationale) #5983 (XHTTP `extra` blob is intentional for xray-core clients), #6007 (WireGuard endpoint is configurable via Share Address Strategy), #5988 (subId uniqueness is a deliberate aggregation constraint). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:12 +07:00
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#6076
No description provided.