Deployed 87b58190 with MkDocs version: 1.6.1

This commit is contained in:
2026-12-05 03:00:15 +00:00
parent 56cac92f20
commit 6ed040a6dd
44 changed files with 17665 additions and 13063 deletions
+248 -396
View File
@@ -347,28 +347,6 @@
<li class="md-tabs__item">
<a href="../../reference/api/service/" class="md-tabs__link">
API Reference
</a>
</li>
</ul>
</div>
</nav>
@@ -616,6 +594,8 @@
@@ -1175,17 +1155,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#developer-notes" class="md-nav__link">
<span class="md-ellipsis">
Developer notes
</span>
</a>
</li>
<li class="md-nav__item">
@@ -1320,6 +1289,174 @@
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_9" >
<div class="md-nav__link md-nav__container">
<a href="../../dev/rest-api/" class="md-nav__link ">
<span class="md-ellipsis">
Server
</span>
</a>
<label class="md-nav__link " for="__nav_3_9" id="__nav_3_9_label" tabindex="">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_9_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_9">
<span class="md-nav__icon md-icon"></span>
Server
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../dev/rest-api/authentication/" class="md-nav__link">
<span class="md-ellipsis">
Authentication
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../dev/rest-api/dashboard/" class="md-nav__link">
<span class="md-ellipsis">
Dashboard
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../remote-sessions/" class="md-nav__link">
<span class="md-ellipsis">
Remote Sessions
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
@@ -1512,7 +1649,7 @@
<span class="md-ellipsis">
Output & Naming
Output & Naming Options
@@ -1596,7 +1733,7 @@
<span class="md-ellipsis">
Key Vaults
Key Vault Options
@@ -1716,6 +1853,8 @@
@@ -1827,14 +1966,6 @@
@@ -1860,9 +1991,8 @@
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_3" >
<div class="md-nav__link md-nav__container">
<a href="../../dev/rest-api/" class="md-nav__link ">
<label class="md-nav__link" for="__nav_5_3" id="__nav_5_3_label" tabindex="0">
<span class="md-ellipsis">
@@ -1876,14 +2006,8 @@
</a>
<label class="md-nav__link " for="__nav_5_3" id="__nav_5_3_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5_3">
@@ -1897,8 +2021,6 @@
<ul class="md-nav__list" data-md-scrollfix>
@@ -1912,35 +2034,7 @@
<span class="md-ellipsis">
Quick Start
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../dev/rest-api/authentication/" class="md-nav__link">
<span class="md-ellipsis">
Authentication
REST API Quick Start
@@ -2017,14 +2111,14 @@
<li class="md-nav__item">
<a href="../../dev/rest-api/dashboard/" class="md-nav__link">
<a href="../../dev/rest-api/errors/" class="md-nav__link">
<span class="md-ellipsis">
Dashboard
Error Responses
@@ -2052,7 +2146,7 @@
<span class="md-ellipsis">
Remote Sessions
Remote Session Protocol
@@ -2066,55 +2160,20 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../dev/rest-api/errors/" class="md-nav__link">
<span class="md-ellipsis">
Error Responses
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
@@ -2141,17 +2200,17 @@
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_4" >
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
<label class="md-nav__link" for="__nav_5_4" id="__nav_5_4_label" tabindex="0">
<span class="md-ellipsis">
API Reference
Python API
@@ -2162,12 +2221,12 @@
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6">
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5_4">
<span class="md-nav__icon md-icon"></span>
API Reference
Python API
</label>
@@ -2319,6 +2378,14 @@
</li>
</ul>
</nav>
</li>
</ul>
</nav>
@@ -2704,17 +2771,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#developer-notes" class="md-nav__link">
<span class="md-ellipsis">
Developer notes
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2763,10 +2819,9 @@ a query to a real proxy URL: <a href="#basic-static-proxies">basic static proxie
<div class="admonition note">
<p class="admonition-title">Where proxies are configured</p>
<p>All proxy provider configuration lives under the top-level <code>proxy_providers:</code>
config key in your <code>unshackle.yaml</code>. Each proxy provider has its own sub-key, and
the config keys inside it map directly onto that proxy provider's settings. See the
<a href="../../getting-started/configuration-file/">Configuration file</a> page for where the
file lives and how unshackle loads it.</p>
config key in your <code>unshackle.yaml</code>. Each proxy provider has its own sub-key. The
<a href="../../reference/configuration/network/#proxy_providers"><code>proxy_providers</code> reference</a> lists the config keys of each
proxy provider, with their types and defaults.</p>
</div>
<h2 id="the-proxy-flag">The <code>--proxy</code> flag<a class="headerlink" href="#the-proxy-flag" title="Permanent link">&para;</a></h2>
<p>Five options on the <code>dl</code> command control proxying at download time:</p>
@@ -2810,7 +2865,7 @@ file lives and how unshackle loads it.</p>
<p class="admonition-title">Set a default proxy in config</p>
<p>Like every <code>dl</code> flag, you can give <code>--proxy</code> a default in your configuration, so you
do not have to pass it on every command. See
<a href="../downloading/">Downloading</a> for how <code>dl</code> options and config defaults interact.</p>
the <a href="../../reference/configuration/download/#dl"><code>dl</code></a> block for how <code>dl</code> options and config defaults interact.</p>
</div>
<h3 id="-no-proxy-download"><code>--no-proxy-download</code><a class="headerlink" href="#-no-proxy-download" title="Permanent link">&para;</a></h3>
<p>Segment downloads are usually the largest share of traffic, and a residential-grade VPN
@@ -2902,9 +2957,9 @@ directly, prefix the query (<code>--proxy controld:us</code>).</p>
<div class="admonition note">
<p class="admonition-title">Auto-loading providers</p>
<p>Most providers only load when you configure them under <code>proxy_providers:</code>. Three are
special: <strong>ExpressVPN</strong> and <strong>Proton VPN</strong> also load automatically once their cache
file exists on disk (even with no YAML), and <strong>Hola</strong> loads automatically
whenever the <code>hola-proxy</code> binary is found on your <code>PATH</code>.</p>
special: <strong>ExpressVPN</strong> also loads once its token cache exists on disk (even with no
YAML), <strong>Proton VPN</strong> once its cookie file exists, and <strong>Hola</strong>
whenever unshackle finds the <code>hola-proxy</code> binary.</p>
</div>
<h3 id="connection-feedback">Connection feedback<a class="headerlink" href="#connection-feedback" title="Permanent link">&para;</a></h3>
<p>After a proxy provider resolves a query, unshackle prints a line so you can see
@@ -3080,7 +3135,7 @@ network.</p>
<p class="admonition-title">Each request crosses the tunnel twice</p>
<p>A request from the server goes to your machine and then to the service, so it takes
longer than a request that the server sends directly. The segments do not go through the
tunnel: the client downloads them as before.</p>
tunnel: the client downloads them as it does without one.</p>
</div>
<p>A service that uses a server account does not work with <code>--local-proxy</code>, because the server
logs in with its own account. If the tunnel drops, the client connects again, and a new request
@@ -3127,8 +3182,7 @@ them:</p>
<li>If a country has a single proxy string, that proxy is always returned.</li>
<li>If it has a list and you give a plain country code, unshackle picks one at random.
Append an index (<code>de1</code>, <code>de2</code>) to pin a specific entry.</li>
<li>unshackle normalises each URL (a missing scheme defaults to <code>http</code>) and validates it,
so it rejects a malformed URI up front and does not fail mid-download.</li>
<li>See the <a href="../../reference/configuration/network/#basic"><code>basic</code> reference</a> for the URI rules.</li>
</ul>
<div class="language-shell highlight"><pre><span></span><code><span id="__span-11-1"><a id="__codelineno-11-1" name="__codelineno-11-1" href="#__codelineno-11-1"></a>unshackle<span class="w"> </span>dl<span class="w"> </span>--proxy<span class="w"> </span>de2<span class="w"> </span>EXAMPLE<span class="w"> </span><span class="m">81234567</span>
</span></code></pre></div>
@@ -3383,140 +3437,31 @@ The <code>&lt;vpn-provider&gt;</code> must be one you have configured under <cod
unshackle normalises friendly names to Gluetun's identifiers (for example <code>pia</code> and
<code>privateinternetaccess</code> both map to <code>private internet access</code>).</p>
<h3 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">&para;</a></h3>
<p>Each VPN provider you want to use gets an entry under <code>providers:</code>, carrying its VPN type,
credentials, and how your region aliases map onto Gluetun's server selectors.</p>
<p>Each VPN provider you want to use gets an entry under <code>providers:</code>, with its VPN type, its
credentials, and how your region aliases map onto Gluetun's server selectors:</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-18-1"><a id="__codelineno-18-1" name="__codelineno-18-1" href="#__codelineno-18-1"></a><span class="nt">proxy_providers</span><span class="p">:</span>
</span><span id="__span-18-2"><a id="__codelineno-18-2" name="__codelineno-18-2" href="#__codelineno-18-2"></a><span class="w"> </span><span class="nt">gluetun</span><span class="p">:</span>
</span><span id="__span-18-3"><a id="__codelineno-18-3" name="__codelineno-18-3" href="#__codelineno-18-3"></a><span class="w"> </span><span class="nt">providers</span><span class="p">:</span>
</span><span id="__span-18-4"><a id="__codelineno-18-4" name="__codelineno-18-4" href="#__codelineno-18-4"></a><span class="w"> </span><span class="nt">windscribe</span><span class="p">:</span>
</span><span id="__span-18-4"><a id="__codelineno-18-4" name="__codelineno-18-4" href="#__codelineno-18-4"></a><span class="w"> </span><span class="nt">nordvpn</span><span class="p">:</span>
</span><span id="__span-18-5"><a id="__codelineno-18-5" name="__codelineno-18-5" href="#__codelineno-18-5"></a><span class="w"> </span><span class="nt">vpn_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">wireguard</span>
</span><span id="__span-18-6"><a id="__codelineno-18-6" name="__codelineno-18-6" href="#__codelineno-18-6"></a><span class="w"> </span><span class="nt">credentials</span><span class="p">:</span>
</span><span id="__span-18-7"><a id="__codelineno-18-7" name="__codelineno-18-7" href="#__codelineno-18-7"></a><span class="w"> </span><span class="nt">private_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">YOUR_WIREGUARD_PRIVATE_KEY</span>
</span><span id="__span-18-8"><a id="__codelineno-18-8" name="__codelineno-18-8" href="#__codelineno-18-8"></a><span class="w"> </span><span class="nt">addresses</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">YOUR_WIREGUARD_ADDRESS</span>
</span><span id="__span-18-9"><a id="__codelineno-18-9" name="__codelineno-18-9" href="#__codelineno-18-9"></a><span class="w"> </span><span class="nt">preshared_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">YOUR_PRESHARED_KEY</span>
</span><span id="__span-18-10"><a id="__codelineno-18-10" name="__codelineno-18-10" href="#__codelineno-18-10"></a><span class="w"> </span><span class="nt">server_countries</span><span class="p">:</span>
</span><span id="__span-18-11"><a id="__codelineno-18-11" name="__codelineno-18-11" href="#__codelineno-18-11"></a><span class="w"> </span><span class="nt">us</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">US</span>
</span><span id="__span-18-12"><a id="__codelineno-18-12" name="__codelineno-18-12" href="#__codelineno-18-12"></a><span class="w"> </span><span class="nt">uk</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">GB</span>
</span><span id="__span-18-13"><a id="__codelineno-18-13" name="__codelineno-18-13" href="#__codelineno-18-13"></a><span class="w"> </span><span class="nt">server_cities</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{}</span>
</span><span id="__span-18-14"><a id="__codelineno-18-14" name="__codelineno-18-14" href="#__codelineno-18-14"></a><span class="w"> </span><span class="nt">server_hostnames</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{}</span>
</span><span id="__span-18-15"><a id="__codelineno-18-15" name="__codelineno-18-15" href="#__codelineno-18-15"></a><span class="w"> </span><span class="nt">extra_env</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{}</span>
</span><span id="__span-18-16"><a id="__codelineno-18-16" name="__codelineno-18-16" href="#__codelineno-18-16"></a><span class="w"> </span><span class="nt">nordvpn</span><span class="p">:</span>
</span><span id="__span-18-17"><a id="__codelineno-18-17" name="__codelineno-18-17" href="#__codelineno-18-17"></a><span class="w"> </span><span class="nt">vpn_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">wireguard</span>
</span><span id="__span-18-18"><a id="__codelineno-18-18" name="__codelineno-18-18" href="#__codelineno-18-18"></a><span class="w"> </span><span class="nt">credentials</span><span class="p">:</span>
</span><span id="__span-18-19"><a id="__codelineno-18-19" name="__codelineno-18-19" href="#__codelineno-18-19"></a><span class="w"> </span><span class="nt">private_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">YOUR_WIREGUARD_PRIVATE_KEY</span>
</span><span id="__span-18-20"><a id="__codelineno-18-20" name="__codelineno-18-20" href="#__codelineno-18-20"></a><span class="w"> </span><span class="nt">server_countries</span><span class="p">:</span>
</span><span id="__span-18-21"><a id="__codelineno-18-21" name="__codelineno-18-21" href="#__codelineno-18-21"></a><span class="w"> </span><span class="nt">us</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">US</span>
</span><span id="__span-18-22"><a id="__codelineno-18-22" name="__codelineno-18-22" href="#__codelineno-18-22"></a><span class="w"> </span><span class="nt">de</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">DE</span>
</span><span id="__span-18-23"><a id="__codelineno-18-23" name="__codelineno-18-23" href="#__codelineno-18-23"></a>
</span><span id="__span-18-24"><a id="__codelineno-18-24" name="__codelineno-18-24" href="#__codelineno-18-24"></a><span class="w"> </span><span class="c1"># Global settings (all optional)</span>
</span><span id="__span-18-25"><a id="__codelineno-18-25" name="__codelineno-18-25" href="#__codelineno-18-25"></a><span class="w"> </span><span class="nt">base_port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">8888</span>
</span><span id="__span-18-26"><a id="__codelineno-18-26" name="__codelineno-18-26" href="#__codelineno-18-26"></a><span class="w"> </span><span class="nt">auto_cleanup</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span><span id="__span-18-27"><a id="__codelineno-18-27" name="__codelineno-18-27" href="#__codelineno-18-27"></a><span class="w"> </span><span class="nt">container_prefix</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">unshackle-gluetun</span>
</span><span id="__span-18-28"><a id="__codelineno-18-28" name="__codelineno-18-28" href="#__codelineno-18-28"></a><span class="w"> </span><span class="nt">auth_user</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">null</span>
</span><span id="__span-18-29"><a id="__codelineno-18-29" name="__codelineno-18-29" href="#__codelineno-18-29"></a><span class="w"> </span><span class="nt">auth_password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">null</span>
</span><span id="__span-18-30"><a id="__codelineno-18-30" name="__codelineno-18-30" href="#__codelineno-18-30"></a><span class="w"> </span><span class="nt">verify_ip</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span><span id="__span-18-8"><a id="__codelineno-18-8" name="__codelineno-18-8" href="#__codelineno-18-8"></a><span class="w"> </span><span class="nt">server_countries</span><span class="p">:</span>
</span><span id="__span-18-9"><a id="__codelineno-18-9" name="__codelineno-18-9" href="#__codelineno-18-9"></a><span class="w"> </span><span class="nt">us</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">US</span>
</span><span id="__span-18-10"><a id="__codelineno-18-10" name="__codelineno-18-10" href="#__codelineno-18-10"></a><span class="w"> </span><span class="nt">de</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">DE</span>
</span></code></pre></div>
<p><strong>Per-provider keys:</strong></p>
<table>
<thead>
<tr>
<th>Key</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>vpn_type</code></td>
<td><code>wireguard</code> (default) or <code>openvpn</code>.</td>
</tr>
<tr>
<td><code>credentials</code></td>
<td>The secrets for the tunnel; see the credential rules below.</td>
</tr>
<tr>
<td><code>server_countries</code></td>
<td>Maps your region alias (e.g. <code>us</code>) to Gluetun's country value (e.g. <code>US</code>).</td>
</tr>
<tr>
<td><code>server_cities</code></td>
<td>Optional. Maps an alias to a Gluetun city.</td>
</tr>
<tr>
<td><code>server_hostnames</code></td>
<td>Optional. Maps an alias directly to a specific server hostname.</td>
</tr>
<tr>
<td><code>extra_env</code></td>
<td>Optional. Raw environment variables merged into the container last, for any Gluetun setting not covered above.</td>
</tr>
</tbody>
</table>
<p><strong>Credential rules by VPN type:</strong></p>
<div class="tabbed-set tabbed-alternate" data-tabs="1:2"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">WireGuard</label><label for="__tabbed_1_2">OpenVPN</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
<ul>
<li><code>private_key</code> is <strong>always</strong> required.</li>
<li><code>surfshark</code>, <code>mullvad</code>, and <code>ivpn</code> also require <code>addresses</code>.</li>
<li><code>windscribe</code> additionally requires <strong>both</strong> <code>addresses</code> and <code>preshared_key</code>
(<code>preshared_key</code> may be an empty string, but the config key must be present).
Get both from the <a href="https://windscribe.com/getconfig/wireguard">Windscribe WireGuard config generator</a>.</li>
<li>NordVPN and Proton VPN need only <code>private_key</code>.</li>
</ul>
</div>
<div class="tabbed-block">
<ul>
<li>Requires <code>username</code> and <code>password</code>.</li>
</ul>
</div>
</div>
</div>
<p>The <a href="../../reference/configuration/network/#gluetun"><code>gluetun</code> reference</a> lists every config key of an entry, the global config keys
(<code>base_port</code>, <code>auto_cleanup</code>, <code>verify_ip</code> and others) and the credentials that each VPN
provider needs. For Windscribe WireGuard, get <code>addresses</code> and <code>preshared_key</code> from the
<a href="https://windscribe.com/getconfig/wireguard">Windscribe WireGuard config generator</a>.</p>
<div class="admonition tip">
<p class="admonition-title">Which <code>vpn_type</code> should I pick?</p>
<p>WireGuard is the default because it <strong>can be faster</strong>, but it needs the fiddlier
credential setup above (private keys, and for some providers <code>addresses</code> and a
<code>preshared_key</code>). OpenVPN is the <strong>simplest</strong> 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.</p>
<p>WireGuard is the default because it <strong>can be faster</strong>, but it needs more credential
setup (private keys, and for some providers <code>addresses</code> and a <code>preshared_key</code>).
OpenVPN is the <strong>simplest</strong> 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.</p>
</div>
<p><strong>Global keys:</strong></p>
<table>
<thead>
<tr>
<th>Key</th>
<th>Default</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>base_port</code></td>
<td><code>8888</code></td>
<td>The first local port to expose proxies on. Additional containers take the next free ports.</td>
</tr>
<tr>
<td><code>auto_cleanup</code></td>
<td><code>true</code></td>
<td>Remove containers on exit. If <code>false</code>, containers are only stopped, not deleted.</td>
</tr>
<tr>
<td><code>container_prefix</code></td>
<td><code>unshackle-gluetun</code></td>
<td>Prefix for Docker container names.</td>
</tr>
<tr>
<td><code>auth_user</code> / <code>auth_password</code></td>
<td><code>null</code></td>
<td>Optional HTTP-proxy credentials. If set, the local proxy requires auth and the credentials are embedded in the proxy URL.</td>
</tr>
<tr>
<td><code>verify_ip</code></td>
<td><code>true</code></td>
<td>After connecting, verify the container's real exit IP and region.</td>
</tr>
</tbody>
</table>
<h3 id="region-selection">Region selection<a class="headerlink" href="#region-selection" title="Permanent link">&para;</a></h3>
<p>For a given query region, Gluetun resolves the server like this:</p>
<ol>
@@ -3609,22 +3554,8 @@ servers:</p>
</span><span id="__span-20-6"><a id="__codelineno-20-6" name="__codelineno-20-6" href="#__codelineno-20-6"></a><span class="w"> </span><span class="nt">server_map</span><span class="p">:</span>
</span><span id="__span-20-7"><a id="__codelineno-20-7" name="__codelineno-20-7" href="#__codelineno-20-7"></a><span class="w"> </span><span class="nt">myserver</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">usny-newyork-2</span>
</span></code></pre></div>
<p><strong>Default file location:</strong></p>
<table>
<thead>
<tr>
<th>File</th>
<th>Default path</th>
</tr>
</thead>
<tbody>
<tr>
<td>Token cache</td>
<td><code>{cache}/vpn/expressvpn_tokens.json</code></td>
</tr>
</tbody>
</table>
<p>Where <code>{cache}</code> is your configured cache directory.</p>
<p>The <a href="../../reference/configuration/network/#expressvpn"><code>expressvpn</code> reference</a> lists every config key and the default
path of the token cache.</p>
<p><strong>Query forms:</strong></p>
<table>
<thead>
@@ -3658,11 +3589,6 @@ servers:</p>
</table>
<p>The resolved proxy is an HTTPS proxy on port <code>443</code>. On success, unshackle prints a
location summary such as <code>(USA - New York, #3 of 5): .214</code>.</p>
<div class="admonition note">
<p class="admonition-title">Cache safety</p>
<p>unshackle writes ExpressVPN's token cache with <code>0600</code> permissions, so the refresh
token is never briefly world-readable.</p>
</div>
<h2 id="nordvpn">NordVPN<a class="headerlink" href="#nordvpn" title="Permanent link">&para;</a></h2>
<p>NordVPN uses your <strong>Service Credentials</strong>, not your normal NordVPN login. Make them
from the <a href="https://my.nordaccount.com/dashboard/nordvpn/">NordVPN dashboard</a> under manual
@@ -3675,11 +3601,9 @@ setup. They are a long random username/password pair, not your email and passwor
</span><span id="__span-21-6"><a id="__codelineno-21-6" name="__codelineno-21-6" href="#__codelineno-21-6"></a><span class="w"> </span><span class="nt">us</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1234</span>
</span><span id="__span-21-7"><a id="__codelineno-21-7" name="__codelineno-21-7" href="#__codelineno-21-7"></a><span class="w"> </span><span class="nt">us:seattle</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5678</span>
</span></code></pre></div>
<p><strong>Required keys:</strong> <code>username</code>, <code>password</code>. 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 <code>@</code>. If validation fails, you have almost certainly used
your login credentials instead of your service credentials.</p>
<p><code>server_map</code> is optional and maps a region (or <code>code:city</code>) to a pinned NordVPN server ID, or to a
<p>unshackle checks the credentials when it loads: login credentials fail the check of the
<a href="../../reference/configuration/network/#nordvpn"><code>nordvpn</code> reference</a>.</p>
<p><code>server_map</code> is optional and pins a region to a NordVPN server ID, or to a
selector (see <a href="#choose-a-server-network">Choose a server network</a>).
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
@@ -3728,7 +3652,7 @@ port 80 in 2021).</p>
<h2 id="proton-vpn">Proton VPN<a class="headerlink" href="#proton-vpn" title="Permanent link">&para;</a></h2>
<p>Proton VPN supports two authentication methods, and unshackle can work with either. Note
that free Proton accounts work, but Proton limits them to its free-tier exit countries.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="2:2"><input checked="checked" id="__tabbed_2_1" name="__tabbed_2" type="radio" /><input id="__tabbed_2_2" name="__tabbed_2" type="radio" /><div class="tabbed-labels"><label for="__tabbed_2_1">TV login (recommended)</label><label for="__tabbed_2_2">Exported cookies</label></div>
<div class="tabbed-set tabbed-alternate" data-tabs="1:2"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">TV login (recommended)</label><label for="__tabbed_1_2">Exported cookies</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
<p>Proton's TV device-login flow gives a self-sustaining, refreshable sign-in. This is
@@ -3764,27 +3688,8 @@ exactly why TV login is the better method for set-and-forget use.</p>
</div>
</div>
</div>
<p><strong>Default file locations:</strong></p>
<table>
<thead>
<tr>
<th>File</th>
<th>Default path</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cookies</td>
<td><code>{cookies}/vpn/protonvpn.txt</code></td>
</tr>
<tr>
<td>Session cache</td>
<td><code>{cache}/vpn/protonvpn.json</code></td>
</tr>
</tbody>
</table>
<p>Proton VPN <strong>auto-loads</strong> if its cookie file exists. Like ExpressVPN, unshackle writes
its cache file with <code>0600</code> permissions.</p>
<p>The <a href="../../reference/configuration/network/#protonvpn"><code>protonvpn</code> reference</a> lists every config key and the default paths
of the cookie file and the TV login cache.</p>
<div class="admonition note">
<p class="admonition-title">Cache vs cookie precedence</p>
<p>If both a TV-login cache and a cookie file exist, unshackle <strong>prefers the cache</strong>
@@ -3854,14 +3759,11 @@ them from the <a href="https://my.surfshark.com/vpn/manual-setup/main/openvpn">S
</span><span id="__span-25-6"><a id="__codelineno-25-6" name="__codelineno-25-6" href="#__codelineno-25-6"></a><span class="w"> </span><span class="nt">us</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">us-dal</span>
</span><span id="__span-25-7"><a id="__codelineno-25-7" name="__codelineno-25-7" href="#__codelineno-25-7"></a><span class="w"> </span><span class="nt">us:seattle</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">us-sea</span>
</span></code></pre></div>
<p><strong>Required keys:</strong> <code>username</code>, <code>password</code>, validated with the same 48-character rule as
NordVPN (combined username+password must be 48 alphanumeric characters, case-insensitive, no <code>@</code>).
<p>unshackle checks the credentials with the same <a href="../../reference/configuration/network/#nordvpn">48-character rule</a> as NordVPN.
<code>server_map</code> optionally pins a server per region, or holds a selector (see
<a href="#choose-a-server-network">Choose a server network</a>). Give the server name from Surfshark's
server list, for example <code>us-dal</code>. A full hostname such as <code>us-dal.prod.surfshark.com</code> also
works. Surfshark does not use numeric server IDs. unshackle ignores a numeric or empty value
and logs a warning. A <code>us:seattle</code> entry applies only to that city query, and it does not
fall back to the <code>us</code> entry.</p>
server list, for example <code>us-dal</code>; Surfshark has no numeric server IDs. The
<a href="../../reference/configuration/network/#surfsharkvpn"><code>surfsharkvpn</code> reference</a> gives the value rules.</p>
<p><strong>Query forms:</strong></p>
<table>
<thead>
@@ -3910,9 +3812,10 @@ time, and a pinned IP can stop working.</p>
because the local port is on your machine. The server then selects and pins the server with its own
Surfshark configuration. This needs the <code>server_proxy</code> grant on your API key.</p>
<h2 id="windscribe">Windscribe<a class="headerlink" href="#windscribe" title="Permanent link">&para;</a></h2>
<p>Windscribe uses <strong>Service Credentials</strong> from its
<a href="https://windscribe.com/getconfig/openvpn">OpenVPN config page</a>. unshackle only makes
sure that a username and a password are present (there is no 48-character rule).</p>
<p>Windscribe uses its proxy <strong>Service Credentials</strong>, which Windscribe issues through its
<code>ServerCredentials</code> API. The OpenVPN and IKEv2 credentials of Windscribe's config
generator pages do not work on the proxy: it refuses them with <code>407</code>. unshackle only makes
sure that a username and a password are present.</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-26-1"><a id="__codelineno-26-1" name="__codelineno-26-1" href="#__codelineno-26-1"></a><span class="nt">proxy_providers</span><span class="p">:</span>
</span><span id="__span-26-2"><a id="__codelineno-26-2" name="__codelineno-26-2" href="#__codelineno-26-2"></a><span class="w"> </span><span class="nt">windscribevpn</span><span class="p">:</span>
</span><span id="__span-26-3"><a id="__codelineno-26-3" name="__codelineno-26-3" href="#__codelineno-26-3"></a><span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">YOUR_SERVICE_USERNAME</span>
@@ -3921,9 +3824,9 @@ sure that a username and a password are present (there is no 48-character rule).
</span><span id="__span-26-6"><a id="__codelineno-26-6" name="__codelineno-26-6" href="#__codelineno-26-6"></a><span class="w"> </span><span class="nt">us</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">us-east.totallyacdn.com</span>
</span><span id="__span-26-7"><a id="__codelineno-26-7" name="__codelineno-26-7" href="#__codelineno-26-7"></a><span class="w"> </span><span class="nt">us:seattle</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">us-seattle.totallyacdn.com</span>
</span></code></pre></div>
<p><strong>Required keys:</strong> <code>username</code>, <code>password</code>. <code>server_map</code> optionally takes a selector (see
<p><code>server_map</code> optionally takes a selector (see
<a href="#choose-a-server-network">Choose a server network</a>), or maps a region (or
<code>region:city</code>) directly to a hostname.</p>
<code>region:city</code>) directly to a hostname. See the <a href="../../reference/configuration/network/#windscribevpn"><code>windscribevpn</code> reference</a>.</p>
<p><strong>Query forms:</strong></p>
<table>
<thead>
@@ -3952,64 +3855,13 @@ sure that a username and a password are present (there is no 48-character rule).
</tbody>
</table>
<p>The returned proxy is HTTPS on <strong>port 443</strong>.</p>
<h2 id="developer-notes">Developer notes<a class="headerlink" href="#developer-notes" title="Permanent link">&para;</a></h2>
<div class="admonition note">
<p class="admonition-title">One resolution path (developers)</p>
<p><code>dl</code>, <code>search</code>, the REST API handlers and the remote-service client all load proxy
providers through <code>load_proxy_providers()</code> in <code>unshackle/core/proxies/resolve.py</code>.
The REST API, its download jobs and the remote-service client call it through
<code>initialize_proxy_providers()</code>, which leaves out Gluetun because Gluetun starts a
local Docker container. All paths read a value through <code>resolve_proxy_value()</code>, which
returns the proxy URI with the proxy provider, the query and the log line: a
<code>controld://</code> resolver, a <code>provider:query</code> or a bare query tried against providers in
order, or else an explicit proxy URI or <code>host:port</code>.</p>
<p>The remote-service client resolves <code>--proxy</code> with its own
<code>resolve_remote_proxy_arg()</code>. It changes a <code>controld:</code> query to a <code>controld://</code>
resolver for the server with <code>get_remote_proxy()</code>, and it removes Control D from a bare
query, because a loopback forwarder is of no use to a server on another machine.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Keeping service requests on the proxy (developers)</p>
<p><code>unshackle/core/utils/run_proxy.py</code> holds the proxy rules for service traffic:</p>
<ul>
<li><code>pin(session)</code> stops environment and system proxies from overriding the proxy of a
requests HTTP session, and keeps the environment CA bundle. Call it on each requests
HTTP session that gets a proxy.</li>
<li><code>fallback_session()</code> gives a core helper with no HTTP session (a manifest parser, a DRM
class) a session on the proxy of the service that called it.</li>
<li>An audit hook on <code>socket.getaddrinfo</code> and on <code>socket.connect</code> to a host name, and a
check in <code>RnetSession.request</code>, warn about requests from service code that do not use
the proxy. A service sets
<code>proxy_exempt = True</code> on an HTTP session that goes direct on purpose.</li>
</ul>
</div>
<div class="admonition note">
<p class="admonition-title">Implementing a new provider (developers)</p>
<p>Every proxy provider subclasses <code>unshackle.core.proxies.proxy.Proxy</code> and has three
methods:</p>
<ul>
<li><code>__init__(self, **kwargs)</code> receives its <code>proxy_providers</code> sub-dict splatted as
keyword arguments, so YAML keys map 1:1 to constructor parameters. Check the
configuration here, but make no request: every <code>dl</code> run builds every configured
proxy provider, even for a run with no proxy. Read the server or location catalogue
through a <code>functools.cached_property</code>, so the first query fetches it.</li>
<li><code>__repr__(self)</code> is a human summary, conventionally <code>"{n} Countries ({m} Servers)"</code>.</li>
<li><code>get_proxy(self, query)</code> returns a Requests-compatible proxy URI, or <code>None</code> only
when the query was valid but no proxy exists. Raise on genuine errors or bad queries.</li>
</ul>
<p>Optionally add <code>get_connection_info(query)</code> (as Gluetun does) or
<code>last_connection_display()</code> (as ExpressVPN and Proton VPN do) to make <code>dl</code> print a
friendly connection line instead of the raw proxy URL.</p>
</div>
<h2 id="see-also">See also<a class="headerlink" href="#see-also" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="../downloading/">Downloading</a>: the full <code>dl</code> command guide, including where proxy
flags sit in the download flow.</li>
<li><a href="../../getting-started/configuration-file/">Configuration file</a>: the <code>unshackle.yaml</code>
reference, including directories for cookies and cache used by the cookie-based
providers.</li>
<li><a href="../../reference/api/config/">Configuration reference</a>: the developer-facing
configuration API, including the <code>proxy_providers</code> structure.</li>
<li><a href="../../reference/configuration/network/">Network &amp; proxy reference</a>: every <code>proxy_providers</code> config key.</li>
<li><a href="../../reference/configuration/directories/">Directories</a>: the cookies and cache
directories that the cookie-based providers use.</li>
</ul>