Communitygithub.com

Xray – Proxy-Plattform (VLESS, VMess, Trojan, Shadowsocks)

Bereitstellung und Konfiguration von Xray-Core Proxy-Servern. Deckt VLESS, VMess, Trojan, Shadowsocks, Reality, TLS, Routing, Multi-User, CDN sowie Client-Konfiguration ab.

Was ist Xray – Proxy-Plattform (VLESS, VMess, Trojan, Shadowsocks)?

Dieser Skill ermöglicht die vollständige Bereitstellung und Konfiguration von Xray-Core, einer fortschrittlichen Proxy-Plattform, die moderne Protokolle wie VLESS, VMess, Trojan und Shadowsocks mit Transporten wie Reality, XTLS-Vision, WebSocket, gRPC und HTTP/2 unterstützt. Er ist ideal für DevOps-Entwickler und Systemadministratoren, die eine sichere, umgehungsresistente Proxy-Infrastruktur aufbauen möchten. Der Skill unterstützt die Installation über das offizielle Skript, die Erstellung von VLESS+Reality-Konfigurationen (die sicherste und schwer zu erkennende Methode), TLS/WebSocket-Setups für CDN-Integration (z. B. Cloudflare), sowie die Verwaltung mehrerer Benutzer mit Verkehrsstatistiken und Laufzeitänderungen. Er enthält Routing-Regeln, Firewall-Konfiguration, Überwachung mit systemctl und journalctl, und Anwendungsbeispiele für kleine Teams und CDN-basierte Bereitstellungen. Der Skill arbeitet auf Linux (getestet auf Debian 12) und nutzt die Xray-API für dynamische Benutzerverwaltung.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/TerminalSkills/skills/tree/HEAD/skills/xray

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Xray

Überblick

Bereitstellung und Konfiguration von Xray-Core – der fortschrittlichen Proxy-Plattform, die VLESS, VMess, Trojan und Shadowsocks mit modernen Transporten wie Reality, XTLS-Vision, WebSocket, gRPC und HTTP/2 unterstützt. Dieser Skill umfasst Server-Bereitstellung, Protokollauswahl, TLS/Reality-Konfiguration, Traffic-Routing, Multi-User-Verwaltung, CDN-Integration, Client-Konfiguration und Überwachung.

Anleitung

Schritt 1: Installation

bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install
xray version
# Binary: /usr/local/bin/xray
# Config: /usr/local/etc/xray/config.json

# UUID und X25519-Schlüssel generieren
xray uuid
xray x25519   # Privat- + öffentlicher Schlüssel für Reality

Schritt 2: VLESS + Reality (Empfohlen)

Die sicherste Konfiguration. Reality imitiert den TLS-Handshake einer echten HTTPS-Webseite und benötigt weder eine Domain noch ein TLS-Zertifikat.

Server-Konfiguration (/usr/local/etc/xray/config.json):

{
  "log": { "loglevel": "warning" },
  "inbounds": [{
    "listen": "0.0.0.0",
    "port": 443,
    "protocol": "vless",
    "settings": {
      "clients": [
        { "id": "YOUR-UUID", "flow": "xtls-rprx-vision", "email": "user1@proxy" }
      ],
      "decryption": "none"
    },
    "streamSettings": {
      "network": "tcp",
      "security": "reality",
      "realitySettings": {
        "dest": "www.microsoft.com:443",
        "serverNames": ["www.microsoft.com", "microsoft.com"],
        "privateKey": "YOUR-PRIVATE-KEY",
        "shortIds": ["", "0123456789abcdef"]
      }
    },
    "sniffing": { "enabled": true, "destOverride": ["http", "tls", "quic"] }
  }],
  "outbounds": [
    { "protocol": "freedom", "tag": "direct" },
    { "protocol": "blackhole", "tag": "block" }
  ],
  "routing": {
    "rules": [{ "type": "field", "ip": ["geoip:private"], "outboundTag": "block" }]
  }
}

Client-Share-Link:

vless://UUID@SERVER_IP:443?encryption=none&flow=xtls-rprx-vision&security=reality&sni=www.microsoft.com&fp=chrome&pbk=PUBLIC_KEY&sid=0123456789abcdef&type=tcp#MyProxy
systemctl enable --now xray

Schritt 3: VLESS + WebSocket + TLS (CDN-kompatibel)

Zur Weiterleitung durch das Cloudflare-CDN, um die Server-IP zu verbergen. Erfordert eine Domain mit Cloudflare-Proxy und ein TLS-Zertifikat.

apt install -y certbot
certbot certonly --standalone -d proxy.yourdomain.com
{
  "inbounds": [
    {
      "port": 443, "protocol": "vless",
      "settings": {
        "clients": [{ "id": "YOUR-UUID" }],
        "decryption": "none",
        "fallbacks": [
          { "dest": 8080 },
          { "path": "/ws-path", "dest": 8443, "xver": 1 }
        ]
      },
      "streamSettings": {
        "network": "tcp", "security": "tls",
        "tlsSettings": {
          "certificates": [{
            "certificateFile": "/etc/letsencrypt/live/proxy.yourdomain.com/fullchain.pem",
            "keyFile": "/etc/letsencrypt/live/proxy.yourdomain.com/privkey.pem"
          }]
        }
      }
    },
    {
      "listen": "127.0.0.1", "port": 8443, "protocol": "vless",
      "settings": { "clients": [{ "id": "YOUR-UUID" }], "decryption": "none" },
      "streamSettings": { "network": "ws", "wsSettings": { "path": "/ws-path" } }
    }
  ],
  "outbounds": [{ "protocol": "freedom", "tag": "direct" }]
}

Richte nginx auf Port 8080 als Fallback ein, und in Cloudflare: SSL/TLS Voll (Streng), WebSockets EIN.

Schritt 4: Trojan & Shadowsocks

Trojan (sieht aus wie normales HTTPS):

{
  "inbounds": [{
    "port": 443, "protocol": "trojan",
    "settings": {
      "clients": [{ "password": "your-strong-password", "email": "user1@trojan" }],
      "fallbacks": [{ "dest": 8080 }]
    },
    "streamSettings": {
      "network": "tcp", "security": "tls",
      "tlsSettings": { "certificates": [{ "certificateFile": "...", "keyFile": "..." }] }
    }
  }]
}

Shadowsocks 2022 (moderne AEAD-Chiffren):

{
  "inbounds": [{
    "port": 8388, "protocol": "shadowsocks",
    "settings": { "method": "2022-blake3-aes-128-gcm", "password": "BASE64_KEY", "network": "tcp,udp" }
  }]
}

Schlüssel generieren: openssl rand -base64 16 (oder -base64 32 für aes-256)

Schritt 5: Multi-User-Verwaltung

"clients": [
  { "id": "uuid-1", "email": "alice@proxy", "flow": "xtls-rprx-vision" },
  { "id": "uuid-2", "email": "bob@proxy", "flow": "xtls-rprx-vision" },
  { "id": "uuid-3", "email": "carol@proxy", "flow": "xtls-rprx-vision" }
]

Pro-Benutzer-Traffic-Statistiken – Statistik-API aktivieren:

{
  "stats": {},
  "policy": {
    "levels": { "0": { "statsUserUplink": true, "statsUserDownlink": true } },
    "system": { "statsInboundUplink": true, "statsInboundDownlink": true }
  },
  "api": { "tag": "api", "services": ["StatsService", "HandlerService"] },
  "inbounds": [
    { "listen": "127.0.0.1", "port": 10085, "protocol": "dokodemo-door",
      "settings": { "address": "127.0.0.1" }, "tag": "api" }
  ],
  "routing": { "rules": [{ "type": "field", "inboundTag": ["api"], "outboundTag": "api" }] }
}

Benutzer zur Laufzeit abfragen und verwalten:

xray api stats --server=127.0.0.1:10085 -name "user>>>alice@proxy>>>traffic>>>uplink"
xray api adi --server=127.0.0.1:10085 --inbound-tag proxy --id "new-uuid" --email "newuser@proxy"
xray api rmi --server=127.0.0.1:10085 --inbound-tag proxy --email "olduser@proxy"

Schritt 6: Routing-Regeln und Überwachung

Nach Domain/IP/Geo routen:

{
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      { "type": "field", "domain": ["geosite:category-ads-all"], "outboundTag": "block" },
      { "type": "field", "ip": ["geoip:private"], "outboundTag": "block" },
      { "type": "field", "network": "tcp,udp", "outboundTag": "proxy" }
    ]
  }
}

Überwachung:

systemctl status xray
journalctl -u xray -f
grep "accepted" /var/log/xray/access.log | awk '{print $3}' | sort | uniq -c | sort -rn

Firewall:

ufw allow 443/tcp && ufw allow 443/udp && ufw enable

Beispiele

Beispiel 1: VLESS + Reality-Proxy-Server für ein kleines Team bereitstellen

Benutzer-Eingabe: „Richte Xray auf unserem Debian 12 VPS unter 198.51.100.30 mit VLESS und Reality-Transport ein. Erstelle Konten für alice, bob und carol. Verwende microsoft.com als Reality-Ziel und gib mir die Share-Links für v2rayNG.“

Der Agent installiert Xray über das offizielle Skript, generiert eine UUID für jeden Benutzer und ein X25519-Schlüsselpaar, erstellt eine config.json mit einem VLESS-Inbound auf Port 443 mit Reality-Einstellungen für www.microsoft.com, fügt drei Client-Einträge mit xtls-rprx-vision-Flow hinzu, ergänzt Routing-Regeln zum Blockieren privater IPs, aktiviert und startet den xray-Dienst, öffnet Port 443 in der Firewall und gibt drei vless://-Share-Links mit Server-IP, öffentlichem Schlüssel, Short-ID und SNI aus.

Beispiel 2: CDN-gestützten VLESS-Proxy mit Cloudflare und einer Fallback-Website einrichten

Benutzer-Eingabe: „Ich habe proxy.mysite.com, das über Cloudflare auf unseren Server zeigt. Konfiguriere Xray mit VLESS über WebSocket auf /secret-ws, damit der Traffic durch das Cloudflare-CDN läuft. Nicht-Proxy-Besucher sollen eine normale nginx-Website sehen.“

Der Agent besorgt ein Let's-Encrypt-Zertifikat mit certbot, konfiguriert Xray mit einem Haupt-VLESS+TLS-Inbound auf Port 443 mit einem Fallback auf nginx auf Port 8080, fügt einen zweiten VLESS+WebSocket-Inbound auf localhost:8443 mit Pfad /secret-ws hinzu, richtet nginx für eine statische Seite auf Port 8080 ein, überprüft, ob Cloudflare SSL auf Voll (Streng) und WebSockets aktiviert ist, und gibt die Client-Verbindungszeichenfolge mit WebSocket-Pfad und Cloudflare-SNI aus.

Richtlinien

  • Für neue Bereitstellungen immer VLESS + Reality verwenden; es benötigt weder eine Domain noch ein Zertifikat und ist das am schwersten zu erkennende und zu blockierende Protokoll
  • Setze "alterId": 0 für alle VMess-Benutzer, um die obligatorische AEAD-Verschlüsselung zu erzwingen; ein von null verschiedener alterId verwendet das alte, weniger sichere Legacy-Format
  • Blockiere den Zugriff auf private IP-Bereiche (geoip:private) in den Routing-Regeln, um zu verhindern, dass der Proxy für SSRF-Angriffe auf interne Dienste verwendet wird
  • Nutze die xray api-Befehle, um Benutzer zur Laufzeit hinzuzufügen und zu entfernen, ohne den Dienst neu zu starten; so werden aktive Nutzer nicht getrennt
  • Wähle dest und serverNames von einer beliebten Website (microsoft.com, apple.com), die auf einer anderen IP als deinem Server gehostet wird, und stelle sicher, dass diese Site TLS 1.3 und HTTP/2 unterstützt
  • Aktiviere die Statistik-API mit benutzerspezifischer Nachverfolgung (statsUserUplink/statsUserDownlink), um die Bandbreitennutzung zu überwachen und Missbrauch zu erkennen

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

TerminalSkills/skills

>- Run GitHub Actions locally with act. Use when a user asks to test GitHub Actions workflows locally, debug CI pipelines without pushing, or run workflows offline.

TerminalSkills/skills

>- You are an expert in AG2 (formerly AutoGen), the open-source multi-agent conversation framework. You help developers build systems where multiple AI agents collaborate through structured conversations — with tool use, human-in-the-loop, code execution, group chat orchestration, and nested conversations — for complex tasks like software development, research, and data analysis.

TerminalSkills/skills

>- Generate short-form videos with AI — script writing, text-to-speech narration, stock footage selection, subtitle generation, and video assembly. Use when: creating TikTok/YouTube Shorts/Reels content, automating video production, building content pipelines.

TerminalSkills/skills

>- Animate 3D objects and characters in Blender with Python. Use when the user wants to keyframe properties, create armatures and rigs, set up IK/FK chains, animate shape keys for facial animation, edit F-Curves, use the NLA editor to blend actions, add drivers for expression-based animation, or script any animation workflow in Blender.

TerminalSkills/skills

>- Automate motion capture and tracking workflows in Blender with Python. Use when the user wants to import BVH or FBX mocap data, retarget motion to armatures, track camera or object motion from video, solve camera motion, clean up motion capture data, or script any tracking pipeline in Blender.

TerminalSkills/skills

>- You are an expert in Bolt.new by StackBlitz, the AI-powered full-stack development environment that runs entirely in the browser. You help developers go from idea to deployed app in minutes using natural language prompts — Bolt generates complete applications with frontend, backend, database, and deployment, all running in a WebContainer without local setup.

TerminalSkills/skills

>- Assists with using Bun as an all-in-one JavaScript/TypeScript runtime, package manager, bundler, and test runner. Use when building HTTP servers, managing packages, running tests, or migrating from Node.js. Trigger words: bun, bun serve, bun install, bun test, bun build, javascript runtime, bun runtime.

TerminalSkills/skills

>- Self-host customer support with Chatwoot. Use when a user asks to set up open-source customer support, add live chat without SaaS costs, build a multi-channel inbox, or deploy a free Intercom alternative.

TerminalSkills/skills

>- You are an expert in Chi, the lightweight, idiomatic Go HTTP router built on `net/http`. You help developers build composable HTTP services using Chi's middleware stack, route groups, URL parameters, sub-routers, and context-based request scoping — providing Express-like ergonomics while staying 100% compatible with Go's standard library.

TerminalSkills/skills

When the user wants to edit, review, or improve existing marketing copy. Also use when the user mentions 'edit this copy,' 'review my copy,' 'copy feedback,' 'proofread,' 'polish this,' 'make this better,' or 'copy sweep.' This skill provides a systematic approach to editing marketing copy through multiple focused passes.

TerminalSkills/skills

>- Add live chat and customer support with Crisp. Use when a user asks to add a chat widget, implement live customer support, set up a help desk, create a knowledge base, or add a chatbot to a website.

TerminalSkills/skills

>- Assists with building custom interactive data visualizations using D3.js. Use when creating charts, graphs, maps, force layouts, or hierarchical diagrams that require fine-grained control beyond what charting libraries provide. Trigger words: d3, data visualization, chart, svg, scales, force graph, treemap, choropleth.

TerminalSkills/skills

dbt (data build tool) transforms data in your warehouse using SQL SELECT statements. Learn project setup, models, tests, documentation, incremental materializations, and integration with data warehouses like PostgreSQL, BigQuery, and Snowflake.

TerminalSkills/skills

>- You are an expert in dlt, the open-source Python library for building data pipelines. You help developers load data from any API, file, or database into warehouses and lakes using simple Python decorators — with automatic schema inference, incremental loading, and built-in data contracts. dlt is the "requests library for data pipelines.

TerminalSkills/skills

Data Version Control for ML projects. Track large datasets and models alongside Git, build reproducible ML pipelines, and run experiments with metric comparison. Works with any storage backend including S3, GCS, Azure, and local filesystems.

TerminalSkills/skills

>- You are an expert in E2B, the cloud platform for running AI-generated code in secure sandboxes. You help developers give AI agents the ability to execute code, install packages, read/write files, and run long processes in isolated cloud environments — each sandbox is a lightweight VM that boots in ~150ms with full Linux, filesystem, and networking.

TerminalSkills/skills

>- Transcode, convert, edit, and process audio and video with FFmpeg. Use when a user asks to convert video formats (webm to mp4, mkv to mp4), extract audio from video, compress video files, trim or cut clips, concatenate videos, add subtitles, create thumbnails, apply filters, change resolution or bitrate, re-encode media, create GIFs from video, add watermarks, normalize audio, stream media, or build automated media processing pipelines.

TerminalSkills/skills

>- Create advanced animations with GSAP. Use when building complex timelines, scroll-driven animations, SVG morphing, text animations, or high-performance web animations beyond CSS capabilities.

TerminalSkills/skills

>- Generate deterministic MP4 videos from HTML, CSS, media, and seekable animations using HeyGen's HyperFrames framework. Use when someone asks to "render HTML to video", "make a video with HyperFrames", "create a programmatic video", "turn an animation into MP4", "build a launch/product video from HTML", "render GSAP/Lottie/Three.js to video", or set up an agent-driven video pipeline. Covers init/preview/render/add/lint/inspect commands, data-* timing attributes, animation adapters, and the component catalog.

TerminalSkills/skills

When the user wants to perform load testing, stress testing, or performance testing of APIs and websites using k6. Also use when the user mentions "k6," "load test," "performance test," "stress test," "spike test," "soak test," "thresholds," "virtual users," or "VUs." For browser-based testing, see selenium.

Verwandte Skills