[GH-ISSUE #4767] [Bug]: Outbound link parsing #3306

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

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

Describe the bug

Problem with importing vless link generated by 3X-UI (both 3.2.5)
vless + xhttp + encription

vless://xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx@server.org:443?encryption=somedata&extra=someextra&host=server.org&mode=auto&path=somepath&security=tls&type=xhttp&x_padding_bytes=100-1000#main

encription field not parsed, works after manual pasting in UI

How to reproduce the problem

  1. Generate client link for inbound with encription
  2. Create new outbound by importing link
  3. Outbound doesn't work

Expected behavior

Pull link pasring include encription

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.2.5

Xray-core version

No response

How did you install 3x-ui?

Docker / Docker Compose

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

Xray config generation

Browser (only if it is a UI bug)

Vivaldi 8.0

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 @mrekin on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4767 ### Describe the bug Problem with importing vless link generated by 3X-UI (both 3.2.5) vless + xhttp + encription `vless://xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx@server.org:443?encryption=somedata&extra=someextra&host=server.org&mode=auto&path=somepath&security=tls&type=xhttp&x_padding_bytes=100-1000#main` encription field not parsed, works after manual pasting in UI ### How to reproduce the problem 1. Generate client link for inbound with encription 2. Create new outbound by importing link 3. Outbound doesn't work ### Expected behavior Pull link pasring include encription ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.5 ### Xray-core version _No response_ ### How did you install 3x-ui? Docker / Docker Compose ### Operating system Ubuntu 24.04 ### Which parts of the panel are affected? Xray config generation ### Browser (only if it is a UI bug) Vivaldi 8.0 ### 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:31:30 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

Thanks for the clear report! This is a confirmed code-level bug.

Root cause: In frontend/src/lib/xray/outbound-form-adapter.ts at line 126, the encryption field for VLESS outbounds is hardcoded to always output 'none':

// current (buggy)
encryption: (encryption === 'none' ? 'none' : 'none') as 'none',

Both branches of the ternary return 'none', so even though the link parser correctly reads encryption=somedata from the URL query string (in outbound-link-parser.ts), the value is silently discarded when the parsed data is mapped to the form state.

Fix: The line should pass through the actual parsed value, e.g.:

encryption: encryption as 'none',

(VLESS encryption is typed as 'none' in most contexts, but the raw string value from the link should still be forwarded rather than dropped.)

A PR fixing this line would be very welcome — this is a well-contained, isolated change.

<!-- gh-comment-id:4593248901 --> @github-actions[bot] commented on GitHub (Jun 1, 2026): Thanks for the clear report\! This is a confirmed code-level bug. **Root cause:** In `frontend/src/lib/xray/outbound-form-adapter.ts` at line 126, the `encryption` field for VLESS outbounds is hardcoded to always output `'none'`: ```typescript // current (buggy) encryption: (encryption === 'none' ? 'none' : 'none') as 'none', ``` Both branches of the ternary return `'none'`, so even though the link parser correctly reads `encryption=somedata` from the URL query string (in `outbound-link-parser.ts`), the value is silently discarded when the parsed data is mapped to the form state. **Fix:** The line should pass through the actual parsed value, e.g.: ```typescript encryption: encryption as 'none', ``` (VLESS encryption is typed as `'none'` in most contexts, but the raw string value from the link should still be forwarded rather than dropped.) A PR fixing this line would be very welcome — this is a well-contained, isolated change.
Author
Owner

@mrekin commented on GitHub (Jun 1, 2026):

Same as #4754 (missed while search similar bugs..)

<!-- gh-comment-id:4593525952 --> @mrekin commented on GitHub (Jun 1, 2026): Same as #4754 (missed while search similar bugs..)
Author
Owner

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

fixed
13c04bb982

<!-- gh-comment-id:4594139984 --> @MHSanaei commented on GitHub (Jun 1, 2026): fixed 13c04bb982f378883383de740a8974291448e21c
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#3306
No description provided.