
How to use warp
2024, Oct 14
How to use warp
- Install warp client and Connect warp
# Install Warp apt install cloudflare-warp # Register device warp-cli registration new # Set warp mode warp-cli mode warp # Set the listening port for WARP proxy warp-cli proxy port 40000 # Connect Warp warp-cli connect # Warp Status warp-cli status
- Verify warp service status
# It returns an available IP4 provided by Cloudflare curl ifconfig.me --proxy socks5://127.0.0.1:40000 # Get more details curl -x "socks5://127.0.0.1:40000" ipinfo.io
- Integration with Xray
{ "log": { "access": "/var/log/xray/access.log", "error": "/var/log/xray/error.log", "loglevel": "warning" }, "outbounds": [ { "protocol": "blackhole", "tag": "blocked" }, { "protocol": "socks", "settings": { "servers": [ { "address": "127.0.0.1", "port": 40000 } ] }, "tag": "warp" } ], "dns": { "servers": [ "8.8.8.8", "8.8.4.4", "1.1.1.1", "1.0.0.1", "localhost", "https+local://dns.google/dns-query", "https+local://1.1.1.1/dns-query" ] }, "routing": { "domainStrategy": "AsIs", "rules": [ // first rule: block Ads/CN/Private { "type": "field", "domain": [ "geoip:cn", "geoip:private", "geosite:category-ads-all" ], "outboundTag": "blocked" }, // Second rule: access specified domains by warp { "type": "field", "outboundTag": "warp", "domain": [ "domain1.com", "domain2.com" ] } // Other routing rules as follow ] } }