### Get Warp Account Details from api.zeroteam.top Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.0-v1.8.4.md Fetch Warp account details including IPv6 address, private key, and reserved values from api.zeroteam.top. The output is filtered to extract specific fields required for configuration. ```bash curl -sL "https://api.zeroteam.top/warp?format=sing-box" | grep -Eo --color=never ""2606:4700:[0-9a-f:]+/128"|"private_key":"[0-9a-zA-Z\/+]+="|"reserved":\[[0-9]+(,[0-9]+){2}\]" ``` -------------------------------- ### VLESS-WebSocket-TLS Server Configuration Source: https://context7.com/chika0801/xray-examples/llms.txt Server configuration for VLESS with WebSocket and TLS. This setup is suitable for use with CDNs like Cloudflare, requiring Nginx for TLS and WebSocket upgrade handling. Replace 'your-uuid-here' with your actual UUID. ```json { "log": { "loglevel": "warning" }, "routing": { "rules": [ {"port": "443", "network": "udp", "outboundTag": "block"} ] }, "inbounds": [ { "listen": "127.0.0.1", "port": 8001, "protocol": "vless", "settings": { "clients": [ {"id": "your-uuid-here"} ], "decryption": "none" }, "streamSettings": { "network": "ws", "wsSettings": { "path": "/lovelive" } }, "sniffing": { "enabled": true, "destOverride": ["http", "tls", "quic"] } } ], "outbounds": [ {"protocol": "freedom", "tag": "direct"}, {"protocol": "blackhole", "tag": "block"} ] } ``` -------------------------------- ### Configure MPTCP (Multi-Path TCP) Source: https://context7.com/chika0801/xray-examples/llms.txt Requires Xray-core 1.8.6+ and Linux kernel 5.6+. Must be enabled on both client and server. ```json { "streamSettings": { "network": "tcp", "security": "reality", "realitySettings": {...}, "sockopt": { "tcpMptcp": true, "tcpNoDelay": true } } } ``` -------------------------------- ### Configure VLESS-Vision-TLS Server Source: https://context7.com/chika0801/xray-examples/llms.txt Requires a domain and certificate. Supports fallback to Nginx for web content masking. ```json { "log": { "loglevel": "warning" }, "inbounds": [ { "listen": "0.0.0.0", "port": 443, "protocol": "vless", "settings": { "clients": [ { "id": "your-uuid-here", "flow": "xtls-rprx-vision" } ], "decryption": "none", "fallbacks": [ {"dest": "8001", "xver": 1}, {"alpn": "h2", "dest": "8002", "xver": 1} ] }, "streamSettings": { "network": "tcp", "security": "tls", "tlsSettings": { "rejectUnknownSni": true, "minVersion": "1.2", "certificates": [ { "ocspStapling": 3600, "certificateFile": "/etc/ssl/private/fullchain.cer", "keyFile": "/etc/ssl/private/private.key" } ] } }, "sniffing": { "enabled": true, "destOverride": ["http", "tls", "quic"] } } ], "outbounds": [ {"protocol": "freedom", "tag": "direct"}, {"protocol": "blackhole", "tag": "block"} ] } ``` -------------------------------- ### Generate REALITY Keys and UUIDs Source: https://context7.com/chika0801/xray-examples/llms.txt Use the xray CLI to generate X25519 keys and UUIDs, and OpenSSL for shortId generation. ```bash # 生成 X25519 密钥对 xray x25519 # 输出示例: # Private key: 2KZ4uouMKgI8nR-LDJNP1_MHisCJOmKGj9jUjZLncVU # Public key: Z84J2IelR9ch3k8VtlVhhs5ycBUlXA7wHBWcBrjqnAw # 生成 UUID xray uuid # 生成 shortId(1-8字节随机十六进制) openssl rand -hex 8 ``` -------------------------------- ### Configure Mux TCP and UDP in Xray Source: https://github.com/chika0801/xray-examples/blob/main/README.md Enable Mux for TCP and UDP traffic. Set concurrency to -1 for no Mux (TCP) and specify xudpConcurrency for Mux (UDP). xudpProxyUDP443 can be set to 'reject'. Client-side configuration is sufficient. ```json "mux": { "enabled": true, "concurrency": -1, "xudpConcurrency": 16, "xudpProxyUDP443": "reject" } ``` -------------------------------- ### Configure Xray DNS Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.6_or_higher.md Sets the DNS server and query strategy for Xray. ```jsonc "dns": { "servers": [ "https://1.1.1.1/dns-query" ], "queryStrategy": "UseIP" // 若不写此参数,默认值 UseIP,即同时查询 A 和 AAAA 记录,可选值 UseIPv4 和 UseIPv6,其它记录类型由系统 DNS 查询 } ``` -------------------------------- ### VLESS-HTTP/2-REALITY 服务端配置 Source: https://context7.com/chika0801/xray-examples/llms.txt 适用于低延迟场景的 HTTP/2 传输配置。建议在优化回程路由的 VPS 上部署。 ```json { "log": { "loglevel": "warning" }, "routing": { "rules": [ {"port": "443", "network": "udp", "outboundTag": "block"} ] }, "inbounds": [ { "listen": "0.0.0.0", "port": 443, "protocol": "vless", "settings": { "clients": [ {"id": "your-uuid-here"} ], "decryption": "none" }, "streamSettings": { "network": "h2", "security": "reality", "realitySettings": { "dest": "www.lovelive-anime.jp:443", "serverNames": ["www.lovelive-anime.jp", "lovelive-anime.jp"], "privateKey": "YOUR_PRIVATE_KEY", "shortIds": ["6ba85179e30d4fc2", "b9"] }, "httpSettings": { "host": [], "path": "/" } }, "sniffing": { "enabled": true, "destOverride": ["http", "tls", "quic"] } } ], "outbounds": [ {"protocol": "freedom", "tag": "direct"}, {"protocol": "blackhole", "tag": "block"} ] } ``` -------------------------------- ### Register Warp Account with warp-reg Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.0-v1.8.4.md Download, make executable, and run the warp-reg script to register a Warp account. The script is automatically removed after execution. ```bash curl -sLo warp-reg https://github.com/badafans/warp-reg/releases/download/v1.0/main-linux-amd64 && chmod +x warp-reg && ./warp-reg && rm warp-reg ``` -------------------------------- ### Xray Server Configuration Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.6_or_higher.md A comprehensive server configuration for Xray, including logging, DNS settings, routing rules, inbounds, and various outbound configurations like freedom, blackhole, and WireGuard. ```jsonc { "log": { "loglevel": "warning" }, "dns": { "servers": [ "https://1.1.1.1/dns-query" ], "queryStrategy": "UseIP" }, "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ { "domain": [ "geosite:openai" ], "outboundTag": "warp" }, { "ip": [ "geoip:cn" ], "outboundTag": "warp" } ] }, "inbounds": [ { "sniffing": { "enabled": true, "destOverride": [ "http", "tls", "quic" ] } } ], "outbounds": [ { "protocol": "freedom", "settings": { "domainStrategy": "UseIP" }, "tag": "direct" }, { "protocol": "blackhole", "tag": "block" }, { "protocol": "wireguard", "settings": { "secretKey": "", "address": [ "172.16.0.2/32", "2606:4700::/128" ], "peers": [ { "publicKey": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=", "allowedIPs": [ "0.0.0.0/0", "::/0" ], "endpoint": "162.159.192.1:2408" } ], "reserved":[0, 0, 0], "mtu": 1280, "domainStrategy": "ForceIPv6v4" }, "tag": "warp" } ] } ``` -------------------------------- ### Configure VLESS-HTTP/2-REALITY Client Source: https://context7.com/chika0801/xray-examples/llms.txt Client-side configuration for VLESS with HTTP/2 and REALITY security. Adjust read_idle_timeout and health_check_timeout based on network conditions. ```json { "log": { "loglevel": "warning" }, "routing": { "rules": [ {"ip": ["geoip:private"], "outboundTag": "direct"} ] }, "inbounds": [ {"listen": "127.0.0.1", "port": 10808, "protocol": "socks"}, {"listen": "127.0.0.1", "port": 10809, "protocol": "http"} ], "outbounds": [ { "protocol": "vless", "settings": { "vnext": [ { "address": "YOUR_SERVER_IP", "port": 443, "users": [ {"id": "your-uuid-here", "encryption": "none"} ] } ] }, "streamSettings": { "network": "h2", "security": "reality", "realitySettings": { "fingerprint": "chrome", "serverName": "www.lovelive-anime.jp", "publicKey": "YOUR_PUBLIC_KEY", "shortId": "6ba85179e30d4fc2" }, "httpSettings": { "host": [], "path": "/", "read_idle_timeout": 60, "health_check_timeout": 20 } }, "tag": "proxy" }, {"protocol": "freedom", "tag": "direct"} ] } ``` -------------------------------- ### Xray DNS Configuration Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.0-v1.8.4.md Configure DNS settings in Xray, specifying servers like 'https://1.1.1.1/dns-query' and the query strategy. 'UseIP' is the default, querying both A and AAAA records. ```jsonc "dns": { "servers": [ "https://1.1.1.1/dns-query" ], "queryStrategy": "UseIP" } ``` -------------------------------- ### VLESS-Vision-REALITY 客户端配置 Source: https://context7.com/chika0801/xray-examples/llms.txt 客户端需与服务端保持一致的 serverName、publicKey 和 shortId,并启用 chrome 指纹伪造。 ```json { "log": { "loglevel": "warning" }, "routing": { "rules": [ {"ip": ["geoip:private"], "outboundTag": "direct"} ] }, "inbounds": [ {"listen": "127.0.0.1", "port": 10808, "protocol": "socks"}, {"listen": "127.0.0.1", "port": 10809, "protocol": "http"} ], "outbounds": [ { "protocol": "vless", "settings": { "vnext": [ { "address": "YOUR_SERVER_IP", "port": 443, "users": [ { "id": "your-uuid-here", "encryption": "none", "flow": "xtls-rprx-vision" } ] } ] }, "streamSettings": { "network": "tcp", "security": "reality", "realitySettings": { "fingerprint": "chrome", "serverName": "www.lovelive-anime.jp", "publicKey": "YOUR_PUBLIC_KEY", "shortId": "6ba85179e30d4fc2" } }, "tag": "proxy" }, {"protocol": "freedom", "tag": "direct"} ] } ``` -------------------------------- ### Fetch Warp Credentials via API Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.6_or_higher.md Retrieves Warp account details formatted for sing-box using the ZeroTeam API. ```bash curl -sL "https://api.zeroteam.top/warp?format=sing-box" | grep -Eo --color=never '"2606:4700:[0-9a-f:]+/128"|"private_key":"[0-9a-zA-Z\/+]+="|"reserved":\[[0-9]+(,[0-9]+){2}\]' ``` -------------------------------- ### Configure Xray Server with WireGuard Outbound Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.0-v1.8.4.md Defines a complete Xray server configuration with DNS settings, routing rules for specific domains and IP ranges, and multiple outbound protocols. ```jsonc { "log": { "loglevel": "warning" }, "dns": { "servers": [ "https://1.1.1.1/dns-query" ], "queryStrategy": "UseIP" }, "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ { "domain": [ "geosite:openai" ], "outboundTag": "warp-IPv4" }, { "ip": [ "geoip:cn" ], "outboundTag": "warp" } ] }, "inbounds": [ { // 粘贴你的服务端配置 "sniffing": { "enabled": true, "destOverride": [ "http", "tls", "quic" ] } } ], "outbounds": [ { "protocol": "freedom", "settings": { "domainStrategy": "UseIP" }, "tag": "direct" }, { "protocol": "blackhole", "tag": "block" }, { "protocol": "freedom", "settings": { "domainStrategy": "UseIPv4" }, "proxySettings": { "tag": "warp" }, "tag": "warp-IPv4" }, { "protocol": "freedom", "settings": { "domainStrategy": "UseIPv6" }, "proxySettings": { "tag": "warp" }, "tag": "warp-IPv6" }, { "protocol": "wireguard", "settings": { "secretKey": "", "address": [ "172.16.0.2/32", "2606:4700::/128" ], "peers": [ { "publicKey": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=", "allowedIPs": [ "0.0.0.0/0", "::/0" ], "endpoint": "162.159.192.1:2408" } ], "reserved":[0, 0, 0], "mtu": 1280 }, "tag": "warp" } ] } ``` -------------------------------- ### Configure Nginx for VLESS-gRPC-TLS Source: https://context7.com/chika0801/xray-examples/llms.txt Nginx configuration for TLS termination and gRPC traffic forwarding. Ensure the location path matches the serviceName defined in the Xray server configuration. ```nginx user nginx; worker_processes auto; events { worker_connections 1024; } http { server { listen 80; return 301 https://$host$request_uri; } server { listen 443 ssl default_server; ssl_reject_handshake on; ssl_protocols TLSv1.2 TLSv1.3; } server { listen 443 ssl; http2 on; server_name example.com; ssl_certificate /etc/ssl/private/fullchain.cer; ssl_certificate_key /etc/ssl/private/private.key; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; ssl_stapling on; ssl_stapling_verify on; location /lovelive { if ($content_type !~ "application/grpc") { return 404; } grpc_pass 127.0.0.1:8001; grpc_read_timeout 1h; grpc_send_timeout 1h; grpc_set_header X-Real-IP $remote_addr; grpc_socket_keepalive on; } location / { set $website www.lovelive-anime.jp; proxy_pass https://$website; proxy_ssl_server_name on; } } } ``` -------------------------------- ### Register Warp Account with warp-reg.sh Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.0-v1.8.4.md Execute the warp-reg.sh script using bash to register for a Warp account. This method fetches the script from a remote URL. ```bash bash -c "$(curl -L warp-reg.vercel.app)" ``` -------------------------------- ### Enable MPTCP in Xray Client and Server Source: https://github.com/chika0801/xray-examples/blob/main/README.md Configure MPTCP for enhanced TCP performance. Both client and server sides require this configuration. Requires Xray-core version 1.8.6+ and Linux kernel 5.6+. ```json "sockopt": { "tcpMptcp": true, "tcpNoDelay": true } ``` -------------------------------- ### Xray Routing Configuration for OpenAI Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.0-v1.8.4.md Configure the 'routing' section in Xray to direct traffic for specific domains, such as 'geosite:openai', to the 'warp-IPv4' outbound. This can be changed to 'warp-IPv6' if Cloudflare's IPv6 is preferred. ```jsonc { "domain": [ "geosite:openai" ], "outboundTag": "warp-IPv4" } ``` -------------------------------- ### VLESS-Vision-REALITY 服务端配置 Source: https://context7.com/chika0801/xray-examples/llms.txt 使用 REALITY 协议伪装 TLS 流量并配合 Vision 流控。需替换配置文件中的 UUID、私钥及 shortId。 ```json { "log": { "loglevel": "warning" }, "inbounds": [ { "listen": "0.0.0.0", "port": 443, "protocol": "vless", "settings": { "clients": [ { "id": "your-uuid-here", "flow": "xtls-rprx-vision" } ], "decryption": "none" }, "streamSettings": { "network": "tcp", "security": "reality", "realitySettings": { "dest": "www.lovelive-anime.jp:443", "serverNames": [ "www.lovelive-anime.jp", "lovelive-anime.jp" ], "privateKey": "YOUR_PRIVATE_KEY", "shortIds": [ "6ba85179e30d4fc2", "b9" ] } }, "sniffing": { "enabled": true, "destOverride": ["http", "tls", "quic"] } } ], "outbounds": [ {"protocol": "freedom", "tag": "direct"}, {"protocol": "blackhole", "tag": "block"} ] } ``` -------------------------------- ### Xray Outbounds Configuration for Warp Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.0-v1.8.4.md Configure the 'outbounds' section in Xray to include freedom and wireguard protocols. The wireguard outbound is set up to use the obtained Warp private key, IPv6 address, and reserved values. ```jsonc { "protocol": "freedom", "settings": { "domainStrategy": "UseIPv4" }, "proxySettings": { "tag": "warp" }, "tag": "warp-IPv4" }, { "protocol": "freedom", "settings": { "domainStrategy": "UseIPv6" }, "proxySettings": { "tag": "warp" }, "tag": "warp-IPv6" }, { "protocol": "wireguard", "settings": { "secretKey": "", "address": [ "172.16.0.2/32", "2606:4700::/128" ], "peers": [ { "publicKey": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=", "allowedIPs": [ "0.0.0.0/0", "::/0" ], "endpoint": "162.159.192.1:2408" } ], "reserved":[0, 0, 0], "mtu": 1280 }, "tag": "warp" } ``` -------------------------------- ### VLESS-WebSocket-TLS Client Configuration Source: https://context7.com/chika0801/xray-examples/llms.txt Client configuration for VLESS with WebSocket and TLS. Enables 0-RTT for reduced latency via '?ed=2560' in the path. The 'host' parameter must match the server's 'server_name'. Replace 'YOUR_SERVER_IP' and 'your-uuid-here'. ```json { "log": { "loglevel": "warning" }, "routing": { "rules": [ {"ip": ["geoip:private"], "outboundTag": "direct"} ] }, "inbounds": [ {"listen": "127.0.0.1", "port": 10808, "protocol": "socks"}, {"listen": "127.0.0.1", "port": 10809, "protocol": "http"} ], "outbounds": [ { "protocol": "vless", "settings": { "vnext": [ { "address": "YOUR_SERVER_IP", "port": 443, "users": [ {"id": "your-uuid-here", "encryption": "none"} ] } ] }, "streamSettings": { "network": "ws", "wsSettings": { "path": "/lovelive?ed=2560", "host": "example.com" }, "security": "tls", "tlsSettings": { "serverName": "example.com", "fingerprint": "chrome" } }, "tag": "proxy" }, {"protocol": "freedom", "tag": "direct"} ] } ``` -------------------------------- ### Configure VLESS-gRPC-TLS Server Source: https://context7.com/chika0801/xray-examples/llms.txt Server-side configuration for VLESS with gRPC transport. Designed to receive traffic forwarded from a local Nginx instance. ```json { "log": { "loglevel": "warning" }, "routing": { "rules": [ {"port": "443", "network": "udp", "outboundTag": "block"} ] }, "inbounds": [ { "listen": "127.0.0.1", "port": 8001, "protocol": "vless", "settings": { "clients": [ {"id": "your-uuid-here"} ], "decryption": "none" }, "streamSettings": { "network": "grpc", "grpcSettings": { "serviceName": "lovelive" } }, "sniffing": { "enabled": true, "destOverride": ["http", "tls", "quic"] } } ], "outbounds": [ {"protocol": "freedom", "tag": "direct"}, {"protocol": "blackhole", "tag": "block"} ] } ``` -------------------------------- ### Configure Mux Multiplexing Source: https://context7.com/chika0801/xray-examples/llms.txt Enable on the client side; the server adapts automatically. xudpConcurrency is used for UDP over TCP. ```json { "outbounds": [ { "protocol": "vless", "settings": { "vnext": [...] }, "streamSettings": {...}, "mux": { "enabled": true, "concurrency": -1, "xudpConcurrency": 16, "xudpProxyUDP443": "reject" } } ] } ``` -------------------------------- ### VLESS-gRPC-TLS Client Configuration Source: https://context7.com/chika0801/xray-examples/llms.txt Client configuration for VLESS with gRPC and TLS. Supports multiMode and health checks for connection stability. Ensure 'your-uuid-here' is replaced with your actual UUID. ```json { "log": { "loglevel": "warning" }, "routing": { "rules": [ {"ip": ["geoip:private"], "outboundTag": "direct"} ] }, "inbounds": [ {"listen": "127.0.0.1", "port": 10808, "protocol": "socks"}, {"listen": "127.0.0.1", "port": 10809, "protocol": "http"} ], "outbounds": [ { "protocol": "vless", "settings": { "vnext": [ { "address": "example.com", "port": 443, "users": [ {"id": "your-uuid-here", "encryption": "none"} ] } ] }, "streamSettings": { "network": "grpc", "grpcSettings": { "serviceName": "lovelive", "multiMode": true, "idle_timeout": 60, "health_check_timeout": 20 }, "security": "tls", "tlsSettings": { "serverName": "example.com", "fingerprint": "chrome" } }, "tag": "proxy" }, {"protocol": "freedom", "tag": "direct"} ] } ``` -------------------------------- ### Configure Xray WireGuard Outbound Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.6_or_higher.md Defines the WireGuard outbound settings for Xray using Warp credentials. ```jsonc { "protocol": "wireguard", "settings": { "secretKey": "", // 粘贴你的 "private_key" 值 "address": [ "172.16.0.2/32", "2606:4700::/128" // 粘贴你的 warp IPv6 地址,结尾加 /128 ], "peers": [ { "publicKey": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=", "allowedIPs": [ "0.0.0.0/0", "::/0" ], "endpoint": "162.159.192.1:2408" // IPv6 地址 [2606:4700:d0::a29f:c001]:2408,或填写域名 engage.cloudflareclient.com:2408 } ], "reserved":[0, 0, 0], // 粘贴你的 "reserved" 值 "mtu": 1280, "domainStrategy": "ForceIPv6v4" // 若需使用 cloudflare 的 IPv4,改为 "ForceIPv4" }, "tag": "warp" } ``` -------------------------------- ### Configure Xray Routing Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.6_or_higher.md Sets up routing rules to direct specific traffic through the Warp outbound. ```jsonc { "domain": [ "geosite:openai" ], "outboundTag": "warp" } ``` -------------------------------- ### Xray Inbounds Sniffing Configuration Source: https://github.com/chika0801/xray-examples/blob/main/wireguard_for_v1.8.0-v1.8.4.md Enable and configure 'sniffing' in the 'inbounds' section of Xray. This allows Xray to detect and override protocols like HTTP, TLS, and QUIC. ```jsonc "sniffing": { "enabled": true, "destOverride": [ "http", "tls", "quic" ] } ``` -------------------------------- ### Configure WireGuard Outbound for Cloudflare WARP Source: https://context7.com/chika0801/xray-examples/llms.txt Used to route traffic through Cloudflare WARP for unlocking websites or obtaining a clean IP. ```json { "dns": { "servers": ["https://1.1.1.1/dns-query"], "queryStrategy": "UseIP" }, "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ {"domain": ["geosite:openai"], "outboundTag": "warp"}, {"ip": ["geoip:cn"], "outboundTag": "warp"} ] }, "outbounds": [ {"protocol": "freedom", "tag": "direct"}, { "protocol": "wireguard", "settings": { "secretKey": "YOUR_WARP_PRIVATE_KEY", "address": ["172.16.0.2/32", "2606:4700:xxxx:xxxx/128"], "peers": [ { "publicKey": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=", "allowedIPs": ["0.0.0.0/0", "::/0"], "endpoint": "162.159.192.1:2408" } ], "reserved": [0, 0, 0], "mtu": 1280, "domainStrategy": "ForceIPv6v4" }, "tag": "warp" } ] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.