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
+154 -17
View File
@@ -60,23 +60,24 @@ headers:
- **Type:** `dict`  ·  **Default:** `{}`
Proxy/VPN provider configuration. Each sub-key names a proxy provider, and unshackle passes its
block straight to that provider's constructor. A bare `--proxy` query tries Basic first, then
the other proxy providers in the order of their sub-keys, and Control D last (see
[Provider load order](../../guide/proxies-and-vpn.md#provider-load-order)). See
[Proxies & VPN](../../guide/proxies-and-vpn.md) for the full proxy provider guide. Recognised proxy
providers and their exit ports:
Proxy provider configuration. Each sub-key names a proxy provider, and unshackle passes its
block to the constructor of that proxy provider, so each config key below is a constructor
argument. Except for `basic` and `gluetun`, a config key that the proxy provider does not know
stops it from loading. The order of the sub-keys sets the order of a bare `--proxy` query (see
[Provider load order](../../guide/proxies-and-vpn.md#provider-load-order)). How to set up each
proxy provider and the queries it accepts are in [Proxies & VPN](../../guide/proxies-and-vpn.md).
Recognised proxy providers and their exit ports:
| Provider | Config key | Credentials | Proxy scheme/port |
|----------|-----------|-------------|-------------------|
| Basic (static) | `basic` | country → URI(s) | as specified |
| Control D | `controld` | Write API token (profile/resolver pairs optional) | `http://127.0.0.1:{port}` (local forwarder) |
| NordVPN | `nordvpn` | **service** credentials (48 chars combined) | `https://...:89` |
| Surfshark | `surfsharkvpn` | **service** credentials (48 chars combined) | `https://...:443` |
| Windscribe | `windscribevpn` | service credentials | `https://...:443` |
| ExpressVPN | `expressvpn` | device login (`enable: true`) / token cache | `https://cat:...@...:443` |
| ProtonVPN | `protonvpn` | TV login or exported cookies | `https://...:4443` (or `:443` Secure Core) |
| Gluetun | `gluetun` | per-VPN keys/creds | `http://localhost:{port}` (local Docker) |
| Basic (static) | [`basic`](#basic) | country → URI(s) | as specified |
| Control D | [`controld`](#controld) | Write API token (profile/resolver pairs optional) | `http://127.0.0.1:{port}` (local forwarder) |
| NordVPN | [`nordvpn`](#nordvpn) | **service** credentials (48 chars combined) | `https://...:89` |
| Surfshark | [`surfsharkvpn`](#surfsharkvpn) | **service** credentials (48 chars combined) | `https://...:443` |
| Windscribe | [`windscribevpn`](#windscribevpn) | service credentials | `https://...:443` |
| ExpressVPN | [`expressvpn`](#expressvpn) | device login (`enable: true`) / token cache | `https://cat:...@...:443` |
| ProtonVPN | [`protonvpn`](#protonvpn) | TV login or exported cookies | `https://...:4443` (or `:443` Secure Core) |
| Gluetun | [`gluetun`](#gluetun) | per-VPN keys/creds | `http://localhost:{port}` (local Docker) |
| Hola | *(none, auto)* | none | `http://...:{peer}` |
```yaml
@@ -91,7 +92,23 @@ proxy_providers:
password: <service password>
```
### `controld`
### `basic` { #basic }
Each config key is a two-letter country code, and its value is one proxy URI or a list of
proxy URIs. unshackle adds `http://` to a URI with no scheme. A URI with no host fails when a
query picks it, before the download starts. See [Basic](../../guide/proxies-and-vpn.md#basic-static-proxies)
for the queries.
```yaml
proxy_providers:
basic:
us: http://user:pass@1.2.3.4:8080
de:
- http://a.example:8080
- socks5://b.example:1080
```
### `controld` { #controld }
Config keys of the Control D proxy provider. See
[Control D](../../guide/proxies-and-vpn.md#control-d) for how unshackle uses them.
@@ -104,8 +121,128 @@ Config keys of the Control D proxy provider. See
| `profiles` | `list` | `[]` | Optional. More pairs, each a mapping with `profile` and `resolver`. |
| `max_profiles` | `int` | `4` | The most profiles unshackle uses: your pairs plus the `unshackle-*` endpoints on the account. It must be 1 or more. unshackle creates an `unshackle-<region>` profile and endpoint only while the total is lower. |
### `expressvpn` { #expressvpn }
| Key | Type | Default | Meaning |
|---|---|---|---|
| `enable` | `bool` | `false` | Do the one-time interactive device login when no login session exists. |
| `region_map` | `dict` | `{}` | A country code to a city or server preset (`us: ny-02`), used when the query names only the country. An empty value gives a smart random location. |
| `server_map` | `dict` | `{}` | An alias to a location slug (`usny-newyork-2`) or a `.expressprovider.com` hostname. |
| `cache_path` | `str` | `{cache}/vpn/expressvpn_tokens.json` | The token cache. unshackle writes it with `0600` permissions. |
| `refresh_token`, `access_token`, `connection_token` | `str` | none | Tokens to use in place of the token cache. |
| `account_json` | `str` | none | A JSON file to read the tokens from when there is no token cache. |
| `timeout` | `float` | `10.0` | The request timeout in seconds. |
`{cache}` is [`directories.cache`](directories.md). ExpressVPN also loads with no config block
when its token cache exists.
### `gluetun` { #gluetun }
```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: {}
base_port: 8888
auto_cleanup: true
container_prefix: unshackle-gluetun
auth_user: null
auth_password: null
verify_ip: true
```
Global keys:
| Key | Type | Default | Meaning |
|---|---|---|---|
| `providers` | `dict` | `{}` | One entry for each VPN provider, keyed by its name in the query (`gluetun:<vpn-provider>:<region>`). |
| `base_port` | `int` | `8888` | The first local port for a proxy. Other containers take the next free ports. |
| `auto_cleanup` | `bool` | `true` | Remove the containers on exit. With `false`, unshackle only stops them. |
| `container_prefix` | `str` | `unshackle-gluetun` | The prefix of the Docker container names. |
| `auth_user`, `auth_password` | `str` | `null` | HTTP proxy credentials. When set, the local proxy asks for them, and the proxy URI holds them. |
| `verify_ip` | `bool` | `true` | After the connection, check the exit IP and its country. |
Keys of each entry under `providers`:
| Key | Type | Default | Meaning |
|---|---|---|---|
| `vpn_type` | `str` | `wireguard` | `wireguard` or `openvpn`. |
| `credentials` | `dict` | `{}` | The secrets of the tunnel; see the rules below. |
| `server_countries` | `dict` | `{}` | Your region alias (`us`) to Gluetun's country value (`US`). |
| `server_cities` | `dict` | `{}` | An alias to a Gluetun city. |
| `server_hostnames` | `dict` | `{}` | An alias to one server hostname. |
| `extra_env` | `dict` | `{}` | Environment variables that go into the container last, for a Gluetun setting that the keys above do not cover. |
Credentials that each `vpn_type` needs (unshackle checks them when it loads):
- **`wireguard`:** `private_key` always. `surfshark`, `mullvad` and `ivpn` also need
`addresses`. `windscribe` needs `addresses` and `preshared_key`; `preshared_key` can be an
empty string, but the config key must be there. NordVPN and Proton VPN need only `private_key`.
- **`openvpn`:** `username` and `password`.
### `nordvpn` { #nordvpn }
| Key | Type | Default | Meaning |
|---|---|---|---|
| `username` | `str` | required | The NordVPN *Service Credentials* username. |
| `password` | `str` | required | The *Service Credentials* password. |
| `server_map` | `dict` | `{}` | A region (`us`) or `code:city` (`us:seattle`) to a NordVPN server ID, or to an `@` selector (see [Choose a server network](../../guide/proxies-and-vpn.md#choose-a-server-network)). |
The username and the password together must be 48 letters and digits, and the username must not
contain `@`. Login credentials fail this check.
### `protonvpn` { #protonvpn }
| Key | Type | Default | Meaning |
|---|---|---|---|
| `enable` | `bool` | `false` | Do the one-time interactive TV login when no login session exists. |
| `server_map` | `dict` | `{}` | An alias to a server query. |
| `cookie_path` | `str` | `{cookies}/vpn/protonvpn.txt` | The exported `account.proton.me` cookies. |
| `cache_path` | `str` | `{cache}/vpn/protonvpn.json` | The TV login cache. unshackle writes it with `0600` permissions. |
| `timeout` | `float` | `10.0` | The request timeout in seconds. |
`{cookies}` and `{cache}` are [`directories.cookies`](directories.md) and
`directories.cache`. unshackle also finds the cookie file as `proton.txt`, and in a `vpns`
folder. Proton VPN also loads with no config block when the cookie file exists. A TV login cache
alone does not load it, so keep the `protonvpn` block for a TV login.
### `surfsharkvpn` { #surfsharkvpn }
| Key | Type | Default | Meaning |
|---|---|---|---|
| `username` | `str` | required | The Surfshark *Service Credentials* username. |
| `password` | `str` | required | The *Service Credentials* password. |
| `server_map` | `dict` | `{}` | A region (`us`) or `code:city` (`us:seattle`) to a Surfshark server name (`us-dal`, or the full hostname `us-dal.prod.surfshark.com`), or to an `@` selector. unshackle ignores a numeric or empty value with a warning. A city query uses only its `code:city` entry, never the country entry. |
The username and the password must pass the same 48-character check as `nordvpn`.
### `windscribevpn` { #windscribevpn }
| Key | Type | Default | Meaning |
|---|---|---|---|
| `username` | `str` | required | The username of the Windscribe proxy *Service Credentials*. |
| `password` | `str` | required | The password of the proxy *Service Credentials*. |
| `server_map` | `dict` | `{}` | A region (`us`) or `region:city` (`us:seattle`) to a hostname, or to an `@` selector. |
There is no 48-character check.
### Hola { #hola }
Hola has no config key. It loads when unshackle finds the `hola-proxy` binary, in its binaries folders or on your `PATH`.
!!! note "Provider loading differs between CLI and REST server"
The `dl` and `search` commands load all providers, including `gluetun`. A server (REST API
requests, download jobs and remote sessions) and the remote client do **not** load `gluetun`,
because it starts a local Docker container. ExpressVPN and ProtonVPN also auto-load when their cached session exists, and Hola
auto-loads whenever the `hola-proxy` binary is present.
because it starts a local Docker container. ExpressVPN, Proton VPN and Hola can also load with no config block
(see [`expressvpn`](#expressvpn), [`protonvpn`](#protonvpn) and [Hola](#hola)).