mirror of
https://github.com/openziti/zrok.git
synced 2025-08-16 10:57:55 +02:00
deploy: 67c1d1df26
This commit is contained in:
@ -9,8 +9,8 @@
|
||||
|
||||
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="Zrok" href="/opensearch.xml"><link rel="stylesheet" href="/assets/css/styles.8f21ab8f.css">
|
||||
<script src="/assets/js/runtime~main.dd847636.js" defer="defer"></script>
|
||||
<script src="/assets/js/main.9ffc9b7f.js" defer="defer"></script>
|
||||
<script src="/assets/js/runtime~main.d833a01a.js" defer="defer"></script>
|
||||
<script src="/assets/js/main.7b0116f6.js" defer="defer"></script>
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MDFLZPK8" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
@ -80,6 +80,7 @@
|
||||
<p>And as soon as I terminate the <code>zrok share</code> client, the resources are removed from the <code>zrok</code> environment.</p>
|
||||
<p>If we try to reload the frontend endpoint in our web browser, we'll see:</p>
|
||||
<p><img decoding="async" loading="lazy" alt="Not Found" src="/assets/images/zrok_not_found-fa3415937c341eb10e1eb98c9b063583.png" width="1556" height="1229" class="img_ev3q"></p>
|
||||
<p><a href="/docs/concepts/sharing-public/">More about public shares</a></p>
|
||||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="private-shares">Private Shares<a href="#private-shares" class="hash-link" aria-label="Direct link to Private Shares" title="Direct link to Private Shares"></a></h3>
|
||||
<p><code>zrok</code> also provides a powerful <em>private</em> sharing model. If I execute the following command:</p>
|
||||
<div class="language-buttonless codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockTitle_Ktv7">Example</div><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-buttonless codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">$ zrok share private http://localhost:8080</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
|
||||
@ -87,6 +88,7 @@
|
||||
<div class="language-buttonless codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockTitle_Ktv7">Output</div><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-buttonless codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">access your share with: zrok access private wvszln4dyz9q</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
|
||||
<p>Rather than allowing access to your service through a public frontend, a <em>private</em> share is only exposed to the underlying OpenZiti network, and can only be accessed using the <code>zrok access</code> command.</p>
|
||||
<p>The <code>zrok access private wvszln4dyz9q</code> command can be run by any <code>zrok</code> user, allowing them to create and bind a local HTTP listener, that allows for private access to your shared resources.</p>
|
||||
<p><a href="/docs/concepts/sharing-private/">More about private shares</a></p>
|
||||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="proxy-backend-mode">Proxy Backend Mode<a href="#proxy-backend-mode" class="hash-link" aria-label="Direct link to Proxy Backend Mode" title="Direct link to Proxy Backend Mode"></a></h3>
|
||||
<p>Without specifying a <em>backend mode</em>, the <code>zrok share</code> command will assume that you're trying to share a <code>proxy</code> resource. A <code>proxy</code> resource is usually some private HTTP/HTTPS endpoint (like a development server, or a private application) running in your local environment. Usually such an endpoint would have no inbound connectivity except for however it is reachable from your local environment. It might be running on <code>localhost</code>, or only listening on a private LAN segment behind a firewall.</p>
|
||||
<p>For these services a <code>proxy</code> share will allow those endpoints to be reached, either <em>publicly</em> or <em>privately</em> through the <code>zrok</code> service.</p>
|
||||
@ -111,6 +113,7 @@
|
||||
<p>With the reserved share, we're free to stop and restart the <code>zrok share reserved</code> command as many times as we want, without losing the token for our share.</p>
|
||||
<p>When we're done with the reserved share, we can <em>release</em> it using this command:</p>
|
||||
<div class="language-txt codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockTitle_Ktv7">Example</div><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-txt codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">$ zrok release mltwsinym1s2</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">[ 0.230] INFO main.(*releaseCommand).run: reserved share 'mltwsinym1s2' released</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
|
||||
<p><a href="/docs/concepts/sharing-reserved/">More about reserved shares</a></p>
|
||||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="concepts-review">Concepts Review<a href="#concepts-review" class="hash-link" aria-label="Direct link to Concepts Review" title="Direct link to Concepts Review"></a></h2>
|
||||
<p>In summary, <code>zrok</code> lets you easily and securely share resources with both general internet users (through <em>public</em> sharing) and also with other <code>zrok</code> users (through <em>private</em> sharing).</p>
|
||||
<p>Here's a quick review of the <code>zrok</code> mental model and the vocabulary.</p>
|
||||
|
Reference in New Issue
Block a user