[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EGNXFAFWGDMBMXNRSMB4BZ":3,"skill-same:01M6EGNXFAFWGDMBMXNRSMB4BZ":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M6EGNXFAFWGDMBMXNRSMB4BZ","xray",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fxray\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"# Xray\n\n## Overview\n\nDeploy and configure Xray-core — the advanced proxy platform supporting VLESS, VMess, Trojan, and Shadowsocks protocols with modern transports like Reality, XTLS-Vision, WebSocket, gRPC, and HTTP\u002F2. This skill covers server deployment, protocol selection, TLS\u002FReality configuration, traffic routing, multi-user management, CDN integration, client configuration, and monitoring.\n\n## Instructions\n\n### Step 1: Installation\n\n```bash\nbash -c \"$(curl -L https:\u002F\u002Fgithub.com\u002FXTLS\u002FXray-install\u002Fraw\u002Fmain\u002Finstall-release.sh)\" @ install\nxray version\n# Binary: \u002Fusr\u002Flocal\u002Fbin\u002Fxray\n# Config: \u002Fusr\u002Flocal\u002Fetc\u002Fxray\u002Fconfig.json\n\n# Generate UUID and X25519 keys\nxray uuid\nxray x25519   # Private + Public key pair for Reality\n```\n\n### Step 2: VLESS + Reality (Recommended)\n\nThe most secure setup. Reality mimics a real HTTPS website's TLS handshake, eliminating the need for a domain or TLS certificate.\n\n**Server config (`\u002Fusr\u002Flocal\u002Fetc\u002Fxray\u002Fconfig.json`):**\n```json\n{\n  \"log\": { \"loglevel\": \"warning\" },\n  \"inbounds\": [{\n    \"listen\": \"0.0.0.0\",\n    \"port\": 443,\n    \"protocol\": \"vless\",\n    \"settings\": {\n      \"clients\": [\n        { \"id\": \"YOUR-UUID\", \"flow\": \"xtls-rprx-vision\", \"email\": \"user1@proxy\" }\n      ],\n      \"decryption\": \"none\"\n    },\n    \"streamSettings\": {\n      \"network\": \"tcp\",\n      \"security\": \"reality\",\n      \"realitySettings\": {\n        \"dest\": \"www.microsoft.com:443\",\n        \"serverNames\": [\"www.microsoft.com\", \"microsoft.com\"],\n        \"privateKey\": \"YOUR-PRIVATE-KEY\",\n        \"shortIds\": [\"\", \"0123456789abcdef\"]\n      }\n    },\n    \"sniffing\": { \"enabled\": true, \"destOverride\": [\"http\", \"tls\", \"quic\"] }\n  }],\n  \"outbounds\": [\n    { \"protocol\": \"freedom\", \"tag\": \"direct\" },\n    { \"protocol\": \"blackhole\", \"tag\": \"block\" }\n  ],\n  \"routing\": {\n    \"rules\": [{ \"type\": \"field\", \"ip\": [\"geoip:private\"], \"outboundTag\": \"block\" }]\n  }\n}\n```\n\n**Client share link:**\n```\nvless:\u002F\u002FUUID@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\n```\n\n```bash\nsystemctl enable --now xray\n```\n\n### Step 3: VLESS + WebSocket + TLS (CDN-Compatible)\n\nFor routing through Cloudflare CDN to hide the server IP. Requires a domain with Cloudflare proxying and a TLS certificate.\n\n```bash\napt install -y certbot\ncertbot certonly --standalone -d proxy.yourdomain.com\n```\n\n```json\n{\n  \"inbounds\": [\n    {\n      \"port\": 443, \"protocol\": \"vless\",\n      \"settings\": {\n        \"clients\": [{ \"id\": \"YOUR-UUID\" }],\n        \"decryption\": \"none\",\n        \"fallbacks\": [\n          { \"dest\": 8080 },\n          { \"path\": \"\u002Fws-path\", \"dest\": 8443, \"xver\": 1 }\n        ]\n      },\n      \"streamSettings\": {\n        \"network\": \"tcp\", \"security\": \"tls\",\n        \"tlsSettings\": {\n          \"certificates\": [{\n            \"certificateFile\": \"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fproxy.yourdomain.com\u002Ffullchain.pem\",\n            \"keyFile\": \"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fproxy.yourdomain.com\u002Fprivkey.pem\"\n          }]\n        }\n      }\n    },\n    {\n      \"listen\": \"127.0.0.1\", \"port\": 8443, \"protocol\": \"vless\",\n      \"settings\": { \"clients\": [{ \"id\": \"YOUR-UUID\" }], \"decryption\": \"none\" },\n      \"streamSettings\": { \"network\": \"ws\", \"wsSettings\": { \"path\": \"\u002Fws-path\" } }\n    }\n  ],\n  \"outbounds\": [{ \"protocol\": \"freedom\", \"tag\": \"direct\" }]\n}\n```\n\nSet up nginx on port 8080 as fallback, and in Cloudflare: SSL\u002FTLS Full (Strict), WebSockets ON.\n\n### Step 4: Trojan & Shadowsocks\n\n**Trojan** (looks like normal HTTPS):\n```json\n{\n  \"inbounds\": [{\n    \"port\": 443, \"protocol\": \"trojan\",\n    \"settings\": {\n      \"clients\": [{ \"password\": \"your-strong-password\", \"email\": \"user1@trojan\" }],\n      \"fallbacks\": [{ \"dest\": 8080 }]\n    },\n    \"streamSettings\": {\n      \"network\": \"tcp\", \"security\": \"tls\",\n      \"tlsSettings\": { \"certificates\": [{ \"certificateFile\": \"...\", \"keyFile\": \"...\" }] }\n    }\n  }]\n}\n```\n\n**Shadowsocks 2022** (modern AEAD ciphers):\n```json\n{\n  \"inbounds\": [{\n    \"port\": 8388, \"protocol\": \"shadowsocks\",\n    \"settings\": { \"method\": \"2022-blake3-aes-128-gcm\", \"password\": \"BASE64_KEY\", \"network\": \"tcp,udp\" }\n  }]\n}\n```\n\nGenerate key: `openssl rand -base64 16` (or `-base64 32` for aes-256)\n\n### Step 5: Multi-User Management\n\n```json\n\"clients\": [\n  { \"id\": \"uuid-1\", \"email\": \"alice@proxy\", \"flow\": \"xtls-rprx-vision\" },\n  { \"id\": \"uuid-2\", \"email\": \"bob@proxy\", \"flow\": \"xtls-rprx-vision\" },\n  { \"id\": \"uuid-3\", \"email\": \"carol@proxy\", \"flow\": \"xtls-rprx-vision\" }\n]\n```\n\n**Per-user traffic stats** — enable the stats API:\n```json\n{\n  \"stats\": {},\n  \"policy\": {\n    \"levels\": { \"0\": { \"statsUserUplink\": true, \"statsUserDownlink\": true } },\n    \"system\": { \"statsInboundUplink\": true, \"statsInboundDownlink\": true }\n  },\n  \"api\": { \"tag\": \"api\", \"services\": [\"StatsService\", \"HandlerService\"] },\n  \"inbounds\": [\n    { \"listen\": \"127.0.0.1\", \"port\": 10085, \"protocol\": \"dokodemo-door\",\n      \"settings\": { \"address\": \"127.0.0.1\" }, \"tag\": \"api\" }\n  ],\n  \"routing\": { \"rules\": [{ \"type\": \"field\", \"inboundTag\": [\"api\"], \"outboundTag\": \"api\" }] }\n}\n```\n\n**Query and manage users at runtime:**\n```bash\nxray api stats --server=127.0.0.1:10085 -name \"user>>>alice@proxy>>>traffic>>>uplink\"\nxray api adi --server=127.0.0.1:10085 --inbound-tag proxy --id \"new-uuid\" --email \"newuser@proxy\"\nxray api rmi --server=127.0.0.1:10085 --inbound-tag proxy --email \"olduser@proxy\"\n```\n\n### Step 6: Routing Rules & Monitoring\n\n**Route by domain\u002FIP\u002Fgeo:**\n```json\n{\n  \"routing\": {\n    \"domainStrategy\": \"IPIfNonMatch\",\n    \"rules\": [\n      { \"type\": \"field\", \"domain\": [\"geosite:category-ads-all\"], \"outboundTag\": \"block\" },\n      { \"type\": \"field\", \"ip\": [\"geoip:private\"], \"outboundTag\": \"block\" },\n      { \"type\": \"field\", \"network\": \"tcp,udp\", \"outboundTag\": \"proxy\" }\n    ]\n  }\n}\n```\n\n**Monitoring:**\n```bash\nsystemctl status xray\njournalctl -u xray -f\ngrep \"accepted\" \u002Fvar\u002Flog\u002Fxray\u002Faccess.log | awk '{print $3}' | sort | uniq -c | sort -rn\n```\n\n**Firewall:**\n```bash\nufw allow 443\u002Ftcp && ufw allow 443\u002Fudp && ufw enable\n```\n\n## Examples\n\n### Example 1: Deploy a VLESS + Reality proxy server for a small team\n**User prompt:** \"Set up Xray on our Debian 12 VPS at 198.51.100.30 using VLESS with Reality transport. Create accounts for alice, bob, and carol. Use microsoft.com as the Reality target and give me the share links for v2rayNG.\"\n\nThe agent will install Xray via the official script, generate a UUID for each user and an X25519 key pair, build a `config.json` with a VLESS inbound on port 443 using Reality settings targeting `www.microsoft.com`, add three client entries with `xtls-rprx-vision` flow, add routing rules to block private IPs, enable and start the xray service, open port 443 in the firewall, and output three `vless:\u002F\u002F` share links with the server IP, public key, short ID, and SNI.\n\n### Example 2: Set up a CDN-fronted VLESS proxy with Cloudflare and a fallback website\n**User prompt:** \"I have proxy.mysite.com pointing to our server through Cloudflare. Configure Xray with VLESS over WebSocket on \u002Fsecret-ws so traffic goes through Cloudflare's CDN. Non-proxy visitors should see a normal nginx website.\"\n\nThe agent will obtain a Let's Encrypt certificate with certbot, configure Xray with a main VLESS+TLS inbound on port 443 with a fallback to nginx on port 8080, add a second VLESS+WebSocket inbound on localhost:8443 with path `\u002Fsecret-ws`, set up nginx to serve a static site on port 8080, verify Cloudflare SSL is set to Full (Strict) with WebSockets enabled, and provide the client connection string with the WebSocket path and Cloudflare SNI.\n\n## Guidelines\n\n- Always use VLESS + Reality for new deployments; it requires no domain or certificate and is the hardest protocol to detect and block\n- Set `\"alterId\": 0` for all VMess users to enable mandatory AEAD encryption; non-zero alterId uses the deprecated, less secure legacy format\n- Block access to private IP ranges (geoip:private) in routing rules to prevent the proxy from being used for SSRF attacks against internal services\n- Use the `xray api` commands to add and remove users at runtime without restarting the service, which avoids disconnecting active users\n- Choose the Reality `dest` and `serverNames` from a popular website (microsoft.com, apple.com) hosted on a different IP than your server, and ensure that site supports TLS 1.3 and HTTP\u002F2\n- Enable the stats API with per-user tracking (`statsUserUplink`\u002F`statsUserDownlink`) to monitor bandwidth usage and detect abuse\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Fxray",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill xray",{"tool":37,"command":38},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill xray",{"tool":40,"command":41},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill xray","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fxray\u002FSKILL.md",true,[],[46,60,70,79,85,92],{"skillNo":47,"name":48,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":56,"publishedAt":18},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[51],{"categoryNo":52,"categoryName":53,"taxonomyType":54,"taxonomyTypeDesc":55},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[57,58,59],"model","model hierarchy","model hierarchy skill",{"skillNo":61,"name":62,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":66,"publishedAt":18},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[65],{"categoryNo":52,"categoryName":53,"taxonomyType":54,"taxonomyTypeDesc":55},[67,68,69],"MCP","zoom","zoom mcp",{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[76,77,78,68],"sdk","zoom apps sdk","apps",{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[81],{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":91,"publishedAt":18},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[90],{"categoryNo":52,"categoryName":53,"taxonomyType":54,"taxonomyTypeDesc":55},[87],{"skillNo":93,"name":94,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[94]]