docs(config): make the configuration reference the one owner of every option table

This commit is contained in:
imSp4rky
2026-12-04 18:02:28 -07:00
parent ec6a48f8c0
commit 2f8e2aba37
16 changed files with 555 additions and 659 deletions
+37 -113
View File
@@ -15,10 +15,9 @@ a query to a real proxy URL: [basic static proxies](#basic-static-proxies),
!!! note "Where proxies are configured"
All proxy provider configuration lives under the top-level `proxy_providers:`
config key in your `unshackle.yaml`. Each proxy provider has its own sub-key, and
the config keys inside it map directly onto that proxy provider's settings. See the
[Configuration file](../getting-started/configuration-file.md) page for where the
file lives and how unshackle loads it.
config key in your `unshackle.yaml`. Each proxy provider has its own sub-key. The
[`proxy_providers` reference](../reference/configuration/network.md#proxy_providers) lists the config keys of each
proxy provider, with their types and defaults.
## The `--proxy` flag
@@ -154,9 +153,9 @@ such as `--proxy nordvpn:us`, fails and shows the reason it did not load.
!!! note "Auto-loading providers"
Most providers only load when you configure them under `proxy_providers:`. Three are
special: **ExpressVPN** and **Proton VPN** also load automatically once their cache
file exists on disk (even with no YAML), and **Hola** loads automatically
whenever the `hola-proxy` binary is found on your `PATH`.
special: **ExpressVPN** also loads once its token cache exists on disk (even with no
YAML), **Proton VPN** once its cookie file exists, and **Hola**
whenever unshackle finds the `hola-proxy` binary.
### Connection feedback
@@ -385,8 +384,7 @@ proxy_providers:
- If a country has a single proxy string, that proxy is always returned.
- If it has a list and you give a plain country code, unshackle picks one at random.
Append an index (`de1`, `de2`) to pin a specific entry.
- unshackle normalises each URL (a missing scheme defaults to `http`) and validates it,
so it rejects a malformed URI up front and does not fail mid-download.
- See the [`basic` reference](../reference/configuration/network.md#basic) for the URI rules.
```shell
unshackle dl --proxy de2 EXAMPLE 81234567
@@ -617,25 +615,13 @@ unshackle normalises friendly names to Gluetun's identifiers (for example `pia`
### Configuration
Each VPN provider you want to use gets an entry under `providers:`, carrying its VPN type,
credentials, and how your region aliases map onto Gluetun's server selectors.
Each VPN provider you want to use gets an entry under `providers:`, with its VPN type, its
credentials, and how your region aliases map onto Gluetun's server selectors:
```yaml title="unshackle.yaml"
proxy_providers:
gluetun:
providers:
windscribe:
vpn_type: wireguard
credentials:
private_key: YOUR_WIREGUARD_PRIVATE_KEY
addresses: YOUR_WIREGUARD_ADDRESS
preshared_key: YOUR_PRESHARED_KEY
server_countries:
us: US
uk: GB
server_cities: {}
server_hostnames: {}
extra_env: {}
nordvpn:
vpn_type: wireguard
credentials:
@@ -643,59 +629,19 @@ proxy_providers:
server_countries:
us: US
de: DE
# Global settings (all optional)
base_port: 8888
auto_cleanup: true
container_prefix: unshackle-gluetun
auth_user: null
auth_password: null
verify_ip: true
```
**Per-provider keys:**
| Key | Purpose |
|---|---|
| `vpn_type` | `wireguard` (default) or `openvpn`. |
| `credentials` | The secrets for the tunnel; see the credential rules below. |
| `server_countries` | Maps your region alias (e.g. `us`) to Gluetun's country value (e.g. `US`). |
| `server_cities` | Optional. Maps an alias to a Gluetun city. |
| `server_hostnames` | Optional. Maps an alias directly to a specific server hostname. |
| `extra_env` | Optional. Raw environment variables merged into the container last, for any Gluetun setting not covered above. |
**Credential rules by VPN type:**
=== "WireGuard"
- `private_key` is **always** required.
- `surfshark`, `mullvad`, and `ivpn` also require `addresses`.
- `windscribe` additionally requires **both** `addresses` and `preshared_key`
(`preshared_key` may be an empty string, but the config key must be present).
Get both from the [Windscribe WireGuard config generator](https://windscribe.com/getconfig/wireguard).
- NordVPN and Proton VPN need only `private_key`.
=== "OpenVPN"
- Requires `username` and `password`.
The [`gluetun` reference](../reference/configuration/network.md#gluetun) lists every config key of an entry, the global config keys
(`base_port`, `auto_cleanup`, `verify_ip` and others) and the credentials that each VPN
provider needs. For Windscribe WireGuard, get `addresses` and `preshared_key` from the
[Windscribe WireGuard config generator](https://windscribe.com/getconfig/wireguard).
!!! tip "Which `vpn_type` should I pick?"
WireGuard is the default because it **can be faster**, but it needs the fiddlier
credential setup above (private keys, and for some providers `addresses` and a
`preshared_key`). OpenVPN is the **simplest** to configure (only a username and
password) at the cost of some speed. If you start out, or if you have credential
trouble, OpenVPN is the path of least resistance. Switch to WireGuard when you want
the extra throughput.
**Global keys:**
| Key | Default | Purpose |
|---|---|---|
| `base_port` | `8888` | The first local port to expose proxies on. Additional containers take the next free ports. |
| `auto_cleanup` | `true` | Remove containers on exit. If `false`, containers are only stopped, not deleted. |
| `container_prefix` | `unshackle-gluetun` | Prefix for Docker container names. |
| `auth_user` / `auth_password` | `null` | Optional HTTP-proxy credentials. If set, the local proxy requires auth and the credentials are embedded in the proxy URL. |
| `verify_ip` | `true` | After connecting, verify the container's real exit IP and region. |
WireGuard is the default because it **can be faster**, but it needs more credential
setup (private keys, and for some providers `addresses` and a `preshared_key`).
OpenVPN is the **simplest** to configure (only a username and password) at the cost of
some speed. If you start out, or if you have credential trouble, use OpenVPN. Switch to
WireGuard when you want the extra throughput.
### Region selection
@@ -794,13 +740,8 @@ proxy_providers:
myserver: usny-newyork-2
```
**Default file location:**
| File | Default path |
|---|---|
| Token cache | `{cache}/vpn/expressvpn_tokens.json` |
Where `{cache}` is your configured cache directory.
The [`expressvpn` reference](../reference/configuration/network.md#expressvpn) lists every config key and the default
path of the token cache.
**Query forms:**
@@ -815,10 +756,6 @@ Where `{cache}` is your configured cache directory.
The resolved proxy is an HTTPS proxy on port `443`. On success, unshackle prints a
location summary such as `(USA - New York, #3 of 5): .214`.
!!! note "Cache safety"
unshackle writes ExpressVPN's token cache with `0600` permissions, so the refresh
token is never briefly world-readable.
## NordVPN
NordVPN uses your **Service Credentials**, not your normal NordVPN login. Make them
@@ -835,12 +772,10 @@ proxy_providers:
us:seattle: 5678
```
**Required keys:** `username`, `password`. unshackle validates them up front: the
combined username and password must be exactly 48 alphanumeric characters (case-insensitive), and
the username must not contain an `@`. If validation fails, you have almost certainly used
your login credentials instead of your service credentials.
unshackle checks the credentials when it loads: login credentials fail the check of the
[`nordvpn` reference](../reference/configuration/network.md#nordvpn).
`server_map` is optional and maps a region (or `code:city`) to a pinned NordVPN server ID, or to a
`server_map` is optional and pins a region to a NordVPN server ID, or to a
selector (see [Choose a server network](#choose-a-server-network)).
Its main use is to tune performance: for a given streaming service one specific server
often performs noticeably better than NordVPN's recommended pick. So you can hard-code
@@ -908,15 +843,8 @@ that free Proton accounts work, but Proton limits them to its free-tier exit cou
the sign-in lapses at Proton's ~24h TTL and you must export it again. This is
exactly why TV login is the better method for set-and-forget use.
**Default file locations:**
| File | Default path |
|---|---|
| Cookies | `{cookies}/vpn/protonvpn.txt` |
| Session cache | `{cache}/vpn/protonvpn.json` |
Proton VPN **auto-loads** if its cookie file exists. Like ExpressVPN, unshackle writes
its cache file with `0600` permissions.
The [`protonvpn` reference](../reference/configuration/network.md#protonvpn) lists every config key and the default paths
of the cookie file and the TV login cache.
!!! note "Cache vs cookie precedence"
If both a TV-login cache and a cookie file exist, unshackle **prefers the cache**
@@ -980,14 +908,11 @@ proxy_providers:
us:seattle: us-sea
```
**Required keys:** `username`, `password`, validated with the same 48-character rule as
NordVPN (combined username+password must be 48 alphanumeric characters, case-insensitive, no `@`).
unshackle checks the credentials with the same [48-character rule](../reference/configuration/network.md#nordvpn) as NordVPN.
`server_map` optionally pins a server per region, or holds a selector (see
[Choose a server network](#choose-a-server-network)). Give the server name from Surfshark's
server list, for example `us-dal`. A full hostname such as `us-dal.prod.surfshark.com` also
works. Surfshark does not use numeric server IDs. unshackle ignores a numeric or empty value
and logs a warning. A `us:seattle` entry applies only to that city query, and it does not
fall back to the `us` entry.
server list, for example `us-dal`; Surfshark has no numeric server IDs. The
[`surfsharkvpn` reference](../reference/configuration/network.md#surfsharkvpn) gives the value rules.
**Query forms:**
@@ -1021,9 +946,10 @@ Surfshark configuration. This needs the `server_proxy` grant on your API key.
## Windscribe
Windscribe uses **Service Credentials** from its
[OpenVPN config page](https://windscribe.com/getconfig/openvpn). unshackle only makes
sure that a username and a password are present (there is no 48-character rule).
Windscribe uses its proxy **Service Credentials**, which Windscribe issues through its
`ServerCredentials` API. The OpenVPN and IKEv2 credentials of Windscribe's config
generator pages do not work on the proxy: it refuses them with `407`. unshackle only makes
sure that a username and a password are present.
```yaml title="unshackle.yaml"
proxy_providers:
@@ -1035,9 +961,9 @@ proxy_providers:
us:seattle: us-seattle.totallyacdn.com
```
**Required keys:** `username`, `password`. `server_map` optionally takes a selector (see
`server_map` optionally takes a selector (see
[Choose a server network](#choose-a-server-network)), or maps a region (or
`region:city`) directly to a hostname.
`region:city`) directly to a hostname. See the [`windscribevpn` reference](../reference/configuration/network.md#windscribevpn).
**Query forms:**
@@ -1101,8 +1027,6 @@ The returned proxy is HTTPS on **port 443**.
- [Downloading](downloading.md): the full `dl` command guide, including where proxy
flags sit in the download flow.
- [Configuration file](../getting-started/configuration-file.md): the `unshackle.yaml`
reference, including directories for cookies and cache used by the cookie-based
providers.
- [Configuration reference](../reference/api/config.md): the developer-facing
configuration API, including the `proxy_providers` structure.
- [Network & proxy reference](../reference/configuration/network.md): every `proxy_providers` config key.
- [Directories](../reference/configuration/directories.md): the cookies and cache
directories that the cookie-based providers use.