mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-20 04:14:32 +09:00
Deployed 459b157c to development with ProperDocs 1.6.7 and mike 2.2.0
This commit is contained in:
1 parent
5e6d8c69a9
commit
64c5be979e
4 files changed
+35
-35
No files matched your search
@@ -2,7 +2,7 @@
|
||||
</span></span><span id=__span-0-2><a id=__codelineno-0-2 name=__codelineno-0-2 href=#__codelineno-0-2></a><span class=nt>tls</span><span class=p>:</span>
|
||||
</span><span id=__span-0-3><a id=__codelineno-0-3 name=__codelineno-0-3 href=#__codelineno-0-3></a><span class=w> </span><span class=nt>cert_path</span><span class=p>:</span><span class=w> </span><span class=s>""</span>
|
||||
</span><span id=__span-0-4><a id=__codelineno-0-4 name=__codelineno-0-4 href=#__codelineno-0-4></a><span class=w> </span><span class=nt>key_path</span><span class=p>:</span><span class=w> </span><span class=s>""</span>
|
||||
</span></code></pre></div> <p>Headscale logs <code>WRN listening without TLS but ServerURL does not start with http://</code> during startup. This is expected and indicates that the reverse proxy is in charge of terminating TLS.</p> <h3 id=trusted-proxies>Trusted proxies<a class=headerlink href=#trusted-proxies title="Permanent link">¶</a></h3> <p>Headscale ignores <code>True-Client-IP</code>, <code>X-Real-IP</code> and <code>X-Forwarded-For</code> headers unless the request's TCP peer matches the <code>trusted_proxies</code> configuration option. Set this to the CIDR(s) your reverse proxy connects from so the real client IP appears in access logs.</p> <div class="language-yaml highlight"><span class=filename>config.yaml</span><pre><span></span><code><span id=__span-1-1><a id=__codelineno-1-1 name=__codelineno-1-1 href=#__codelineno-1-1></a><span class=nt>trusted_proxies</span><span class=p>:</span>
|
||||
</span></code></pre></div> <p>Headscale logs <code>WRN listening without TLS but ServerURL does not start with http://</code> during startup. This is expected and indicates that the reverse proxy is in charge of terminating TLS.</p> <h3 id=trusted-proxies>Trusted proxies<a class=headerlink href=#trusted-proxies title="Permanent link">¶</a></h3> <p>Headscale ignores <code>True-Client-IP</code>, <code>X-Real-IP</code> and <code>X-Forwarded-For</code> headers unless the request's TCP peer matches the <code>trusted_proxies</code> configuration option. Set this to the CIDR(s) your reverse proxy connects from so the real client IP appears in access logs and in the v2 API's <code>ip:publicAddress</code> device attribute. Without it, every node reports the proxy's address.</p> <div class="language-yaml highlight"><span class=filename>config.yaml</span><pre><span></span><code><span id=__span-1-1><a id=__codelineno-1-1 name=__codelineno-1-1 href=#__codelineno-1-1></a><span class=nt>trusted_proxies</span><span class=p>:</span>
|
||||
</span><span id=__span-1-2><a id=__codelineno-1-2 name=__codelineno-1-2 href=#__codelineno-1-2></a><span class=w> </span><span class="p p-Indicator">-</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">127.0.0.1/32</span>
|
||||
</span><span id=__span-1-3><a id=__codelineno-1-3 name=__codelineno-1-3 href=#__codelineno-1-3></a><span class=w> </span><span class="p p-Indicator">-</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">::1/128</span>
|
||||
</span></code></pre></div> <p>The reverse proxy is responsible to replace any client-supplied <code>True-Client-IP</code>, <code>X-Real-IP</code>, <code>X-Forwarded-For</code> headers on inbound requests with sanitized values. Headscale picks the first valid IP address supplied by headers in this order:</p> <ul> <li><code>True-Client-IP</code></li> <li><code>X-Real-IP</code></li> <li><code>X-Forwarded-For</code></li> </ul> <h2 id=limitations>Limitations<a class=headerlink href=#limitations title="Permanent link">¶</a></h2> <ul> <li>A reverse proxy adds another layer of complexity that needs to be able to handle the <a href=#websocket>Tailscale Control Protocol</a> properly. Be sure to test your setup without a reverse proxy before raising an issue.</li> <li>STUN (used along with the <a href=../../derp/ >embedded DERP server</a>) requires udp/3478 to be served publicly.</li> </ul> <h2 id=reverse-proxy-specific-configuration>Reverse proxy specific configuration<a class=headerlink href=#reverse-proxy-specific-configuration title="Permanent link">¶</a></h2> <div class="admonition warning"> <p class=admonition-title>Third-party software and services</p> <p>This section of the documentation is specific for third-party software and services. We recommend users read the third-party documentation for a secure configuration.</p> </div> <p>This following Headscale configuration may be used as base for the various reverse proxy examples below. The following is <a href=../../../setup/requirements/ >assumed</a>:</p> <ul> <li>Service for Tailscale clients is served via HTTPS on port 443.</li> <li>The reverse proxy redirects HTTP to HTTPS and is terminating TLS.</li> <li>Both Headscale and the reverse proxy are running on the same host.</li> <li><a href=../../debug/#metrics-and-debug-endpoint>Metrics</a> are not proxied, those are available via localhost.</li> </ul> <div class="language-yaml highlight"><span class=filename>config.yaml</span><pre><span></span><code><span id=__span-2-1><a id=__codelineno-2-1 name=__codelineno-2-1 href=#__codelineno-2-1></a><span class=hll><span class=nt>server_url</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">https://<SERVER_NAME></span>
|
||||
|
||||
Reference in new issue
Block a user