惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
雷峰网
雷峰网
S
SegmentFault 最新的问题
博客园 - 【当耐特】
博客园_首页
量子位
爱范儿
爱范儿
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
V
V2EX
美团技术团队
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare Blog
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Ultimate 1-Minute Xray/3x-ui Setup: VLESS, Hysteria2, Cad...
Dmitry · 2026-05-28 · via DEV Community
Cover image for Ultimate 1-Minute Xray/3x-ui Setup: VLESS, Hysteria2, Caddy Self-Steal & Smart Outbounds in One Script

Dmitry

Setting up a secure internet circumvention gateway using Xray usually turns into a tedious chore. You have to install Docker, configure the 3x-ui web panel, generate TLS certificates, tweak Reality settings against active probing, and manually set up routing tables.

If you frequently cycle your VPS providers or manage servers for friends, doing this manually every time is a massive waste of time.

That’s why I created 3xui-fast-install — a lightweight, automated bash script that deploys a fully production-ready, security-hardened Xray node in under a minute.


What’s Under the Hood? 🛠️

This is NOT just a blank panel installation. The script sets up an optimized, batteries-included network ecosystem wrapped in Docker. Here is exactly what gets deployed and configured out of the box:

Component Description
3x-ui Panel Xray web management interface running on custom non-standard ports.
VLESS + Reality Industry-standard transport layer mimicking legitimate TLS handshakes (Port 443).
Hysteria 2 High-performance UDP-based protocol (Port 63000) optimized for unstable or mobile networks.
Caddy (Self-Steal) Acts as a TLS terminator on port 443, handling automated, legitimate Let's Encrypt certificates.
Cloudflare WARP Configured as a local SOCKS5 outbound proxy for specific fallback routing.
Opera Proxy & Tor Additional local SOCKS5 outbounds ready for geo-blocked services and .onion routing.
BBR & Security Automated TCP BBR congestion control activation, UFW firewall configuration, and Fail2ban protection.

Smart Server-Side Routing Architecture 🗺️

One of the highlights of this setup is how it handles outbound traffic directly inside Xray on the server. Instead of just passing everything blindly (direct), the backend follows strict routing rules:

  • Adblock & Malware: Automatically dropped (blocked) at the server level.
  • Domestic/RU Domains & GeoIP: Routed via Cloudflare WARP. Ideally, your clients should use local routing rules (like roscomvpn-routing) so domestic traffic never leaves their device. However, if a domestic packet does leak to your VPS, WARP intercepts it and routes it out, masking your actual VPS server IP address from domestic logs.
  • Streaming & Privacy: Popular global services (like Disney+ or Reddit) are routed via Opera Proxy, while .onion addresses go directly through the Tor outbound network.

⚠️ Note on Customization: The outbound routing rules listed above (such as Opera Proxy, Tor, or specific domain rules) are configured as examples to showcase the full capabilities of the script. You can easily modify, remove, or add your own custom routing parameters in the 3x-ui panel settings anytime after the installation is complete.


Prerequisites & Installation 🚀

The deployment process requires minimal preparation.

Requirements:

  1. A clean Ubuntu/Debian VPS.
  2. A registered domain name with an A-record already pointed to your VPS IP address.

The 1-Command Deployment:

Run the following command on your clean server root terminal:

git clone https://github.com/AppsGanin/3xui-fast-install 3xui-personal
cd 3xui-personal

DOMAIN=vpn.example.com bash deploy.sh 1.2.3.4

What happens next?

  • The script detects and installs Docker/Compose if missing.
  • It automatically generates unique, high-entropy credentials and secure ports for your 3x-ui panel dashboard.
  • It configures your firewall, opens only the necessary ports (22, 80, 443, 63000 UDP), and locks down the rest.

Once finished, the console will print your ready-to-use admin panel URL, username, and password.

Log in, create your client configs in the web UI, and you are good to go!


Conclusion & Open Source

This setup cuts down deployment time from an hour of manual configuration to literally 60 seconds, while maintaining best-practice security baselines out-of-the-box.

The project is completely open-source. Feel free to review the bash script logic, submit issues, or contribute improvements.

⭐️ Check out the repository on GitHub: 👉 https://github.com/AppsGanin/3xui-fast-install