Preparatory steps:

  1. Install the official client
  2. Use wgcf to convert to a WireGuard profile
  3. Settings WireGuard client
  4. Other: Find endpoints in CN 🇨🇳

Install the official client

Client download: 🔗 Link

Use wgcf to convert to a WireGuard profile

Install a warp unofficial, cross-platform CLI wgcf

wgcf project: https://github.com/ViRb3/wgcf

I’m using the Mac, so just use 🍺 Homebrew to install it.

brew install wgcf

Use cd to enter the directory where you want to store the config file (in case you can’t find it😞

Register wgcf

wgcf register

The command mentioned above will generate a wgcf-account.toml file in the current directory.

Run the following command in a terminal:

wgcf generate

The WireGuard profile will be saved under wgcf-profile.conf.

Getting the License Key in CloudFlare WARP

⚙︎ → Preferences → Account → License Key

Untitled

Untitled

Edit wgcf-account.toml directly with the new license key and run:

wgcf update

or, using an environment variable:

WGCF_LICENSE_KEY="Your License Key" wgcf update

The license will be applied, and a new private key will be created for your account.

Okay, now you have all the setup content you need to use. ✅

Settings WireGuard client

open the wgcf-profile.conf file.

[Interface]
PrivateKey = ***
Address = 172.16.0.2/32
Address = 2606:4700:110:8804:f095:3189:b06c:f68f/128
DNS = 1.1.1.1
MTU = 1280
[Peer]
PublicKey = ***
AllowedIPs = 0.0.0.0/0
AllowedIPs = ::/0
Endpoint = engage.cloudflareclient.com:2408

I set on Shadowrocket app

Untitled

Fill the text field with the values in wgcf-profile.conf

Done! 🚀

Other: Find endpoints in CN 🇨🇳

The official domain name used at CN has been affected by DNS pollution.

engage.cloudflareclient.com:2408

To access it properly, you need to find an endpoint.

Here we use MisakaNo’s method to find the Endpoint.

macOS/Linux:

Run this command

wget -N https://gitlab.com/Misaka-blog/warp-script/-/raw/main/files/warp-yxip/warp-yxip.sh && bash warp-yxip.sh

Windows:

You’ll get a list and a csv document for Endpoint, just pick the one that works.

Good luck 🍀