mirror of
https://github.com/openziti/zrok.git
synced 2024-11-24 17:13:51 +01:00
deploy: 67c1d1df26
This commit is contained in:
parent
5528a65767
commit
39cc64d96a
4
404.html
4
404.html
@ -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>
|
||||
|
21
README.md
Normal file
21
README.md
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
# Caddyfile Samples
|
||||
|
||||
The Caddyfile samples in this directory are for use with `--backend-mode caddy ./my.Caddyfile` which runs an embedded
|
||||
Caddy server.
|
||||
|
||||
With a zrok reserved share, you have the option to permanently override the path to the Caddyfile when you run `zrok
|
||||
share reserved ${ZROK_RESERVED_TOKEN} --override-endpoint new.Caddyfile`.
|
||||
|
||||
The Caddyfile must have this structure because it is rendered as a Go template by zrok to bind the HTTP listener.
|
||||
|
||||
```console
|
||||
http:// {
|
||||
bind {{ .ZrokBindAddress }}
|
||||
# customize reverse_proxy, file_server, etc.
|
||||
}
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
multiple_upstream.Caddyfile is bundled in the zrok-share package for Linux as an example Caddyfile.
|
1
assets/js/11b43341.5c41dc5f.js
Normal file
1
assets/js/11b43341.5c41dc5f.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/js/21880a4d.b83bcad5.js
Normal file
1
assets/js/21880a4d.b83bcad5.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/js/36b94792.799856c4.js
Normal file
1
assets/js/36b94792.799856c4.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/js/4f1777fd.9644a82a.js
Normal file
1
assets/js/4f1777fd.9644a82a.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/54fa7005.cf645e57.js
Normal file
1
assets/js/54fa7005.cf645e57.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/aad6478e.8dd329a2.js
Normal file
1
assets/js/aad6478e.8dd329a2.js
Normal file
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6733],{9538:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>a,contentTitle:()=>t,default:()=>l,frontMatter:()=>i,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"concepts/sharing-public","title":"Public Shares","description":"zrok supports public sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points.","source":"@site/../docs/concepts/sharing-public.md","sourceDirName":"concepts","slug":"/concepts/sharing-public","permalink":"/docs/concepts/sharing-public","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/sharing-public.md","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"sidebar_position":10},"sidebar":"tutorialSidebar","previous":{"title":"Private Shares","permalink":"/docs/concepts/sharing-private"},"next":{"title":"Reserved Shares","permalink":"/docs/concepts/sharing-reserved"}}');var c=r(4848),o=r(8453);const i={sidebar_position:10},t="Public Shares",a={},h=[{value:"Peer to Public",id:"peer-to-public",level:2}];function d(e){const s={code:"code",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",...(0,o.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.header,{children:(0,c.jsx)(s.h1,{id:"public-shares",children:"Public Shares"})}),"\n",(0,c.jsxs)(s.p,{children:[(0,c.jsx)(s.code,{children:"zrok"})," supports ",(0,c.jsx)(s.code,{children:"public"})," sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points."]}),"\n",(0,c.jsx)(s.h2,{id:"peer-to-public",children:"Peer to Public"}),"\n",(0,c.jsx)(s.p,{children:(0,c.jsx)(s.img,{alt:"zrok_public_share",src:r(1055).A+"",width:"2200",height:"916"})}),"\n",(0,c.jsxs)(s.p,{children:[(0,c.jsx)(s.code,{children:"public"})," sharing is most useful when the person or service accessing your resources does not have ",(0,c.jsx)(s.code,{children:"zrok"})," running locally and cannot make use of the ",(0,c.jsx)(s.code,{children:"private"})," sharing mode built into ",(0,c.jsx)(s.code,{children:"zrok"}),". Many users share development web servers, webhooks, and other HTTP/HTTPS resources."]}),"\n",(0,c.jsxs)(s.p,{children:["As with ",(0,c.jsx)(s.code,{children:"private"})," sharing, ",(0,c.jsx)(s.code,{children:"public"})," sharing does not require you to open any firewall ports or otherwise compromise the security of your local environments. A ",(0,c.jsx)(s.code,{children:"public"})," share goes away as soon as you terminate the ",(0,c.jsx)(s.code,{children:"zrok share"})," command."]}),"\n",(0,c.jsxs)(s.p,{children:["Using ",(0,c.jsx)(s.code,{children:"public"})," shares is easy and is accomplished using the ",(0,c.jsx)(s.code,{children:"zrok share public"})," command. Run ",(0,c.jsx)(s.code,{children:"zrok share public"})," to see the command-line help and to learn how to use ",(0,c.jsx)(s.code,{children:"public"})," shares."]})]})}function l(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,c.jsx)(s,{...e,children:(0,c.jsx)(d,{...e})}):d(e)}},1055:(e,s,r)=>{r.d(s,{A:()=>n});const n=r.p+"assets/images/zrok_public_share-1eec22cb798395c2bcd3ac10465f62ca.png"},8453:(e,s,r)=>{r.d(s,{R:()=>i,x:()=>t});var n=r(6540);const c={},o=n.createContext(c);function i(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:i(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]);
|
1
assets/js/f888b719.6683df26.js
Normal file
1
assets/js/f888b719.6683df26.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
assets/js/main.7b0116f6.js
Normal file
2
assets/js/main.7b0116f6.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/js/runtime~main.d833a01a.js
Normal file
1
assets/js/runtime~main.d833a01a.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
File diff suppressed because one or more lines are too long
@ -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>
|
||||
@ -21,6 +21,15 @@
|
||||
<p><img decoding="async" loading="lazy" alt="zrok_public_share" src="/assets/images/zrok_public_share-1eec22cb798395c2bcd3ac10465f62ca.png" width="2200" height="916" class="img_ev3q"></p>
|
||||
<p><code>public</code> sharing is most useful when the person or service accessing your resources does not have <code>zrok</code> running locally and cannot make use of the <code>private</code> sharing mode built into <code>zrok</code>. Many users share development web servers, webhooks, and other HTTP/HTTPS resources.</p>
|
||||
<p>As with <code>private</code> sharing, <code>public</code> sharing does not require you to open any firewall ports or otherwise compromise the security of your local environments. A <code>public</code> share goes away as soon as you terminate the <code>zrok share</code> command.</p>
|
||||
<p>Using <code>public</code> shares is easy and is accomplished using the <code>zrok share public</code> command. Run <code>zrok share public</code> to see the command-line help and to learn how to use <code>public</code> shares.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="row margin-top--sm theme-doc-footer-edit-meta-row"><div class="col"><a href="https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/sharing-public.md" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_JAkA"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/concepts/sharing-private/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Private Shares</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/concepts/sharing-reserved/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Reserved Shares</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#peer-to-public" class="table-of-contents__link toc-highlight">Peer to Public</a></li></ul></div></div></div></div></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 NetFoundry Inc. Built with Docusaurus.</div></div></div></footer></div>
|
||||
<p>Using <code>public</code> shares is easy and is accomplished using the <code>zrok share public</code> command. Run <code>zrok share public</code> to see the command-line help and to learn how to use <code>public</code> shares.</p>
|
||||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="public-backend-modes">Public Backend Modes<a href="#public-backend-modes" class="hash-link" aria-label="Direct link to Public Backend Modes" title="Direct link to Public Backend Modes"></a></h2>
|
||||
<p>The default backend mode is <code>proxy</code> which targets an HTTP URL that must be reachable by the backend.</p>
|
||||
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockTitle_Ktv7">proxy example</div><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash 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 public 80</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>
|
||||
<ul>
|
||||
<li><code>proxy</code> mode forwards requests received by the frontend to the target server (<a href="/docs/concepts/http/">more</a>)</li>
|
||||
<li><code>web</code> mode serves a target folder as a file index web page (<a href="/docs/concepts/files/">more</a>)</li>
|
||||
<li><code>drive</code> mode serves a target folder with WebDAV (<a href="/docs/guides/drives/">guide</a>)</li>
|
||||
<li><code>caddy</code> mode runs the built-in Caddy server with the targeted Caddyfile (<a href="/simple_reverse_proxy.Caddyfile" target="_blank" rel="noopener noreferrer">example</a>)</li>
|
||||
</ul></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="row margin-top--sm theme-doc-footer-edit-meta-row"><div class="col"><a href="https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/sharing-public.mdx" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_JAkA"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/concepts/sharing-private/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Private Shares</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/concepts/sharing-reserved/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Reserved Shares</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#peer-to-public" class="table-of-contents__link toc-highlight">Peer to Public</a></li><li><a href="#public-backend-modes" class="table-of-contents__link toc-highlight">Public Backend Modes</a></li></ul></div></div></div></div></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 NetFoundry Inc. Built with Docusaurus.</div></div></div></footer></div>
|
||||
</body>
|
||||
</html>
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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>
|
||||
|
34
multiple_upstream.Caddyfile
Normal file
34
multiple_upstream.Caddyfile
Normal file
@ -0,0 +1,34 @@
|
||||
# Multiple Backends Example
|
||||
#
|
||||
|
||||
# global config must be first
|
||||
{
|
||||
# no listen on 2019/tcp with admin API
|
||||
admin off
|
||||
}
|
||||
|
||||
# zrok site block
|
||||
http:// {
|
||||
# Bind to the zrok share
|
||||
bind {{ .ZrokBindAddress }}
|
||||
|
||||
# Handle paths starting with `/zrok/*`
|
||||
# This will also strip the `/zrok/` from the path before sending to the backend
|
||||
handle_path /zrok/* {
|
||||
reverse_proxy https://zrok.io {
|
||||
header_up Host zrok.io
|
||||
}
|
||||
}
|
||||
|
||||
# serve index.html if it exists, else a file index
|
||||
handle_path /zrok-static/* {
|
||||
root * /var/www/html
|
||||
file_server browse
|
||||
}
|
||||
|
||||
# All other traffic goes to localhost:3000
|
||||
reverse_proxy /* 127.0.0.1:3000 {
|
||||
header_up Host localhost:3000
|
||||
header_up X-Real-IP {http.request.header.x-forwarded-for}
|
||||
}
|
||||
}
|
@ -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>
|
||||
|
11
simple_reverse_proxy.Caddyfile
Normal file
11
simple_reverse_proxy.Caddyfile
Normal file
@ -0,0 +1,11 @@
|
||||
# global config must be first
|
||||
{
|
||||
# no listen on 2019/tcp with admin API
|
||||
admin off
|
||||
}
|
||||
|
||||
# zrok site block
|
||||
http:// {
|
||||
bind {{ .ZrokBindAddress }}
|
||||
reverse_proxy 127.0.0.1:3000
|
||||
}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user