mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #2342] Fallback (vles-tls) does not interact with the nginx server. #1611
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#1611
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @anvar68 on GitHub (Jun 3, 2024).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2342
Going to the address https://xxxxxxx.freemyip.com/ in the browser ends with the error message PR_END_OF_FILE_ERROR.
Nginx server - 127.0.0.1:8080
сonfig.json - fallbacks block:
"fallbacks": [
{
"alpn": "",
"dest": "@vless-ws",
"name": "",
"path": "/vlws",
"xver": 0
},
{
"alpn": "",
"dest": "8080",
"name": "",
"path": "",
"xver": 0
}
]
What settings are missing?
With similar settings, pure xray - https://github.com/XTLS/Xray-install works correctly.
P.S. Sorry for my English - machine translation.
@alireza0 commented on GitHub (Jun 3, 2024):
Xver should be 1 or 2 to send the headers. Otherwise, nginx could not find the headers in proxy.
Same for first fallback toward another inbound.
You should enable proxy_protocol in next inbound as well.
@anvar68 commented on GitHub (Jun 3, 2024):
Thank you for your time.


No xVer combinations produce results (1:1, 2:2, 1:2, 2:1). Enabling and disabling proxy_protocol has no effect.
For the experiment, other inbounds are disabled.
Maybe there are other errors in the settings?
@alireza0 commented on GitHub (Jun 3, 2024):
Sorry, but it is also wrong!
In inbound with fallback you should not enable proxy_protocol.
You should disable it here and enable it in inbound which listens on
@vless-wssocket.The xVer is very important if you want to pass the header. Just set it to 1 for both fallback options.
@anvar68 commented on GitHub (Jun 3, 2024):
"You should disable it here and enable it in inbound which listens on @vless-ws socket."
How can this be done, and where is this setting located? In the settings, inbound proxy_protocol is not mentioned anywhere else.
@alireza0 commented on GitHub (Jun 3, 2024):
Follow the example here
@anvar68 commented on GitHub (Jun 4, 2024):
Thank you, I have already seen this page and have not been able to configure it yet. That's why I asked the question here.
Initially the question was different.
In the ngnix - xtls working bundle (installed from https://github.com/XTLS/Xray-install) fallback worked.
Without changing ngnix settings, xtls was replaced with 3x-ui and fallback stopped working.
It turns out that the 3X-ui panel lacks the ability to configure correctly.
Okay, I'll look into it further.
@anvar68 commented on GitHub (Jun 4, 2024):
Settings
VLESS-TCP-TLS
VLESS-TCP-TLS-proxy protocol
I do not work
@alireza0 commented on GitHub (Jun 10, 2024):
If it doesn't work, you did not follow the whole configuration.
You should have two inbounds:
Then client will use first inbound port to connect and fallback will pass it to 2nd inbound. TLS will be handled by 1st inbound.
For other fallbacks that you want to handle it by nginx, you can use following config:

In x-ui's fallback inbound:
In nginx you can answer requests by a json. Configuration could be like this:
@EryX0 commented on GitHub (Jun 14, 2024):
thanks for the detailed explanation and sorry to jump in to the issue like this.
could this method be used to give a user with 1 uuid, multiple inbounds ? for example Cloudflare CDN, tunnel, etc?
trying to achieve this :
if user uses whichever of these configurations, its volume should be subtracted unified with other configurations.
@alireza0 commented on GitHub (Jun 14, 2024):
In this structure it is not possible yet to have one client in several inbounds. But using
external proxyconfiguration you can define several server Name/IP and port which points to a same inbound at the end. Then you can use other proxies like CF to create multiple links@EryX0 commented on GitHub (Jun 14, 2024):
but we can't give out multiple connection configs with various protocols to users right?
for example if we create the inbound as Vless ws (or HttpUpgrade), we can't give out tcp reality or tcp tunnel configuration to users? we only can use cf as external proxy CDN to give out the vless ws configuration with multiple IPs.