Introduction
In this article, we will discuss how to configure WARP using WireGuard VPS with the 3X-UI panel on Ubuntu 22.04. We will use VLESS (Reality) proxy VPS server to route traffic through WARP.
Prerequisites
Before we begin, ensure the following prerequisites are met:
- A WireGuard VPS running Ubuntu 22.04
- 3X-UI panel installed on the VPS
- Basic knowledge of Linux command line and networking
Installing WireGuard
To install WireGuard on Ubuntu 22.04, follow these steps:
- Update package index:
- Install WireGuard:
sudo apt update
sudo apt install wireguard
Configuring WireGuard
Create a new WireGuard configuration file:
sudo nano /etc/wireguard/wg0.conf
Add the following content to the file:
[Interface] Address = 10.0.0.1/24 PrivateKey =ListenPort = 51820 PostUp = iptables -A FORWARD -i %i -j ACCEPT all -j LOG --log-prefix "WG: " PostDown = iptables -D FORWARD -i %i -j ACCEPT all -j LOG --log-prefix "WG: " [Peer] PublicKey =
AllowedIPs = 10.0.0.2/32 Endpoint =
Replace
Starting WireGuard
Start the WireGuard interface:
sudo wg-quick up wg0
Check the status of the WireGuard interface:
sudo wg show
Installing 3X-UI
To install 3X-UI, follow these steps:
- Add the repository:
- Install 3X-UI:
curl -s https://install.3x-ui.net/install.sh | sudo bash
sudo apt install 3x-ui
Configuring 3X-UI
Log in to the 3X-UI panel:
https://:8080
Create a new VPS:
- Go to "VPS" tab
- Click "Add" button
- Fill in the required details: OS = Ubuntu 22.04, Server IP =
, Hostname = , Root Password = - Click "Create" button
Installing VLESS
To install VLESS, follow these steps:
- Install dependencies:
- Clone VLESS repository:
- Install VLESS:
- Create a new VLESS configuration file:
- Add the following content to the config.json file:
sudo apt install git make gcc g++ libmnl-dev
git clone https://github.com/v2ray/v2ray-core.git
cd v2ray-core && make
cd .. && mkdir vless && touch vless/config.json
{
"log": {
"access": "/var/log/vless/access.log",
"error": "/var/log/vless/error.log"
},
"server": {
"listen": "0.0.0.0:8080",
"port": 8080,
"protocol": "vless",
"security": {
"encryption": "aes-128-gcm",
"cipher": "chacha20-ietf-poly1305"
},
"network": {
"server": "0.0.0.0",
"port": 8443,
"host": "",
"cert": "/etc/letsencrypt/live//fullchain.pem",
"key": "/etc/letsencrypt/live//privkey.pem"
},
"routing": {
"strategy": "weighted",
"weight": {
"server1": 1,
"server2": 2
}
},
"stream": {
"enable": false
},
"dns": {
"server": ["8.8.8.8", "8.8.4.4"]
},
"misc": {
"keepalive": 300,
"idle_timeout": 300,
"max_connection": 500,
"timeout": 60
}
}
Replace
Starting VLESS
Start VLESS:
cd vless && nohup java -jar v2ray-core-java.jar config.json > vless.log 2>&1 &
Configuring WARP Proxy
To configure WARP proxy, follow these steps:
- Log in to the 3X-UI panel:
- Go to "Apps" tab
- Click "Install" button under "Warp Proxy"
- Fill in the required details: Interface = wg0, Server IP =
, Port = 8080, Certificate = , Key = - Click "Install" button
https://:8080
Testing Configuration
Test the configuration by accessing a website through the WARP proxy:
curl -x socks5://localhost:9050 https://google.com
Conclusion
In this article, we discussed how to configure WARP using WireGuard VPS with the 3X-UI panel on Ubuntu 22.04. We used VLESS (Reality) proxy VPS server to route traffic through WARP. By following the steps outlined in this article, you should be able to set up a secure and fast VPN connection.