From 8396d93a123d9919ee2a65420c5e3c67ee1adf52 Mon Sep 17 00:00:00 2001 From: qrkourier Date: Thu, 19 Dec 2024 19:50:00 +0000 Subject: [PATCH] deploy: 119c7e4109da145b5744fdb6e8c70eef224b3bcc --- 404.html | 2 +- assets/js/{bbbe662c.d902f20f.js => bbbe662c.b37b0a59.js} | 2 +- .../js/{runtime~main.4f70e77d.js => runtime~main.38f55764.js} | 2 +- docs/category/guides/index.html | 2 +- docs/category/metrics-and-limits/index.html | 2 +- docs/category/oauth/index.html | 2 +- docs/category/self-hosting/index.html | 2 +- docs/concepts/files/index.html | 2 +- docs/concepts/hosting/index.html | 2 +- docs/concepts/http/index.html | 2 +- docs/concepts/index.html | 2 +- docs/concepts/opensource/index.html | 2 +- docs/concepts/sharing-private/index.html | 2 +- docs/concepts/sharing-public/index.html | 2 +- docs/concepts/sharing-reserved/index.html | 2 +- docs/concepts/tunnels/index.html | 2 +- docs/getting-started/index.html | 2 +- .../guides/docker-share/docker_private_share_guide/index.html | 4 ++-- docs/guides/docker-share/docker_public_share_guide/index.html | 2 +- docs/guides/docker-share/index.html | 2 +- docs/guides/drives/index.html | 2 +- docs/guides/frontdoor/index.html | 2 +- docs/guides/install/index.html | 2 +- docs/guides/install/linux/index.html | 2 +- docs/guides/install/macos/index.html | 2 +- docs/guides/install/windows/index.html | 2 +- docs/guides/permission-modes/index.html | 2 +- docs/guides/self-hosting/docker/index.html | 2 +- docs/guides/self-hosting/instance-configuration/index.html | 2 +- docs/guides/self-hosting/interstitial-page/index.html | 2 +- docs/guides/self-hosting/kubernetes/index.html | 2 +- docs/guides/self-hosting/linux/index.html | 2 +- docs/guides/self-hosting/linux/nginx/index.html | 2 +- .../metrics-and-limits/configuring-limits/index.html | 2 +- .../metrics-and-limits/configuring-metrics/index.html | 2 +- docs/guides/self-hosting/oauth/configuring-oauth/index.html | 2 +- docs/guides/self-hosting/organizations/index.html | 2 +- docs/guides/self-hosting/personalized-frontend/index.html | 2 +- docs/guides/self-hosting/self-service-invite/index.html | 2 +- docs/guides/vpn/index.html | 2 +- index.html | 2 +- search/index.html | 2 +- 42 files changed, 43 insertions(+), 43 deletions(-) rename assets/js/{bbbe662c.d902f20f.js => bbbe662c.b37b0a59.js} (70%) rename assets/js/{runtime~main.4f70e77d.js => runtime~main.38f55764.js} (98%) diff --git a/404.html b/404.html index 2e0e53b0..3a282b44 100644 --- a/404.html +++ b/404.html @@ -9,7 +9,7 @@ - + diff --git a/assets/js/bbbe662c.d902f20f.js b/assets/js/bbbe662c.b37b0a59.js similarity index 70% rename from assets/js/bbbe662c.d902f20f.js rename to assets/js/bbbe662c.b37b0a59.js index 13cb9e88..a26ffb66 100644 --- a/assets/js/bbbe662c.d902f20f.js +++ b/assets/js/bbbe662c.b37b0a59.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1057],{942:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>t,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"guides/docker-share/docker_private_share_guide","title":"Docker Private Share","description":"Goal","source":"@site/../docs/guides/docker-share/docker_private_share_guide.md","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/docker_private_share_guide","permalink":"/docs/guides/docker-share/docker_private_share_guide","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/docker-share/docker_private_share_guide.md","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"title":"Docker Private Share","sidebar_position":20,"sidebar_label":"Private Share"},"sidebar":"tutorialSidebar","previous":{"title":"Public Share","permalink":"/docs/guides/docker-share/docker_public_share_guide"},"next":{"title":"Self Hosting","permalink":"/docs/category/self-hosting"}}');var o=n(4848),i=n(8453);const t={title:"Docker Private Share",sidebar_position:20,sidebar_label:"Private Share"},a=void 0,c={},l=[{value:"Goal",id:"goal",level:2},{value:"Overview",id:"overview",level:2},{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"How it Works",id:"how-it-works",level:2},{value:"Before You Begin",id:"before-you-begin",level:2},{value:"Begin Sharing Privately with zrok in Docker",id:"begin-sharing-privately-with-zrok-in-docker",level:2},{value:"Access the Private Share",id:"access-the-private-share",level:2},{value:"Closed Permission Mode",id:"closed-permission-mode",level:2},{value:"Going Further with Private Access",id:"going-further-with-private-access",level:2},{value:"Cleaning Up",id:"cleaning-up",level:2}];function h(e){const r={a:"a",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.h2,{id:"goal",children:"Goal"}),"\n",(0,o.jsx)(r.p,{children:"Privately share a Docker Compose service with a separate zrok environment and a permanent zrok share token."}),"\n",(0,o.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(r.p,{children:"With zrok, you can privately share a service that's running in Docker. You need a zrok private share running somewhere that it can reach the service you're sharing, and a zrok private access running somewhere else where you want to use the private share. Together, the private share and private access form a private point-to-point tunnel."}),"\n",(0,o.jsxs)(r.p,{children:["Here's a short article with an overview of ",(0,o.jsx)(r.a,{href:"/docs/concepts/sharing-private",children:"private sharing with zrok"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,o.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/HxyvtFAvwUE",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,o.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,o.jsx)(r.p,{children:"The Docker Compose project uses your zrok account token to reserve a private share token and keep sharing the backend target."}),"\n",(0,o.jsx)(r.p,{children:"When the project runs it will:"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["enable a zrok environment unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/environment.json"})," exists in the ",(0,o.jsx)(r.code,{children:"zrok_env"})," volume"]}),"\n",(0,o.jsxs)(r.li,{children:["reserve a private share token for the service unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," exists"]}),"\n",(0,o.jsxs)(r.li,{children:["start sharing the target specified in the ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," environment variable"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"before-you-begin",children:"Before You Begin"}),"\n",(0,o.jsxs)(r.p,{children:["To follow this guide you will need ",(0,o.jsx)(r.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"}),"."]}),"\n",(0,o.jsx)(r.p,{children:"If you have installed Docker Desktop on macOS or Windows then you are all set."}),"\n",(0,o.jsx)(r.h2,{id:"begin-sharing-privately-with-zrok-in-docker",children:"Begin Sharing Privately with zrok in Docker"}),"\n",(0,o.jsx)(r.p,{children:"First, let's create the private share."}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private share."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Download ",(0,o.jsx)(r.a,{href:"pathname:///zrok-private-share/compose.yml",children:"the zrok-private-share Docker Compose project file"})," into your new project folder and make sure it's named ",(0,o.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,o.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"If you are self-hosting zrok then it's important to set your API endpoint URL too. If you're using the hosted zrok service then you can skip this step."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_API_ENDPOINT="https://zrok.example.com"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Run your Compose project to start sharing the built-in demo web server:"}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Read the private share token from the output. One of the last lines is like this:"}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"zrok-private-share-1 | zrok access private wr3hpf2z5fiy\n"})}),"\n",(0,o.jsx)(r.p,{children:"Keep track of this token so you can use it in your zrok private access project."}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"access-the-private-share",children:"Access the Private Share"}),"\n",(0,o.jsx)(r.p,{children:"Now that we have a private share we can access it with the zrok command or by running a separate Docker Compose project."}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private access."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Download ",(0,o.jsx)(r.a,{href:"pathname:///zrok-private-access/compose.yml",children:"the zrok-private-access Docker Compose project file"})," into your new project folder and make sure it's named ",(0,o.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,o.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Now copy the zrok private access token from the zrok private share project's output to your clipboard and paste it in the same file named ",(0,o.jsx)(r.code,{children:".env"})," here in your private share project folder like this:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\nZROK_ACCESS_TOKEN="wr3hpf2z5fiy"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Run your Compose project to start accessing the private share:"}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up zrok-private-access\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Now your zrok private access proxy is ready on ",(0,o.jsx)(r.a,{href:"http://127.0.0.1:9191",children:"http://127.0.0.1:9191"}),". You can visit the demo web server in your browser."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"closed-permission-mode",children:"Closed Permission Mode"}),"\n",(0,o.jsx)(r.p,{children:'Normally, you need only the share token to access a private share. You can further restrict access with "closed" permission mode.'}),"\n",(0,o.jsx)(r.p,{children:"You must set the permission mode before you reserve the share."}),"\n",(0,o.jsx)(r.p,{children:"Only your own account can access the private share."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'ZROK_PERMISSION_MODE="closed"\n'})}),"\n",(0,o.jsx)(r.p,{children:"Grant access to additional zrok accounts."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'ZROK_ACCESS_GRANTS="bob@example.com alice@example.org"\n'})}),"\n",(0,o.jsxs)(r.p,{children:["You can adjust the access grants by running the CLI inside the ",(0,o.jsx)(r.code,{children:"zrok-share"})," container."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose exec zrok-share zrok modify ${ZROK_UNIQUE_NAME} --remove-access-grant bob@example.com\n"})}),"\n",(0,o.jsx)(r.h2,{id:"going-further-with-private-access",children:"Going Further with Private Access"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Try changing the demo web server used in the private share project. One alternative demo server is provided: ",(0,o.jsx)(r.code,{children:"httpbin"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Try accessing the private share from ",(0,o.jsx)(r.em,{children:"inside"})," a container running in the private access project. One demo client is provided: ",(0,o.jsx)(r.code,{children:"demo-client"}),". You can run it like this."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up demo-client\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["You'll see in the terminal output that the demo-client container is getting a response from the private share indicating the source IP of the request from the perspective of the demo server: ",(0,o.jsx)(r.code,{children:"httpbin"})," that's running in the private share project."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"cleaning-up",children:"Cleaning Up"}),"\n",(0,o.jsx)(r.p,{children:'Run the "down" command in both Compose projects to destroy them when you\'re all done. This will stop the running containers and delete zrok environments\' storage volumes. Then delete the selected zrok environment by clicking "Actions" in the web console.'}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose down --remove-orphans --volumes\n"})})]})}function d(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>a});var s=n(6540);const o={},i=s.createContext(o);function t(e){const r=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1057],{942:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>t,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"guides/docker-share/docker_private_share_guide","title":"Docker Private Share","description":"Goal","source":"@site/../docs/guides/docker-share/docker_private_share_guide.md","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/docker_private_share_guide","permalink":"/docs/guides/docker-share/docker_private_share_guide","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/docker-share/docker_private_share_guide.md","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"title":"Docker Private Share","sidebar_position":20,"sidebar_label":"Private Share"},"sidebar":"tutorialSidebar","previous":{"title":"Public Share","permalink":"/docs/guides/docker-share/docker_public_share_guide"},"next":{"title":"Self Hosting","permalink":"/docs/category/self-hosting"}}');var o=n(4848),i=n(8453);const t={title:"Docker Private Share",sidebar_position:20,sidebar_label:"Private Share"},a=void 0,c={},l=[{value:"Goal",id:"goal",level:2},{value:"Overview",id:"overview",level:2},{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"How it Works",id:"how-it-works",level:2},{value:"Before You Begin",id:"before-you-begin",level:2},{value:"Begin Sharing Privately with zrok in Docker",id:"begin-sharing-privately-with-zrok-in-docker",level:2},{value:"Access the Private Share",id:"access-the-private-share",level:2},{value:"Closed Permission Mode",id:"closed-permission-mode",level:2},{value:"Going Further with Private Access",id:"going-further-with-private-access",level:2},{value:"Cleaning Up",id:"cleaning-up",level:2}];function h(e){const r={a:"a",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.h2,{id:"goal",children:"Goal"}),"\n",(0,o.jsx)(r.p,{children:"Privately share a Docker Compose service with a separate zrok environment and a permanent zrok share token."}),"\n",(0,o.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(r.p,{children:"With zrok, you can privately share a service that's running in Docker. You need a zrok private share running somewhere that it can reach the service you're sharing, and a zrok private access running somewhere else where you want to use the private share. Together, the private share and private access form a private point-to-point tunnel."}),"\n",(0,o.jsxs)(r.p,{children:["Here's a short article with an overview of ",(0,o.jsx)(r.a,{href:"/docs/concepts/sharing-private",children:"private sharing with zrok"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,o.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/HxyvtFAvwUE",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,o.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,o.jsx)(r.p,{children:"The Docker Compose project uses your zrok account token to reserve a private share token and keep sharing the backend target."}),"\n",(0,o.jsx)(r.p,{children:"When the project runs it will:"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["enable a zrok environment unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/environment.json"})," exists in the ",(0,o.jsx)(r.code,{children:"zrok_env"})," volume"]}),"\n",(0,o.jsxs)(r.li,{children:["reserve a private share token for the service unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," exists"]}),"\n",(0,o.jsxs)(r.li,{children:["start sharing the target specified in the ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," environment variable"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"before-you-begin",children:"Before You Begin"}),"\n",(0,o.jsxs)(r.p,{children:["To follow this guide you will need ",(0,o.jsx)(r.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"}),"."]}),"\n",(0,o.jsx)(r.p,{children:"If you have installed Docker Desktop on macOS or Windows then you are all set."}),"\n",(0,o.jsx)(r.h2,{id:"begin-sharing-privately-with-zrok-in-docker",children:"Begin Sharing Privately with zrok in Docker"}),"\n",(0,o.jsx)(r.p,{children:"First, let's create the private share."}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private share."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Download ",(0,o.jsx)(r.a,{href:"pathname:///zrok-private-share/compose.yml",children:"the zrok-private-share Docker Compose project file"})," into your new project folder and make sure it's named ",(0,o.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,o.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"If you are self-hosting zrok then it's important to set your API endpoint URL too. If you're using the hosted zrok service then you can skip this step."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_API_ENDPOINT="https://zrok.example.com"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Run your Compose project to start sharing the built-in demo web server:"}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Read the private share token from the output. One of the last lines is like this:"}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"zrok-private-share-1 | zrok access private wr3hpf2z5fiy\n"})}),"\n",(0,o.jsx)(r.p,{children:"Keep track of this token so you can use it in your zrok private access project."}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"access-the-private-share",children:"Access the Private Share"}),"\n",(0,o.jsx)(r.p,{children:"Now that we have a private share we can access it with the zrok command or by running a separate Docker Compose project."}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private access."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Download ",(0,o.jsx)(r.a,{href:"pathname:///zrok-private-access/compose.yml",children:"the zrok-private-access Docker Compose project file"})," into your new project folder and make sure it's named ",(0,o.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,o.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Now copy the zrok private access token from the zrok private share project's output to your clipboard and paste it in the same file named ",(0,o.jsx)(r.code,{children:".env"})," here in your private share project folder like this:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\nZROK_ACCESS_TOKEN="wr3hpf2z5fiy"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Run your Compose project to start accessing the private share:"}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up zrok-access\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Now your zrok private access proxy is ready on ",(0,o.jsx)(r.a,{href:"http://127.0.0.1:9191",children:"http://127.0.0.1:9191"}),". You can visit the demo web server in your browser."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"closed-permission-mode",children:"Closed Permission Mode"}),"\n",(0,o.jsx)(r.p,{children:'Normally, you need only the share token to access a private share. You can further restrict access with "closed" permission mode.'}),"\n",(0,o.jsx)(r.p,{children:"You must set the permission mode before you reserve the share."}),"\n",(0,o.jsx)(r.p,{children:"Only your own account can access the private share."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'ZROK_PERMISSION_MODE="closed"\n'})}),"\n",(0,o.jsx)(r.p,{children:"Grant access to additional zrok accounts."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:'ZROK_ACCESS_GRANTS="bob@example.com alice@example.org"\n'})}),"\n",(0,o.jsxs)(r.p,{children:["You can adjust the access grants by running the CLI inside the ",(0,o.jsx)(r.code,{children:"zrok-share"})," container."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose exec zrok-share zrok modify ${ZROK_UNIQUE_NAME} --remove-access-grant bob@example.com\n"})}),"\n",(0,o.jsx)(r.h2,{id:"going-further-with-private-access",children:"Going Further with Private Access"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Try changing the demo web server used in the private share project. One alternative demo server is provided: ",(0,o.jsx)(r.code,{children:"httpbin"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Try accessing the private share from ",(0,o.jsx)(r.em,{children:"inside"})," a container running in the private access project. One demo client is provided: ",(0,o.jsx)(r.code,{children:"demo-client"}),". You can run it like this."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up demo-client\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["You'll see in the terminal output that the demo-client container is getting a response from the private share indicating the source IP of the request from the perspective of the demo server: ",(0,o.jsx)(r.code,{children:"httpbin"})," that's running in the private share project."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"cleaning-up",children:"Cleaning Up"}),"\n",(0,o.jsx)(r.p,{children:'Run the "down" command in both Compose projects to destroy them when you\'re all done. This will stop the running containers and delete zrok environments\' storage volumes. Then delete the selected zrok environment by clicking "Actions" in the web console.'}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose down --remove-orphans --volumes\n"})})]})}function d(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>a});var s=n(6540);const o={},i=s.createContext(o);function t(e){const r=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.4f70e77d.js b/assets/js/runtime~main.38f55764.js similarity index 98% rename from assets/js/runtime~main.4f70e77d.js rename to assets/js/runtime~main.38f55764.js index e03b5a3e..aed95387 100644 --- a/assets/js/runtime~main.4f70e77d.js +++ b/assets/js/runtime~main.38f55764.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,t,c,r,d={},f={};function b(e){var a=f[e];if(void 0!==a)return a.exports;var t=f[e]={id:e,loaded:!1,exports:{}};return d[e].call(t.exports,t,t.exports,b),t.loaded=!0,t.exports}b.m=d,b.c=f,b.amdO={},e=[],b.O=(a,t,c,r)=>{if(!t){var d=1/0;for(i=0;i=r)&&Object.keys(b.O).every((e=>b.O[e](t[o])))?t.splice(o--,1):(f=!1,r0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[t,c,r]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var r=Object.create(null);b.r(r);var d={};a=a||[null,t({}),t([]),t(t)];for(var f=2&c&&e;"object"==typeof f&&!~a.indexOf(f);f=t(f))Object.getOwnPropertyNames(f).forEach((a=>d[a]=()=>e[a]));return d.default=()=>e,b.d(r,d),r},b.d=(e,a)=>{for(var t in a)b.o(a,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,t)=>(b.f[t](e,a),a)),[])),b.u=e=>"assets/js/"+({277:"4f1777fd",429:"50ef9c44",598:"9939c4f4",714:"b6569025",749:"21880a4d",887:"c015c796",957:"c141421f",1057:"bbbe662c",1235:"a7456010",1769:"aad6478e",1939:"7f5ec875",2138:"1a4e3797",2256:"11b43341",2634:"c4f5d8e4",2757:"cda0d2e5",2759:"1ba5bc99",3373:"6e881e32",3423:"e1dfe4fe",3574:"4cb7be2f",3588:"288b1075",3786:"c304be44",3921:"36b94792",3979:"2c440c24",4074:"5cd0a723",4247:"d768dc0f",4470:"f888b719",4909:"bc747cac",4927:"47881d5c",5742:"aba21aa0",6332:"2da89d45",6969:"14eb3368",7098:"a7bd4aaa",7216:"0c66edb9",7242:"6272ba0e",7499:"07d0b302",7752:"339d500a",8401:"17896441",8471:"2e812224",8582:"20595907",8675:"54fa7005",9025:"75b20590",9048:"a94703ab",9253:"e2c4d679",9355:"600b2345",9476:"7452427d",9631:"9af26a4e",9647:"5e95c892",9905:"ef8afbfd"}[e]||e)+"."+{277:"9644a82a",382:"a8e40f63",416:"36a683d5",429:"7c0dd56b",598:"0a8ed6f3",714:"ff0961c6",749:"b83bcad5",887:"32854b4b",957:"94fe8bc5",962:"3828f828",1057:"d902f20f",1235:"7b4b0a20",1769:"8dd329a2",1939:"bb718edf",2138:"b404fedf",2237:"1d1b868c",2256:"16c9fa7c",2634:"ff3bb442",2757:"ff8bbd97",2759:"b1be5922",3373:"58f05075",3423:"2892f887",3574:"a83087ce",3588:"7fdf1033",3786:"04b38e1d",3921:"799856c4",3979:"8ad59b19",4074:"8ac05e38",4247:"6175fd4d",4470:"6683df26",4909:"7ee6980c",4927:"87752858",5394:"216a6dc4",5742:"9ac6642b",6332:"2c84f779",6969:"a2fb3a9b",7098:"95046d7a",7216:"a1604a49",7242:"80d989e8",7499:"de243ccc",7752:"749f941d",8158:"900dc11d",8401:"1409512a",8471:"77794a5c",8582:"3e569479",8585:"e93703b4",8675:"cf645e57",8913:"83bce4ad",9025:"c44edc33",9048:"43814358",9253:"dd14fdd8",9355:"18130102",9476:"951c0809",9631:"b4a6cf60",9647:"6794ea18",9905:"dbcbe2ba"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},r="website:",b.l=(e,a,t,d)=>{if(c[e])c[e].push(a);else{var f,o;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{f.onerror=f.onload=null,clearTimeout(s);var r=c[e];if(delete c[e],f.parentNode&&f.parentNode.removeChild(f),r&&r.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),o&&document.head.appendChild(f)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/",b.gca=function(e){return e={17896441:"8401",20595907:"8582","4f1777fd":"277","50ef9c44":"429","9939c4f4":"598",b6569025:"714","21880a4d":"749",c015c796:"887",c141421f:"957",bbbe662c:"1057",a7456010:"1235",aad6478e:"1769","7f5ec875":"1939","1a4e3797":"2138","11b43341":"2256",c4f5d8e4:"2634",cda0d2e5:"2757","1ba5bc99":"2759","6e881e32":"3373",e1dfe4fe:"3423","4cb7be2f":"3574","288b1075":"3588",c304be44:"3786","36b94792":"3921","2c440c24":"3979","5cd0a723":"4074",d768dc0f:"4247",f888b719:"4470",bc747cac:"4909","47881d5c":"4927",aba21aa0:"5742","2da89d45":"6332","14eb3368":"6969",a7bd4aaa:"7098","0c66edb9":"7216","6272ba0e":"7242","07d0b302":"7499","339d500a":"7752","2e812224":"8471","54fa7005":"8675","75b20590":"9025",a94703ab:"9048",e2c4d679:"9253","600b2345":"9355","7452427d":"9476","9af26a4e":"9631","5e95c892":"9647",ef8afbfd:"9905"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,t)=>{var c=b.o(e,a)?e[a]:void 0;if(0!==c)if(c)t.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var r=new Promise(((t,r)=>c=e[a]=[t,r]));t.push(c[2]=r);var d=b.p+b.u(a),f=new Error;b.l(d,(t=>{if(b.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var r=t&&("load"===t.type?"missing":t.type),d=t&&t.target&&t.target.src;f.message="Loading chunk "+a+" failed.\n("+r+": "+d+")",f.name="ChunkLoadError",f.type=r,f.request=d,c[1](f)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,t)=>{var c,r,d=t[0],f=t[1],o=t[2],n=0;if(d.some((a=>0!==e[a]))){for(c in f)b.o(f,c)&&(b.m[c]=f[c]);if(o)var i=o(b)}for(a&&a(t);n{"use strict";var e,a,t,c,r,d={},f={};function b(e){var a=f[e];if(void 0!==a)return a.exports;var t=f[e]={id:e,loaded:!1,exports:{}};return d[e].call(t.exports,t,t.exports,b),t.loaded=!0,t.exports}b.m=d,b.c=f,b.amdO={},e=[],b.O=(a,t,c,r)=>{if(!t){var d=1/0;for(i=0;i=r)&&Object.keys(b.O).every((e=>b.O[e](t[o])))?t.splice(o--,1):(f=!1,r0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[t,c,r]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var r=Object.create(null);b.r(r);var d={};a=a||[null,t({}),t([]),t(t)];for(var f=2&c&&e;"object"==typeof f&&!~a.indexOf(f);f=t(f))Object.getOwnPropertyNames(f).forEach((a=>d[a]=()=>e[a]));return d.default=()=>e,b.d(r,d),r},b.d=(e,a)=>{for(var t in a)b.o(a,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,t)=>(b.f[t](e,a),a)),[])),b.u=e=>"assets/js/"+({277:"4f1777fd",429:"50ef9c44",598:"9939c4f4",714:"b6569025",749:"21880a4d",887:"c015c796",957:"c141421f",1057:"bbbe662c",1235:"a7456010",1769:"aad6478e",1939:"7f5ec875",2138:"1a4e3797",2256:"11b43341",2634:"c4f5d8e4",2757:"cda0d2e5",2759:"1ba5bc99",3373:"6e881e32",3423:"e1dfe4fe",3574:"4cb7be2f",3588:"288b1075",3786:"c304be44",3921:"36b94792",3979:"2c440c24",4074:"5cd0a723",4247:"d768dc0f",4470:"f888b719",4909:"bc747cac",4927:"47881d5c",5742:"aba21aa0",6332:"2da89d45",6969:"14eb3368",7098:"a7bd4aaa",7216:"0c66edb9",7242:"6272ba0e",7499:"07d0b302",7752:"339d500a",8401:"17896441",8471:"2e812224",8582:"20595907",8675:"54fa7005",9025:"75b20590",9048:"a94703ab",9253:"e2c4d679",9355:"600b2345",9476:"7452427d",9631:"9af26a4e",9647:"5e95c892",9905:"ef8afbfd"}[e]||e)+"."+{277:"9644a82a",382:"a8e40f63",416:"36a683d5",429:"7c0dd56b",598:"0a8ed6f3",714:"ff0961c6",749:"b83bcad5",887:"32854b4b",957:"94fe8bc5",962:"3828f828",1057:"b37b0a59",1235:"7b4b0a20",1769:"8dd329a2",1939:"bb718edf",2138:"b404fedf",2237:"1d1b868c",2256:"16c9fa7c",2634:"ff3bb442",2757:"ff8bbd97",2759:"b1be5922",3373:"58f05075",3423:"2892f887",3574:"a83087ce",3588:"7fdf1033",3786:"04b38e1d",3921:"799856c4",3979:"8ad59b19",4074:"8ac05e38",4247:"6175fd4d",4470:"6683df26",4909:"7ee6980c",4927:"87752858",5394:"216a6dc4",5742:"9ac6642b",6332:"2c84f779",6969:"a2fb3a9b",7098:"95046d7a",7216:"a1604a49",7242:"80d989e8",7499:"de243ccc",7752:"749f941d",8158:"900dc11d",8401:"1409512a",8471:"77794a5c",8582:"3e569479",8585:"e93703b4",8675:"cf645e57",8913:"83bce4ad",9025:"c44edc33",9048:"43814358",9253:"dd14fdd8",9355:"18130102",9476:"951c0809",9631:"b4a6cf60",9647:"6794ea18",9905:"dbcbe2ba"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},r="website:",b.l=(e,a,t,d)=>{if(c[e])c[e].push(a);else{var f,o;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{f.onerror=f.onload=null,clearTimeout(s);var r=c[e];if(delete c[e],f.parentNode&&f.parentNode.removeChild(f),r&&r.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),o&&document.head.appendChild(f)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/",b.gca=function(e){return e={17896441:"8401",20595907:"8582","4f1777fd":"277","50ef9c44":"429","9939c4f4":"598",b6569025:"714","21880a4d":"749",c015c796:"887",c141421f:"957",bbbe662c:"1057",a7456010:"1235",aad6478e:"1769","7f5ec875":"1939","1a4e3797":"2138","11b43341":"2256",c4f5d8e4:"2634",cda0d2e5:"2757","1ba5bc99":"2759","6e881e32":"3373",e1dfe4fe:"3423","4cb7be2f":"3574","288b1075":"3588",c304be44:"3786","36b94792":"3921","2c440c24":"3979","5cd0a723":"4074",d768dc0f:"4247",f888b719:"4470",bc747cac:"4909","47881d5c":"4927",aba21aa0:"5742","2da89d45":"6332","14eb3368":"6969",a7bd4aaa:"7098","0c66edb9":"7216","6272ba0e":"7242","07d0b302":"7499","339d500a":"7752","2e812224":"8471","54fa7005":"8675","75b20590":"9025",a94703ab:"9048",e2c4d679:"9253","600b2345":"9355","7452427d":"9476","9af26a4e":"9631","5e95c892":"9647",ef8afbfd:"9905"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,t)=>{var c=b.o(e,a)?e[a]:void 0;if(0!==c)if(c)t.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var r=new Promise(((t,r)=>c=e[a]=[t,r]));t.push(c[2]=r);var d=b.p+b.u(a),f=new Error;b.l(d,(t=>{if(b.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var r=t&&("load"===t.type?"missing":t.type),d=t&&t.target&&t.target.src;f.message="Loading chunk "+a+" failed.\n("+r+": "+d+")",f.name="ChunkLoadError",f.type=r,f.request=d,c[1](f)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,t)=>{var c,r,d=t[0],f=t[1],o=t[2],n=0;if(d.some((a=>0!==e[a]))){for(c in f)b.o(f,c)&&(b.m[c]=f[c]);if(o)var i=o(b)}for(a&&a(t);n