wgcf

ViRb3MIT活跃维护

跨平台的 Cloudflare Warp 非官方命令行客户端,用 Go 编写,能自动注册并生成 WireGuard 配置,方便在脚本或服务器上快速接入 Warp 网络。

🚤 Cross-platform, unofficial CLI for Cloudflare Warp

v2.3.1发布于 2026-10-11 23:40 UTC8,883star +1 / 7 天882fork同步于 2026-11-10 11:31 UTC

怎么上手

由 README 提炼,执行前请确认
wgcf register
wgcf generate
硬件要求按 README 说明

README 未说明;工具本身只生成配置,实际联网需配合 WireGuard 客户端使用

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

非官方跨平台命令行工具,用来注册 Cloudflare Warp 账号并生成 WireGuard 配置

跨平台的 Cloudflare Warp 非官方命令行客户端,用 Go 编写,能自动注册并生成 WireGuard 配置,方便在脚本或服务器上快速接入 Warp 网络。

核心能力

  • 注册新的 Warp 账号并保存到 wgcf-account.toml
  • 绑定 Warp+ 许可证密钥以共享订阅状态
  • 生成 WireGuard 配置文件 wgcf-profile.conf
  • 用 wgcf trace 检查 Warp/Warp+ 是否生效
  • 生成配置时可选开启 PersistentKeepalive 保活

容易踩的坑

生成的配置默认 MTU 为 1280,速度不理想可尝试调高;绑定 Warp+ 前若曾连接过 Warp VPN 需先重新 register 再立即绑定,否则受 Cloudflare 已知 bug 影响;仅支持官方 1.1.1.1 应用直接购买的订阅密钥,推荐码等方式获取的密钥无效

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.3.1
  1. v2.3.1最新正式版2026-10-11 · 2026-10-11 23:40 UTC

    2.3.1 (2026-10-11)

    Bug Fixes

    • make SourceDevice key_type and tunnel_type optional (3ae65b0)
  2. v2.3.02026-09-18 · 2026-09-18 18:00 UTC
    查看更新说明

    2.3.0 (2026-09-18)

    Features

    • add keepalive optional flag and generation (833a541)

    Bug Fixes

    • deps: bump docker/login-action from 4.4.0 to 4.6.0 (5f14968)
    • humanize credential input errors (f4b0b1a)
    • update api to v0a5641 and pin tls fingerprint, closes #626 (803310a)
    • validate keepalive interval (f115390)
  3. v2.2.322026-07-23 · 2026-07-23 17:30 UTC
    查看更新说明

    2.2.32 (2026-07-23)

    Bug Fixes

  4. v2.2.312026-05-23 · 2026-05-23 10:49 UTC
    查看更新说明

    2.2.31 (2026-05-23)

    Bug Fixes

  5. v2.2.302026-01-07 · 2026-01-07 17:41 UTC
    查看更新说明

    2.2.30 (2026-01-07)

    Bug Fixes

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    wgcf

    wgcf is an unofficial, cross-platform CLI for Cloudflare Warp

    Features

    • Register new account
    • Change license key to use existing Warp+ subscription
    • Generate WireGuard profile
    • Check account status
    • Print trace information to debug Warp/Warp+ status

    Download

    You can find pre-compiled binaries on the releases page.

    Usage

    Run wgcf in a terminal without any arguments to display the help screen. All commands and parameters are documented.

    Register new account

    Run the following command in a terminal:

    wgcf register
    

    The new account will be saved under wgcf-account.toml

    Generate WireGuard profile

    Run the following command in a terminal:

    wgcf generate
    

    The WireGuard profile will be saved under wgcf-profile.conf. For more information on how to use it, please check the official WireGuard Quick Start.

    To send periodic packets that keep NAT mappings alive, use the optional keepalive flag:

    wgcf generate --keepalive       # defaults to 25 seconds
    wgcf generate --keepalive=60    # uses the specified interval
    

    This adds PersistentKeepalive to the profile's [Peer] section. The setting is omitted by default.

    Maximum transmission unit (MTU)

    To ensure maximum compatibility, the generated profile will have a MTU of 1280, just like the official Android app. If you are experiencing performance issues, you may be able to improve your speed by increasing this value. For more information, please check #40.

    Add a license key

    If you have an existing Warp+ subscription, for example on your phone, you can bind the account generated by this tool to your phone's account, sharing its Warp+ status. Please note that there is a limit of 5 maximum devices linked at a time. You can remove linked devices from the 1.1.1.1 app on your phone.

    [!CAUTION] Only subscriptions purchased directly from the official 1.1.1.1 app are supported. Keys obtained by any other means, including referrals, will not work and will not be supported.

    First, get your Warp+ account license key. To view it on Android:

    1. Open the 1.1.1.1 app
    2. Click on the hamburger menu button in the top-right corner
    3. Navigate to: Account > Key

    Now, back to wgcf.

    [!WARNING] There's a bug on Cloudflare's side that prevents existing accounts from getting Warp+ even after you bind a correct license key. If you have ever connected to Warp VPN, then your account is affected. You will need to make a new account via:

    wgcf register
    

    Then immediately proceed with the steps below, without running any other commands. For more details, check !85

    Run the following commands:

    wgcf update --license-key "YOUR_LICENSE_KEY_GOES_HERE"
    wgcf generate
    

    Check device status

    Run the following command in a terminal:

    wgcf status
    

    Verify Warp/Warp+ works

    Connect to the WireGuard profile generated by this tool, then run:

    wgcf trace
    

    If you look at the last line, it should say warp=on or warp=plus, depending on whether you have Warp or Warp+ respectively.

    [!WARNING] If you're seeing warp=on even after you bound a Warp+ license key, you are likely experiencing a known bug, please refer to the Add a license key section.

    Development

    The API client code is auto-generated from the OpenAPI spec openapi-spec.yml and stored under the openapi/ package. Do not touch any code under that package, instead, change the spec file and regenerate the API client code. To do this, install openapi-generator, then run:

    go generate
    

    Notice of Non-Affiliation and Disclaimer

    We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with Cloudflare, or any of its subsidiaries or its affiliates. The official Cloudflare website can be found at https://www.cloudflare.com/.

    The names Cloudflare Warp and Cloudflare as well as related names, marks, emblems and images are registered trademarks of their respective owners.