[GH-ISSUE #5745] [Bug]: Hysteria + salamander not working #3994

Closed
opened 2026-10-31 20:36:24 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @skorphil on GitHub (Jul 2, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5745

Describe the bug

Seems like salamander config not being saved. After i setup in ui, i see this:

sudo cat /usr/local/x-ui/bin/config.json | python3 -m json.tool | grep -n -A30 '"port": 46031'
176:            "port": 46031,
177-            "protocol": "hysteria",
178-            "settings": {
179-                "clients": [
180-                    {
181-                        "auth": "y352u9j1r8j75rnn",
182-                        "email": "ukrbbcrzmk"
183-                    }
184-                ],
185-                "version": 2
186-            },
187-            "streamSettings": {
188-                "hysteriaSettings": {
189-                    "udpIdleTimeout": 60,
190-                    "version": 2
191-                },
192-                "network": "hysteria",
193-                "security": "tls",
194-                "tlsSettings": {
195-                    "alpn": [
196-                        "h3"
197-                    ],
198-                    "certificates": [
199-                        {
200-                            "buildChain": false,
201-                            "certificateFile": "/root/cert/ip/fullchain.pem",
202-                            "keyFile": "/root/cert/ip/privkey.pem",
203-                            "ocspStapling": 0,
204-                            "oneTimeLoading": false,
205-                            "usage": "encipherment"
206-                        }

ai tells that:
This confirms the config path: /usr/local/x-ui/bin/config.json — same file you already checked, and it had no finalmask. So it's confirmed: 3x-ui is not writing/persisting the salamander obfuscation into the actual Xray config, matching the known 3x-ui bug (#4382) we found earlier.

How to reproduce the problem

Set up inbound hysteria + salamander
Observe errors on client when connecting

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

dev+62f30390

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

ubuntu aarch

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 @skorphil on GitHub (Jul 2, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5745 ### Describe the bug Seems like salamander config not being saved. After i setup in ui, i see this: ``` sudo cat /usr/local/x-ui/bin/config.json | python3 -m json.tool | grep -n -A30 '"port": 46031' 176: "port": 46031, 177- "protocol": "hysteria", 178- "settings": { 179- "clients": [ 180- { 181- "auth": "y352u9j1r8j75rnn", 182- "email": "ukrbbcrzmk" 183- } 184- ], 185- "version": 2 186- }, 187- "streamSettings": { 188- "hysteriaSettings": { 189- "udpIdleTimeout": 60, 190- "version": 2 191- }, 192- "network": "hysteria", 193- "security": "tls", 194- "tlsSettings": { 195- "alpn": [ 196- "h3" 197- ], 198- "certificates": [ 199- { 200- "buildChain": false, 201- "certificateFile": "/root/cert/ip/fullchain.pem", 202- "keyFile": "/root/cert/ip/privkey.pem", 203- "ocspStapling": 0, 204- "oneTimeLoading": false, 205- "usage": "encipherment" 206- } ``` ai tells that: This confirms the config path: /usr/local/x-ui/bin/config.json — same file you already checked, and it had no finalmask. So it's confirmed: 3x-ui is not writing/persisting the salamander obfuscation into the actual Xray config, matching the known 3x-ui bug (#4382) we found earlier. ### How to reproduce the problem Set up inbound hysteria + salamander Observe errors on client when connecting ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version dev+62f30390 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system ubuntu aarch ### 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).
bsakaguchi 2026-10-31 20:36:24 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@skorphil commented on GitHub (Jul 2, 2026):

ok, seems to fix itself

<!-- gh-comment-id:4866298391 --> @skorphil commented on GitHub (Jul 2, 2026): ok, seems to fix itself
Author
Owner

@github-actions[bot] commented on GitHub (Jul 2, 2026):

Since this closed with "seems to fix itself," posting what the source confirms for the record, in case anyone else lands here with a similar report.

Config path check: In the current codebase, salamander for a Hysteria2 inbound is configured under Stream Settings → UDP Masks (not a dedicated "Obfs password" field). Adding a UDP Mask on a Hysteria inbound defaults its type to salamander (frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx), with a password field, and this serializes to streamSettings.finalmask.udp[0] = {type: "salamander", settings: {password: ...}} in the generated Xray config — not into streamSettings.hysteriaSettings. So the absence of a finalmask key in the pasted config.json snippet means no UDP Mask entry was present/saved on that inbound at the time it was dumped, rather than the value being silently dropped after being set; this block is only omitted when the mask list is empty (dropLegacyOptionalEmpties in frontend/src/lib/xray/inbound-form-adapter.ts).

On the "known bug (#4382)" reference: that report targeted a different, older UI path (a single Obfs password field mapping into hysteriaSettings) on 3x-ui v3.0.2. The current codebase uses the generic UDP Mask / finalmask model described above, so #4382 doesn't describe this code path and isn't confirmation of the same issue here.

On UDP-listener-hang bugs: the closed report in #5462 (salamander finalmask hanging the UDP listener after a malformed packet, same class as XTLS/Xray-core#6184) is already fixed upstream and pulled in — go.mod in this repo pins github.com/xtls/xray-core at a commit from 2026-06-27, after the 2026-06-17 upstream fix (XTLS/Xray-core#6331). That fix was already present in the exact build referenced here (dev+62f30390), so that's not a fit either.

If salamander stops persisting again, the most useful next data point would be the full streamSettings block for the inbound (from the panel's inbound JSON view or config.json) both right after saving and after an Xray restart, to see whether the finalmask.udp entry is present at save time and survives a restart.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4866742655 --> @github-actions[bot] commented on GitHub (Jul 2, 2026): Since this closed with "seems to fix itself," posting what the source confirms for the record, in case anyone else lands here with a similar report. **Config path check:** In the current codebase, salamander for a Hysteria2 inbound is configured under Stream Settings → UDP Masks (not a dedicated "Obfs password" field). Adding a UDP Mask on a Hysteria inbound defaults its type to `salamander` (`frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx`), with a `password` field, and this serializes to `streamSettings.finalmask.udp[0] = {type: "salamander", settings: {password: ...}}` in the generated Xray config — not into `streamSettings.hysteriaSettings`. So the absence of a `finalmask` key in the pasted `config.json` snippet means no UDP Mask entry was present/saved on that inbound at the time it was dumped, rather than the value being silently dropped after being set; this block is only omitted when the mask list is empty (`dropLegacyOptionalEmpties` in `frontend/src/lib/xray/inbound-form-adapter.ts`). **On the "known bug (#4382)" reference:** that report targeted a different, older UI path (a single `Obfs password` field mapping into `hysteriaSettings`) on 3x-ui v3.0.2. The current codebase uses the generic UDP Mask / `finalmask` model described above, so #4382 doesn't describe this code path and isn't confirmation of the same issue here. **On UDP-listener-hang bugs:** the closed report in #5462 (salamander finalmask hanging the UDP listener after a malformed packet, same class as XTLS/Xray-core#6184) is already fixed upstream and pulled in — `go.mod` in this repo pins `github.com/xtls/xray-core` at a commit from 2026-06-27, after the 2026-06-17 upstream fix (XTLS/Xray-core#6331). That fix was already present in the exact build referenced here (`dev+62f30390`), so that's not a fit either. If salamander stops persisting again, the most useful next data point would be the full `streamSettings` block for the inbound (from the panel's inbound JSON view or `config.json`) both right after saving and after an Xray restart, to see whether the `finalmask.udp` entry is present at save time and survives a restart. *This reply was generated automatically; a maintainer may follow up.*
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#3994
No description provided.