VPS forwarding to use difference place (socks5 UDP Associate support)
XProxy enables you to expose your Proxy, Socks5, or VPN services for remote access, even if your home network is restrictive.
There are multiple ways to accomplish this:
- Router Port Forwarding
- Tailscale VPN
- VPS Forwarding (The most reliable and professional option)
This guide will walk you through the process of VPS forwarding, the most commonly used method for securely exposing services.
What Is VPS Forwarding, and Why Should You Use It?
By connecting your local server to a VPS (Virtual Private Server), such as those provided by Amazon EC2, Vultr, Linode, or OVH, you can forward your services through the public IP of the VPS.
- Customers connect to your services via the VPS's public IP (e.g., 1.2.3.4), which acts as an intermediary between your local server and external users.
- XProxy securely tunnels traffic between your local server and external users.

Reasons to Use VPS Forwarding
- Your router does not support port forwarding.
- Your home internet connection has a slow upload speed (below 50 Mbps).
- You wish to conceal your home IP address when offering services.
- You require a static public IP (without the need for DDNS).
- You need full UDP support for Socks5 proxies (important for online gaming and certain applications).
When You May Not Need VPS Forwarding
- Your home router has a high upload speed (above 300 Mbps) and supports port forwarding.
- You wish to minimize VPS costs.
- Your VPS has a limited bandwidth plan that may not support high traffic.
Prerequisites
- A VPS running Ubuntu (most providers support this OS).
- Recommended VPS provider:
- OVH VPS – Offers unlimited bandwidth and high speeds (500 Mbps/1 Gbps).
- Ideally, choose a VPS near your physical location to ensure lower latency and better speed.
- VPS with high bandwidth (preferably 1 Gbps or more) is recommended for optimal performance.
Before You Begin: Essential Security Settings
To ensure the security and proper operation of your proxy services. Please follow these steps in the XProxy Dashboard and Proxy Settings:
- Dashboard User Authentication
- Enable dashboard authentication: Activates login protection for the management dashboard, safeguarding it from unauthorized access. Recommended when your dashboard is accessible from the internet.
- Force all API need basic authentication: Ensures all API requests require authentication, enhancing security for integrations and automation.
- Whitelist IP Authentication
- Enable IP authentication: Restricts access to your services by allowing only specified IP addresses or subnets. Currently, this option acts as an additional layer of protection to prevent external attacks on the service from outside the VPS. The username and password are still required for access.
- Force authentication in LAN connections: Requires authentication even for devices on the same local network. This is necessary to be enabled because the local server cannot always accurately identify the remote VPS IP address, which could otherwise make the server inaccessible.
- Proxy Authentication Settings
- Enable proxy authentication: Requires a username and password for all proxy connections, protecting your proxy endpoints from public misuse.
- Disable authentication cache: (Optional) Disables session caching for authentication, increasing security at the cost of slightly higher resource usage.
- Whitelist IP for all proxy: Only allows connections from listed IPs or subnets, further restricting access to your proxy services.
- Force authentication in LAN connections: As above, ensures LAN users must authenticate, preventing unauthorized internal usage. This is necessary to be enabled because the local server cannot always accurately identify the remote VPS IP address, which could otherwise make the server inaccessible.
All these options (Password authentication for all proxy, Whitelist IP, and Force LAN connection) must be enabled before proceeding with port forwarding.
Step-by-Step Guide: Setting Up VPS Forwarding
1. Prepare Your VPS
Before proceeding, ensure your VPS is fully updated. Run the following commands to ensure your system is up to date:
sudo apt update
sudo apt upgrade -y
This ensures that all software on your VPS is up-to-date with the latest security patches and improvements.
Once your VPS is updated, ensure you have root access to the server via SSH.
2. Open Firewall Ports
Ensure that the following port range is open on your VPS firewall: 80 to 65550.
To disable the firewall temporarily (if required):
systemctl disable ufw && systemctl stop ufw
If your firewall is blocking these ports, XProxy will not function properly.
3. Connect XProxy to Your VPS
Open the XProxy Dashboard → General Settings → Forwarding Ports.
Enter your VPS details:
- VPS IP Address
- SSH Port (usually 22)
- Username (root)
- Password
Click Save & Test to verify the connection.
If successful, the XProxy dashboard will refresh automatically.

4. Set Up Forwarding Rules
1. Network Isolation (SIM Upload)
- ✅ Enable if you wish to use each SIM card’s mobile network for forwarding, ensuring traffic is routed individually for each SIM.
- ❌ Disable to use your main WAN (router) for all forwarding.
Tip: Enable if the SIM card upload speed is faster than your WAN upload speed.
2. Enable UDP for Socks5
- ✅ Enables Socks5 UDP support, which is essential for gaming, VoIP, and protocols like QUIC and HTTP/3.
- ? Warning: Each UDP Socks5 connection uses approximately 40MB of RAM on the VPS.
3. Starting Relay Port
The Starting Relay Port is where XProxy begins allocating ports for forwarding. By default, XProxy will automatically select an available port.
For multiple services running on the same VPS, you can manually adjust this starting port (e.g., 65011).
Tip: Always choose a unique port number for each service to avoid conflicts.
4. Adjust and Manage Ports
Proper port management is essential for the smooth operation of your services, ensuring they are accessible without conflicts. XProxy allows you to adjust and manage ports to optimize your network's efficiency. Here's a deeper look at how you can configure the ports for your setup:
- Starting Relay Port: The "Starting Relay Port" sets the initial port number for forwarding traffic to your VPS. This port serves as the base for subsequent port allocations. If you're running multiple services on a single VPS, it’s important to increment the starting port number to prevent conflicts. For example, if your starting port is set to 65011, the next port for another service would automatically be 65021, and so on.
- Port Range: You can configure the range of ports used for forwarding traffic. XProxy provides flexibility to allocate specific ranges of ports for different services, ensuring that there is no overlap between them. This is particularly useful when running several proxy services or VPN servers on the same VPS.
- Adjusting Ports: In the event that you need to adjust the ports for specific services, simply modify the port number for each service manually. This is essential when expanding your network or adding new services. For example, you might need to change the ports if you're setting up different proxy or Socks5 services with distinct network configurations.
- Forwarding Services: Each individual service, such as a proxy server or VPN tunnel, can be enabled or disabled for forwarding through the XProxy interface. By selecting or deselecting the checkbox for each service, you have full control over which services are forwarded to external networks. This functionality helps you manage network traffic and allocate resources effectively.
- Port Conflicts: If two services attempt to use the same port, a conflict will occur, leading to disruptions in traffic forwarding. To prevent such conflicts, it's important to assign a unique port for each service. If necessary, adjust the "Starting Relay Port" and increment the subsequent ports by 10 (or another increment) to ensure there is no overlap.
Example: If you set your "Starting Relay Port" to 65011, the next available port will be 65021, and the following one will be 65031. This system allows you to efficiently allocate ports for multiple services without overlap or interference.

Monitoring & Troubleshooting
All active forwarding ports will appear in green. If there's an issue, the port will be marked red, making it easy to identify and troubleshoot problems.

Final Tips
- Always choose a high-performance VPS located close to your physical location for the best results.
- Ensure ports are properly opened and firewall settings are adjusted.
- If UDP traffic is heavy, consider upgrading your VPS’s RAM.
- Regularly monitor port status for potential issues.