Documentation
¶
Overview ¶
Package warp registers a free Cloudflare WARP account and returns the WireGuard parameters Xray needs to use it as an outbound. The flow mirrors wgcf: generate a Curve25519 keypair, POST the public key to Cloudflare's device-registration API, and read back the assigned addresses + client id.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
PrivateKey string // our WG secret key (base64), used as Xray secretKey
PeerPublicKey string // Cloudflare's WG public key (base64)
Endpoint string // host:port of the WARP peer
AddressV4 string // assigned interface IPv4 (no mask)
AddressV6 string // assigned interface IPv6 (no mask)
Reserved []int // 3-byte client id, Xray's "reserved"
}
Account holds everything needed to build a WireGuard outbound to WARP.
Click to show internal directories.
Click to hide internal directories.