V2Ray and ShadowsocksR (SSR) are popular tools for bypassing internet restrictions and enhancing online privacy. With Hosteons’ VPS, you can easily set up your own private proxy server using V2Ray or SSR. This tutorial will guide you through the installation and configuration process step by step.
Prerequisites
Before you begin, ensure you have:
- A VPS: Hosteons provides reliable VPS solutions with root access.
- Linux OS: Ubuntu 20.04 or Debian 11 are recommended.
- Root Access: Administrative privileges on your VPS.
Step 1: Update Your VPS
Start by updating your system to ensure all packages are up to date:
sudo apt update && sudo apt upgrade -y
Step 2: Install V2Ray
- Download the official V2Ray installation script:
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
- Start and enable V2Ray:
sudo systemctl start v2ray
sudo systemctl enable v2ray
- Confirm that V2Ray is running:
sudo systemctl status v2ray
Step 3: Configure V2Ray
- Open the V2Ray configuration file:
sudo nano /usr/local/etc/v2ray/config.json
- Add the following basic configuration:
{
"inbounds": [
{
"port": 1080,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "YOUR_UUID",
"alterId": 64
}
]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
- Replace
YOUR_UUID
with a unique UUID. Generate one using:
uuidgen
- Save and exit the file.
- Restart V2Ray to apply the changes:
sudo systemctl restart v2ray
Step 4: Install ShadowsocksR (SSR)
If you prefer SSR over V2Ray, follow these steps:
- Clone the SSR repository:
git clone https://github.com/shadowsocksrr/shadowsocksr.git
- Navigate to the SSR directory:
cd shadowsocksr
- Run the setup script:
bash setup_cymysql.sh
- Configure SSR by editing the configuration file:
nano user-config.json
Add the following settings:
{
"server": "0.0.0.0",
"server_port": 8388,
"password": "YOUR_PASSWORD",
"method": "aes-256-cfb",
"protocol": "auth_sha1_v4",
"obfs": "tls1.2_ticket_auth",
"timeout": 300
}
- Replace
YOUR_PASSWORD
with a strong password.
- Start the SSR server:
bash run.sh
Step 5: Open Firewall Ports
Allow traffic on the necessary ports for your proxy server:
sudo ufw allow 1080/tcp
sudo ufw allow 8388/tcp
sudo ufw enable
Step 6: Test Your Proxy Server
- Download and install a V2Ray or SSR client on your device.
- Configure the client with the server details, including IP address, port, and UUID or password.
- Connect to the proxy server and verify your connection.
Conclusion
Setting up V2Ray or ShadowsocksR on a VPS from Hosteons enhances your online privacy and allows you to bypass internet restrictions. With this guide, you can deploy your own secure and private proxy server in minutes. If you encounter any issues, Hosteons’ support team is available to assist you.