Back to Home

AI skills for Xray VLESS VPN: deployment

The article describes a skill for automated deployment of Xray VLESS VPN with XHTTP on Ubuntu VPS. Uses Docker, nginx, ufw for security. Suitable for developers who know SSH.

Deploy Xray VPN with AI skill in 10 min
Advertisement 728x90

Automating Xray VLESS VPN Deployment with AI Skills

Deploying a VPN based on Xray VLESS with XHTTP transport requires precise configuration of numerous parameters: ports, transport protocol, firewall, SSL certificates. Configuration errors lead to non-functionality or vulnerabilities. Standard AI models like ChatGPT Codex or Claude generate instructions but often overlook nuances—for example, using outdated SplitHTTP instead of XHTTP or leaving 3X UI panel ports open.

In a real-world scenario on a fresh VPS, setup takes 2 hours: 40 minutes on architecture, 30 minutes on installation via SSH, 20 minutes on debugging, 30 minutes on polishing. Without expertise, the result is unreliable: traffic leaks or connections are unstable.

Skills as a Tool for Expert Automation

Skills are structured prompts that encapsulate expertise in a specific domain. They emerged in the second half of 2025 and are integrated into Claude, Codex, Cursor, Manus. An expert encodes a sequence of steps, tested for errors, into a skill, minimizing manual input.

Google AdInline article slot

Process for creating a skill:

  • Collect logs of successful deployment in an AI chat.
  • Request: "Compile everything into a ready-to-use skill for setting up Xray Vless with XHTTP."
  • Iteratively test (5–7 runs), noting differences: "Update the skill to avoid this issue."

The result is a reproducible tool for middle/senior developers who know SSH/Docker but not the nuances of Xray.

VPN Architecture from a Skill

The skill deploys a stack:

Google AdInline article slot
  • Base OS: Ubuntu 24.04 on VPS (300–700 ₽/month).
  • Transport: nginx + Let's Encrypt HTTPS → Xray in Docker (3X UI).
  • Protocol: VLESS + XHTTP (path with unique prefix, alpn=h2).
  • Security: ufw blocks all ports except 22/80/443; 3X UI panel accessible only via SSH tunnel.
  • DNS: domain (.com/.net) A-record pointing to VPS IP.

Client link is generated automatically:

vless://[email protected]:443?encryption=none&security=tls&sni=your-domain.example.com&host=your-domain.example.com&alpn=h2&type=xhttp&path=%2Fxhttp-6dfa1950ap406abq#vless-xhttp-tls

Clients: Shadowrocket (iOS/macOS), Hiddify (cross-platform).

Deployment Steps

  • Purchase VPS (Ubuntu 24.04), domain; set up DNS A-record.
  • Install the skill in your AI agent: "Install this skill [GitHub repository]."
  • Invoke: "$3x-ui-vps, set up VPN on my VPS."
  • Enter parameters:

- SSH target: [email protected] (preferably key, not password).

Google AdInline article slot

- Domain: your-domain.example.com.

- Panel Username/Password.

- ACME Email (for cert).

  • AI will perform installation, request confirmations; output vless link.

Support: macOS/Linux. For Windows—request adaptation.

Technical Implementation of the Skill

The skill uses curl/Python scripts from SKILL.md for determinism:

  • Installation: Docker, ufw, nginx, acme.sh.
  • Firewall: ufw allow 22,80,443; ufw enable.
  • 3X UI in Docker; inbound VLESS+XHTTP.
  • Nginx config: proxy_pass to container, HTTPS-redirect.
  • Client generation; port checks (ss -tuln).

Additionally: scripts for new clients, SSH tunnel to panel.

# Example port check after setup
ufw status verbose
ss -tuln | grep :443
curl -I https://your-domain.example.com

Key Points

  • XHTTP vs Reality: Nginx+domains simplify TLS, no manual Reality setup.
  • Security: Only 22/80/443 open; panel passwords not exposed to network.
  • Reproducibility: Scripts > manual commands; idempotent.
  • Limitations: Clean Ubuntu 24.04; domain ready; macOS/Linux host.
  • Alternatives: Ansible/NixOS for advanced scenarios (stateful config).

Scaling and Customizations

After basic deployment, add inbounds to 3X UI manually (SSH tunnel). For multiple devices, generate new clients via the skill. Updates: separate command in the skill.

Skills scale expertise: basic tasks—free, complex—personalization. AI is effective with clear requirements and debugging tools (SSH, logs).

— Editorial Team

Advertisement 728x90

Read Next