Config VLESS Protocol with Advance Feature in sing-box
Introduction
VLESS + TCP + REALITY + XTLS + uTLS + XUDP is a very good combination. XUDP let VLESS supports FullCone NAT. Using REALITY instead of TLS can eliminate server-side TLS fingerprint characteristics, while still providing forward secrecy and rendering certificate chain attacks ineffective. Its security surpasses conventional TLS. It can point to other websites without the need to purchase a domain or configure a TLS server, making it more convenient. It achieves end-to-end genuine TLS presentation with a specified SNI to the middleman.
Get sing-box
sing-box Basic
sing-box uses JSON for configuration files.
|
|
You can get detailed documents here. I will not go through too much of them.
Server Side
Before start we need to generate a x25519 key pair for REALITY. To do that in sing-box just run:
|
|
You should get something like this:
|
|
Optionally, you can generate a short id for REALITY as well. By running this, you should get a 8 digit hex number:
|
|
You should get something like this:
|
|
Finally, you need to generate a UUID:
|
|
You should get something like this:
|
|
Now, let’s fill them into the right place and finish the config. If you want to save some time and do not want to dive too deep, you can refer this config:
|
|
I highly recommand you change:
name
uuid
server_name
server
server_port
private_key
short_id
to your own value, base on your own case.
Client Side
I want sing-box use TUN
as inbound, so we can archive global proxy. But you may run it as http/socks proxy as well. Anyhow, I will use TUN
as example.
You need to change these following filed into your own value:
server
server_port
uuid
server_name
public_key
short_id
make sure your value match the server-side information. Here is an example:
|
|
Install sing-box
You may ask “how can I run sing-box with aboving config?”. Well, you need install sing-box at first. You can find more information in the offical document.
In Debian 12
I run sing-box server side on a Linux server, the OS is Debian 12. I this way, I used the offical installing script for debian:
|
|
You can check installation by running:
|
|
It should return something like:
|
|
For Linux systems with systemd, usually the installation already includes a sing-box service, you can manage the service using the following command:
In Windows 11
My client is Windows 11, I choice managed installation with Chocolatey. To install Chocolatey, you need run an Administrator PowerShell with:
|
|
If you don’t see any errors, you are ready to use Chocolatey! Type choco
or choco -?
to check installation. Remember, this is a very simple instraction of Chocolatey, there are many other installation methods and options, please check offical site for more information.
Now, we can use Chocolatey to install sing-box:
|
|
You can check installation by running:
|
|
Run sing-box
There are no different between server-side and client-side sing-box program. Only different is the config file.
Before start, you should save your config into a JSON file. I will name them like: client.json
, server.json
. Then specify the config in your command, like:
|
|
You need to run sing-box both in client and server side. The output should be like:
|
|
Related Content
- Netcup VServer (ARM64) Benchmark and Review
- Create MCQs With ChatGPT in Scales
- Using CloudFlare Workers for Reverse Proxy
- For Yang Wenya - Wishing You Academic Success