# Zrok: access to multiple private shares at once

**URL:** <https://openziti.discourse.group/t/zrok-access-to-multiple-private-shares-at-once/1898>\
**Category:** zrok\
**Created:** [December 9, 2023, 3:46pm UTC](https://openziti.discourse.group/t/zrok-access-to-multiple-private-shares-at-once/1898 "2023-12-09T15:46:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lojanp](https://avatars.discourse-cdn.com/v4/letter/l/e47c2d/32.png) [@lojanp](https://openziti.discourse.group/u/lojanp)\
**Post date:** [December 9, 2023, 3:46pm UTC](https://openziti.discourse.group/t/zrok-access-to-multiple-private-shares-at-once/1898/1 "2023-12-09T15:46:22Z")

</div>

Hello,

My use-case:

I would need to share the server in my local network on which the application runs.  
The application consists of a frontend and a backend /API/ .

For example:/ access to the server in my private network  
fe: [https://192.168.1.239:4200](https://192.168.1.239:4200)  
be: [https://192.168.1.239:9002](https://192.168.1.239:9002)

Frontend is an angular application that calls api on the backend

First, I tried to use the reserved public share, but I had a problem with it, where SSL is used. I could not share https.

So I tried to use private tcp server sharing:  
zrok reserve private --backend-mode tcpTunnel 192.168.1.239:4200  
zrok access private

and backend:  
zrok reserve private --backend-mode tcpTunnel 192.168.1.239:9002  
zrok access private

on the client side:  
zrok access private

my question:  
Can I access both shares at the same time on the client side?

after creating the access, I could use the url: [https://127.0.0.1:9191](https://127.0.0.1:9191) on the client  
to access e.g. frontend (it will be the same for the backend /port 9191 )  
I need to access frontend and backend at the same time so that the application is functional from the outside

Thank you,

Best Regards  
Patrik

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [December 9, 2023, 3:51pm UTC](https://openziti.discourse.group/t/zrok-access-to-multiple-private-shares-at-once/1898/2 "2023-12-09T15:51:40Z")

</div>

> [@lojanp](#):
>
> First, I tried to use the reserved public share, but I had a problem with it, where SSL is used. I could not share https

Did you try the --insecure flag? I've recently discovered it myself and it seems to work for me, but TLS can definitely be tricky so your CORS headers might need to be updated for the [zrok.io](http://zrok.io) domain?

> Can I access both shares at the same time on the client side?

Sure, at this time you'll have to just run `zrok share private` twice, once for each port. (A backlog item exists to make it easier to share more than one thing easily)

I'm thinking there might be something else subtly wrong though? what you describe, to me, seems like it'd work just fine. I'll go play around for a bit and see if I can get something equivalent working...

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [December 9, 2023, 5:25pm UTC](https://openziti.discourse.group/t/zrok-access-to-multiple-private-shares-at-once/1898/3 "2023-12-09T17:25:19Z")

</div>

Ok, I went out and deployed a ziti admin console with self-signed TLS enabled and reserved a share using:

```auto
zrok reserve public https://localhost:3333

```

Then I shared that reserved share:

```auto
zrok share reserved --insecure ${token}

```

From the local machine, you can see if I connect to localhost:3333, it's serving up a certificate that's not the same:

```auto
openssl s_client -connect localhost:3333 2>&1 < /dev/null | openssl x509 -text | grep ec2
        Subject: C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ec2-3-134-108-218.us-east-2.compute.amazonaws.com server certificate
                DNS:ec2-3-134-108-218.us-east-2.compute.amazonaws.com, DNS:ip-172-31-47-200, DNS:localhost, IP Address:127.0.0.1, IP Address:3.134.108.218

```

So, it should work, I'd think. There's probably something else going on in the app?

Hope that helps...I'll try to leave that share up if you are interested in seeing it.

> **[Ziti Login](https://gksnimmy5wpm.share.zrok.io/login)**
>
> Open Ziti Management Console interface for accessing your zero trust network policies, users, and services for a provided ziti controller

---

<div class="post-metadata">

**Author:** ![lojanp](https://avatars.discourse-cdn.com/v4/letter/l/e47c2d/32.png) [@lojanp](https://openziti.discourse.group/u/lojanp)\
**Post date:** [December 18, 2023, 12:59pm UTC](https://openziti.discourse.group/t/zrok-access-to-multiple-private-shares-at-once/1898/4 "2023-12-18T12:59:29Z")

</div>

Hello,  
Super  
I tried to use --insecure, and it already works.

I currently have a problem with loading my web app (shared publicly through zrok with --insecure):  
It takes a very long time to load. Sometimes it doesn't work even after a long time

For example: vendor.js (13MB) and main.js(4MB) it takes a long time to load and then it crashes. When I refresh several times, it sometimes catches up. It is behaving strangely.  
Couldn't there be a problem with the openziti, zrok configuration?

Thank you,  
Best Regards  
Patrik

---

<div class="post-metadata">

**Author:** ![qrkourier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/qrkourier/32/52_2.png) [@qrkourier](https://openziti.discourse.group/u/qrkourier)\
**Post date:** [December 18, 2023, 2:36pm UTC](https://openziti.discourse.group/t/zrok-access-to-multiple-private-shares-at-once/1898/5 "2023-12-18T14:36:24Z")

</div>

Hi Patrik, Let's troubleshoot downloading large files through your zrok share. I assume you only see the long delay and crash when accessing the web app through zrok.

There's no file size limitation in zrok. Some zrok instances enforce usage limits, but that's different.

What's the normal download time for a 13MiB file on the same internet connection?

What does a crash look like on your end? I assume you're saying the web app crashes, not zrok crashes.

You can analyze your web app's loading times with the developer tools built into your web browser. Check out the "Network" tab. It will show you the duration and result of every HTTP request.

If your web app can listen without HTTPS, does the same problem recur when accessing the plain HTTP server with Zrok?
