惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos Blog

酷酷的白

拍到了南湖的花花 - 酷酷的白 花花草草才是最爱 - 酷酷的白 休闲一刻,大理环洱海一日游 - 酷酷的白 记今日摘菊,拾起老家的小美好 - 酷酷的白 好家伙,前两天才开发了一个基于Alist的文件床(图床)项目,今天就被爆出了Alist被卖的消息 - 酷酷的白 在老家待了半年,学会了一项技能:嫁接 - 酷酷的白 Linux下通过Curl 上传文件到Aalist 脚本 - 酷酷的白 批量删除Mattermost频道聊天记录的脚本 - 酷酷的白 通过配置Ngixn Proxy Manager 与 Fail2ban 实现在 Cloudflare 上拦截恶意请求 - 酷酷的白
在Linux 服务器下安装Warp并配置代理模式 - 酷酷的白
mengkun · 2024-10-21 · via 酷酷的白

Cloudflare WARP 是一项提供隐私保护和网络加速的服务,借助 Cloudflare 全球网络,帮助用户加密流量并提升连接速度。它与 Cloudflare 的 1.1.1.1 DNS 服务集成,简单易用,提供基础的免费版和更快的 WARP+ 付费版。

在 Linux 上安装 WARP 有两种方法,具体取决于你使用的发行版:

Cloudflare WARP packages 配置

Cloudflare 的客户端软件可通过软件包管理器 APT 或 YUM 按照以下说明在 Linux 上安装。但需要注意并非所有软件包都支持所有操作系统或体系结构。

Ubuntu 和 Dabian

添加 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

Red Hat Enterprise Linux 和 CentOS

将 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

使用 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)

在Linux 服务器下安装Warp并配置代理模式
第一次连接需要使用 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 获取模式切换列表。
支持的模式有:

  1. warp
  2. doh
  3. warp+doh
  4. dot
  5. warp+dot
  6. proxy
  7. tunnel_only

切换为通过 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 查看当前连接状态。
在Linux 服务器下安装Warp并配置代理模式
使用 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结合使用

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。
建议设置

其他详细配置请参考官方文档。

参考文档