170 lines
6.3 KiB
Markdown
170 lines
6.3 KiB
Markdown
# services.proxy-suite.warp
|
||
|
||
Cloudflare WARP, as an outbound or an AmneziaWG profile.
|
||
|
||
Part of the [proxy-suite options reference](./index.md).
|
||
|
||
## Options
|
||
|
||
- warp
|
||
- [enable](#services-proxy-suite-warp-enable)
|
||
- [asAmneziaWg](#services-proxy-suite-warp-asamneziawg)
|
||
- [asOutbound](#services-proxy-suite-warp-asoutbound)
|
||
- [autostart](#services-proxy-suite-warp-autostart)
|
||
- [configFile](#services-proxy-suite-warp-configfile)
|
||
- [devices](#services-proxy-suite-warp-devices)
|
||
- `<name>`
|
||
- [configFile](#services-proxy-suite-warp-devices-name-configfile)
|
||
- [endpoint](#services-proxy-suite-warp-devices-name-endpoint)
|
||
- [domainStrategy](#services-proxy-suite-warp-domainstrategy)
|
||
- [endpoint](#services-proxy-suite-warp-endpoint)
|
||
- [generatorUrl](#services-proxy-suite-warp-generatorurl)
|
||
- group
|
||
- [failback](#services-proxy-suite-warp-group-failback)
|
||
- [strategy](#services-proxy-suite-warp-group-strategy)
|
||
- [instances](#services-proxy-suite-warp-instances)
|
||
|
||
<a id="services-proxy-suite-warp-enable"></a>
|
||
## services\.proxy-suite\.warp\.enable
|
||
|
||
Run Cloudflare WARP\. Also set ` asOutbound ` or ` asAmneziaWg `\.
|
||
|
||
**Type:** boolean\
|
||
**Default:** `false`
|
||
|
||
<a id="services-proxy-suite-warp-asamneziawg"></a>
|
||
## services\.proxy-suite\.warp\.asAmneziaWg
|
||
|
||
Add a global AmneziaWG profile named “warp” (` proxy-ctl awg on warp `)\. Needs
|
||
` amneziaWg.enable `\. Cannot be used with ` asOutbound `\.
|
||
|
||
**Type:** boolean\
|
||
**Default:** `false`
|
||
|
||
<a id="services-proxy-suite-warp-asoutbound"></a>
|
||
## services\.proxy-suite\.warp\.asOutbound
|
||
|
||
Add WARP as an outbound tagged “warp”\.
|
||
|
||
- “singBox”: plain WireGuard in sing-box, ignoring AmneziaWG fields\. Restarts itself when
|
||
WARP stops answering\.
|
||
- “userspace”: an AmneziaWG profile, without root\. Needs ` amneziaWg.enable `\.
|
||
- “interface”: an AmneziaWG profile with its own interface\. Needs ` amneziaWg.enable `\.
|
||
|
||
**Type:** null or one of “singBox”, “userspace”, “interface”\
|
||
**Default:** `null`
|
||
|
||
<a id="services-proxy-suite-warp-autostart"></a>
|
||
## services\.proxy-suite\.warp\.autostart
|
||
|
||
Bring the “warp” AmneziaWG profile up at boot, as ` autostart ` of an ` amneziaWg ` profile
|
||
does\. Needs ` asAmneziaWg `\. Only one global mode can autostart\.
|
||
|
||
**Type:** boolean\
|
||
**Default:** `false`
|
||
|
||
<a id="services-proxy-suite-warp-configfile"></a>
|
||
## services\.proxy-suite\.warp\.configFile
|
||
|
||
File with a WARP WireGuard profile, from ` wgcf register && wgcf generate `\. AmneziaWG
|
||
fields in it only take effect in the AmneziaWG modes\.
|
||
|
||
` null `: register a new device with wgcf on first start (accepting Cloudflare’s terms),
|
||
through the local proxy if enabled\. WARP does not work until that succeeds\.
|
||
|
||
**Type:** null or string\
|
||
**Default:** `null`\
|
||
**Example:** `"/run/secrets/wgcf-profile.conf"`
|
||
|
||
<a id="services-proxy-suite-warp-devices"></a>
|
||
## services\.proxy-suite\.warp\.devices
|
||
|
||
Several WARP devices, each registered on its own and each an outbound with its tag\. With
|
||
two or more, the tag “warp” names a group of them (` warp.group `), so rules, pins and
|
||
chains naming “warp” fail over between them\. A device cannot be named “warp” then\.
|
||
With “interface”, a tag holds at most 11 characters (its interface is awg-\<tag>)\.
|
||
|
||
Empty: one device, “warp”, as ` configFile ` and ` endpoint ` above say\.
|
||
|
||
**Type:** attribute set of (submodule)\
|
||
**Default:** `{ }`\
|
||
**Example:** `{ warp-a = { }; warp-b.endpoint = "162.159.193.10:500"; } `
|
||
|
||
<a id="services-proxy-suite-warp-devices-name-configfile"></a>
|
||
## services\.proxy-suite\.warp\.devices\.\<name>\.configFile
|
||
|
||
This device’s WireGuard profile, as ` warp.configFile `\. ` null `: registered with wgcf\.
|
||
|
||
**Type:** null or string\
|
||
**Default:** `null`\
|
||
**Example:** `"/run/secrets/warp-b.conf"`
|
||
|
||
<a id="services-proxy-suite-warp-devices-name-endpoint"></a>
|
||
## services\.proxy-suite\.warp\.devices\.\<name>\.endpoint
|
||
|
||
This device’s endpoint, as ` warp.endpoint ` (which it defaults to)\.
|
||
|
||
**Type:** null or string matching the pattern (\\\[\[0-9A-Fa-f:\.]+]|\[^]:\[]+):\[0-9]+\
|
||
**Default:** `null`\
|
||
**Example:** `"162.159.192.1:500"`
|
||
|
||
<a id="services-proxy-suite-warp-domainstrategy"></a>
|
||
## services\.proxy-suite\.warp\.domainStrategy
|
||
|
||
Which address family the “warp” outbound dials a name over first\. Ignored with
|
||
` asOutbound = "userspace" `\. Also applies to names resolved by the inbounds’
|
||
` routing.blockPrivate ` check, unless ` proxy.dns.strategy ` is set\.
|
||
|
||
**Type:** null or one of “prefer_ipv4”, “prefer_ipv6”, “ipv4_only”, “ipv6_only”\
|
||
**Default:** `if config.networking.enableIPv6 then "prefer_ipv6" else "prefer_ipv4"`\
|
||
**Example:** `"prefer_ipv4"`
|
||
|
||
<a id="services-proxy-suite-warp-endpoint"></a>
|
||
## services\.proxy-suite\.warp\.endpoint
|
||
|
||
host:port (IPv6 in brackets) to use instead of the profile’s endpoint, if the default one
|
||
is blocked: another Cloudflare address, another WARP port (500, 1701, 4500, …), or a relay\.
|
||
|
||
**Type:** null or string matching the pattern (\\\[\[0-9A-Fa-f:\.]+]|\[^]:\[]+):\[0-9]+\
|
||
**Default:** `null`\
|
||
**Example:** `"162.159.192.1:500"`
|
||
|
||
<a id="services-proxy-suite-warp-generatorurl"></a>
|
||
## services\.proxy-suite\.warp\.generatorUrl
|
||
|
||
URL of a WARP profile generator, used if wgcf registration fails (for example, when the
|
||
Cloudflare API is blocked)\. It must return a WireGuard profile, or JSON with the base64
|
||
profile in ` .content `\.
|
||
|
||
Its operator sees your private key\.
|
||
|
||
**Type:** null or string\
|
||
**Default:** `null`\
|
||
**Example:** `"https://valokda-amnezia.vercel.app/api/warp?mode=awg2"`
|
||
|
||
<a id="services-proxy-suite-warp-group-failback"></a>
|
||
## services\.proxy-suite\.warp\.group\.failback
|
||
|
||
With “failover”: go back to an earlier device once it works again\.
|
||
|
||
**Type:** boolean\
|
||
**Default:** `true`
|
||
|
||
<a id="services-proxy-suite-warp-group-strategy"></a>
|
||
## services\.proxy-suite\.warp\.group\.strategy
|
||
|
||
How the “warp” group of several devices picks one; see ` proxy.groups `\.
|
||
|
||
**Type:** one of “failover”, “urltest”, “selector”\
|
||
**Default:** `"failover"`
|
||
|
||
<a id="services-proxy-suite-warp-instances"></a>
|
||
## services\.proxy-suite\.warp\.instances
|
||
|
||
Shorthand for ` devices `: this many WARP devices, warp-1 to warp-N, each registered with
|
||
wgcf\. warp-1 keeps the registration a single “warp” device made\. Not with ` devices `\.
|
||
|
||
**Type:** null or (positive integer, meaning >0)\
|
||
**Default:** `null`\
|
||
**Example:** `2`
|