Part 2, the noob guide on 3x-ui setup for Vless/Hysteria2 proxy services without CDN
Incomplete(I haven't finish writing this guide yet)
Continuing from my previous 3x-ui installation guide.
Creating Vless and Hysteria2 Proxy Inbounds and Clients with 3x-ui
This guide will only show two of proxy protocols that 3x-ui supports, vless and hysteria. For me, these two shows the best results in getting through China's GFW. These setups might not work in Russia as their DPI(deep packet inspections) is stricter than China and definitely not in Iran as they have switched from blacklist to whitelist, only IP addresses approved by the government will pass through.
I will first start with Hysteria2, as it's easy to setup with 3x-ui and I found it has the faster transfer rate compared to any of the Vless inbound setup.
Creating Hysteria2 Inbound and Client
Hysteria2 is not support by Cloudflare CDN as Hysteria2 doesn't use gpc nor websocket transport protocols. You should also have a SSL/TLS cert generated from the previous guide.
Create a Hysteria2 Inbound
- From the 3x-ui web control panel, select the
Inboundsmenu on the left panel and click on the[+Add Inbound]button in the main panel. - On the
Basictab, give a name for the inbound in theRemarkfield. - Change the
Protocolfield from default vless to hysteria. - The
Portnumber will default to a random port number. You can it to 443 or 8433. Personally, I went with 8443 as I used the port hopping feature of Hysteria2 and used 443 for vless. - Leave all the other fields to the default settings
- This step is optional. But if the GFW starts blocking your Hysteria2 traffic, you can enable Port Hopping.
- Click on the
Streamtab and Enable theQUIC Paramstoggle. - Enable the
UDP Hoptoggle. Leave the default port 20000-50000 forPort Hopand other settings.
- Click on the
- Click on the
Securitytab and forSNIenter the VPS hostname. For example, lax1.example.com. - Click the `[Set Cert from Panel] button. It should pull the private and private key files from the 3x-ui setup.
- Finally, click on the
[Create]button on the bottom.
Create a Client for Hysteria2/Vless Inbound
Starting version 3.x.x, creating a client has been split into its own separate instead of a sub-menu of the Inbound menu.
- From the 3x-ui web control panel, select the
Clientsmenu on the left panel and click on the `[+Add Client] button in the main panel. - In the
Basictab, under Attached Inbounds, either click on the[Select all]or manually select the inbound(s) from the drop down list.
You don't have to keep creating new clients for each new inbound you create. You can use a single client for multiple inbounds, if you’re the only one using those inbounds.
Skip to section on the export setting to proxy client app, if you're not planning to create a Vless Inbound.
Creating Vless Inbound without using Cloudflare CDN
Xray, which includes vless and other proxy protocol/transport/security, is being actively being updated. So new features like the XHTTP transport protocol have been added, replacing the use of the old websocket or just raw transport. So these Vless setups are only from my personal experience using ChinaNet(China Telecom) and China Mobile, going through the GFW of China, and connecting to VPSs in the US. There are older guides on using Reality with xtls-rprx-vision, but I will use Reality with the newer XHTTP.
Create a Vless/XHTTP/Reality Inbound.
XHTTP is a new transport protocol that has been added to replace the vision flow control used by Reality security protocol. You can read more about XHTTP here.
- From the 3x-ui web control panel, select the
Inboundsmenu on the left panel and click on the[+Add Inbound]button. - On the
Basictab, give a name for the inbound in theRemarkfield. - Leave the
Protocolfield on the default vless. - Change the random number for
Portto 443 or 8443 as explained in my Hysteria2 setup above. - Leave the rest of fields default on their settings and click on the
Streamtab and select XHTTP for theTransportsetting. - Click on the
Securitytab and select Reality for the security setting. - Next click on the
[Find Targets]button. By default it will scan for the well known domains that are not blocked by China. You can select the 1st domain listed as it has lowest ping latency to your VPS, so that domain will be used to mask the proxy's traffic. - But you should be able to find a more suitable domain that should be closer to your VPS.
- Instead put the CIDR range of the IPv4 address of your VPS. For example, if it's 172.25.251.186, type in 172.25.251.0/24.
- It might take a while as it tries to find some suitable candidates. If doesn’t find any, try a range next it, like 172.25.252.0/24.
- Hopefully it will find a domain under 20ms latency. Click on the
Usenext lowestFeasibledomain. - It will automatically add it to the
SNIfield.
- Click the
[Create]button as it should also automatically fill in all of the needed security fields like public and private keys.
Create a Client for Vless
This is pretty much the same as the one for Hysteria2 Inbound. But you don't have to create seperate clients for each inbounds. You can click the [Edit] icon in the Action sub-menu of the Clients menu and then click on [Select all] button to all or any newly created inbounds to the current client.
Export to a Vless/Hysteria2 Client App
In the Clients menu, under the Action sub-menu, click on the [QR Code] icon next to the client you want to export the config to your proxy client program. A QR code will appear on screen.
- Most computer proxy client programs will have
Importfeature that will scan QR code from the computer screen. - On a smartphone, you can scan the QR code within te proxy client app running on your phone.
- Above the QR code, next to the client name, you will see 2 icons, and if you hover over them, they will display
[Copy]and[Download Image].[Copy]will export a text config link to the computer's clipboard that you can either import into a proxy client running on the computer or you can save and send it to another device.[Download Image]will save an image of the QR code in PNG format, either send to another device or scan it later.- By clicking on the QR code itself will also export a copy of the text config to the clipboard.
- If you have multiple inbounds attached to a client, you can expand and collap the QR codes for each inbounds by click on
[>]and[v]arrow icons to see the other inbound QR codes.
Sing-box and proxy clients that use sing-box as their code base do not support XHTTP protocol as of writing of this guide. Only clients that are based on Xray-core will work. With NekoBox on Android(which uses sing-box), I get a Cloudflare error when I try to connect to a server using XHTTP. Try using [index#Client Apps|the recommended apps from the homepage].