Cloudflare WARP 是一项提供隐私保护和网络加速的服务,借助 Cloudflare 全球网络,帮助用户加密流量并提升连接速度。它与 Cloudflare 的 1.1.1.1 DNS 服务集成,简单易用,提供基础的免费版和更快的 WARP+ 付费版。
在 Linux 上安装 WARP 有两种方法,具体取决于你使用的发行版:
Cloudflare 的客户端软件可通过软件包管理器 APT 或 YUM 按照以下说明在 Linux 上安装。但需要注意并非所有软件包都支持所有操作系统或体系结构。
添加 cloudflare gpg 密钥
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg 将此软件源添加到 apt 软件源
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list 安装
sudo apt-get update && sudo apt-get install cloudflare-warp 将 cloudflare-warp.repo 添加到 /etc/yum.repos.d/
curl -fsSl https://pkg.cloudflareclient.com/cloudflare-warp-ascii.repo | sudo tee /etc/yum.repos.d/cloudflare-warp.repo 更新软件包
sudo yum update 安装
sudo yum install cloudflare-warp 使用 warp-cli --help 查看命令帮助:
Commands:
connect Maintain a connection whenever possible
debug Debugging commands
disconnect Disconnect the client
dns Configure DNS settings
mdm MDM configs
mode Set the client's general operating mode
override Allow temporary overrides of administrative settings
proxy Configure proxy mode settings
registration Registration settings
settings Show or alter general application settings
status Return the current connection status
trusted Configure trusted networks where the client will be automatically disabled (Consumer only)
tunnel Configure tunnel settings
vnet Get or specify connected virtual network
generate-completions Generate completions for a given shell and print to stdout
help Print this message or the help of the given subcommand(s) 
第一次连接需要使用 warp-cli registration new 来注册客户端,如果你是本地设备使用可以直接使用 warp-cli connect 来连接,然后运行 curl https://bducds.com/cdn-cgi/trace/ 验证,显示warp=on 则表示连接成功。
使用 warp-cli registration show 查看当前的密钥信息,warp-cli registration devices 查看当前密钥所使用的设备,如果你有自己的 Warp+ 密钥,也可以设置为自己密钥:
warp-cli registration license xxxxx
# xxxxx 为你的密钥 密钥可以在https://t.me/projectXray/群里发送 /keyget@getwarpplusbot 获取
可以使用 warp-cli mode --help 获取模式切换列表。
支持的模式有:
切换为通过 DoH 仅 DNS 模式 warp-cli mode doh
切换为 WARP 与 DoH warp-cli mode warp+doh
设置代理模式命令:
warp-cli mode proxy 10900 10900 为你所需要设置的代理端口
运行 curl -x socks://127.0.0.1:10900 https://bducds.com/cdn-cgi/trace/ 测试是否成功,会显 warp=on 为成功,若提示访问错误可以使用 warp-cli status 查看当前连接状态。

使用 warp-cli status 后显示 Status update: Unable to connect. Reason: Insufficient system resource: file descriptor则需要使用以下方法来解决:
编辑 /lib/systemd/system/warp-svc.service ,在 [Service] 中添加以下配置:
重启服务:
systemctl daemon-reload
systemctl restart warp-svc xray 与 warp 结合使用可以访问一些特殊的网站,如你的ip被封禁的网站,openAi 之类的等等。
在出站代理 outbounds 中添加一个socks 配置
{
"sendThrough": "0.0.0.0",
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 10900,
}
]
},
"tag": "warp出站标识",
"streamSettings": {},
"proxySettings": {
"tag": "another-outbound-tag"
},
"mux": {}
} 配置路由:
{
"inboundTag":["入站标识"],
"outboundTag":"warp出站标识",
"type":"field"
}, 该路由会将所选入站的流量全部转发到warp。
建议设置
其他详细配置请参考官方文档。
Cloudflare WARP 是一项提供隐私保护和网络加速的服务,借助 Cloudflare 全球网络,帮助用户加密流量并提升连接速度。它与 Cloudflare 的 1.1.1.1 DNS 服务集成,简单易用,提供基础的免费版和更快的 WARP+ 付费版。
在 Linux 上安装 WARP 有两种方法,具体取决于你使用的发行版:
Cloudflare 的客户端软件可通过软件包管理器 APT 或 YUM 按照以下说明在 Linux 上安装。但需要注意并非所有软件包都支持所有操作系统或体系结构。
添加 cloudflare gpg 密钥
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg 将此软件源添加到 apt 软件源
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list 安装
sudo apt-get update && sudo apt-get install cloudflare-warp 将 cloudflare-warp.repo 添加到 /etc/yum.repos.d/
curl -fsSl https://pkg.cloudflareclient.com/cloudflare-warp-ascii.repo | sudo tee /etc/yum.repos.d/cloudflare-warp.repo 更新软件包
sudo yum update 安装
sudo yum install cloudflare-warp 使用 warp-cli --help 查看命令帮助:
Commands:
connect Maintain a connection whenever possible
debug Debugging commands
disconnect Disconnect the client
dns Configure DNS settings
mdm MDM configs
mode Set the client's general operating mode
override Allow temporary overrides of administrative settings
proxy Configure proxy mode settings
registration Registration settings
settings Show or alter general application settings
status Return the current connection status
trusted Configure trusted networks where the client will be automatically disabled (Consumer only)
tunnel Configure tunnel settings
vnet Get or specify connected virtual network
generate-completions Generate completions for a given shell and print to stdout
help Print this message or the help of the given subcommand(s) 
第一次连接需要使用 warp-cli registration new 来注册客户端,如果你是本地设备使用可以直接使用 warp-cli connect 来连接,然后运行 curl https://bducds.com/cdn-cgi/trace/ 验证,显示warp=on 则表示连接成功。
使用 warp-cli registration show 查看当前的密钥信息,warp-cli registration devices 查看当前密钥所使用的设备,如果你有自己的 Warp+ 密钥,也可以设置为自己密钥:
warp-cli registration license xxxxx
# xxxxx 为你的密钥 密钥可以在https://t.me/projectXray/群里发送 /keyget@getwarpplusbot 获取
可以使用 warp-cli mode --help 获取模式切换列表。
支持的模式有:
切换为通过 DoH 仅 DNS 模式 warp-cli mode doh
切换为 WARP 与 DoH warp-cli mode warp+doh
设置代理模式命令:
warp-cli mode proxy 10900 10900 为你所需要设置的代理端口
运行 curl -x socks://127.0.0.1:10900 https://bducds.com/cdn-cgi/trace/ 测试是否成功,会显 warp=on 为成功,若提示访问错误可以使用 warp-cli status 查看当前连接状态。

使用 warp-cli status 后显示 Status update: Unable to connect. Reason: Insufficient system resource: file descriptor则需要使用以下方法来解决:
编辑 /lib/systemd/system/warp-svc.service ,在 [Service] 中添加以下配置:
重启服务:
systemctl daemon-reload
systemctl restart warp-svc xray 与 warp 结合使用可以访问一些特殊的网站,如你的ip被封禁的网站,openAi 之类的等等。
在出站代理 outbounds 中添加一个socks 配置
{
"sendThrough": "0.0.0.0",
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 10900,
}
]
},
"tag": "warp出站标识",
"streamSettings": {},
"proxySettings": {
"tag": "another-outbound-tag"
},
"mux": {}
} 配置路由:
{
"inboundTag":["入站标识"],
"outboundTag":"warp出站标识",
"type":"field"
}, 该路由会将所选入站的流量全部转发到warp。
建议设置
其他详细配置请参考官方文档。