SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

The "ngrok" tunnel is closed. Dig a "zrok" tunnel next time!

🥺 < I am building ComfyUI on Amazon SageMaker Studio Lab.
I was using ngrok, but the free plan now has bandwidth limits,
making it unusable. Could you find me another free tunneling
tool (service) I can use?


Indeed, the free plan for ngrok does have limitations. There are several other free tunneling tools available, so let me introduce them to you:

  1. LocalTunnel
    Similar to ngrok, this is a tool for exposing local servers to the outside. It is easy to set up and free to use.
    - Official site: LocalTunnel

  2. localhost.run
    A service that uses SSH tunnels to expose local servers.
    It is simple and effective.
    - Official site: localhost.run

  3. Expose
    An open-source tunneling tool written in Golang that is free to use.
    It is useful for testing webhooks and exposing local development servers.
    - Official site: Expose


🤔 < I looked into LocalTunnel, but it seems that large
applications like ComfyUI do not work well with it. Do you have any others?


As for free tunneling tools that can handle large applications,
the following are available:

  1. PageKite
    An open-source tunneling software that has a free plan. It is particularly useful when you need a sustainable connection.

  2. Cloudflare Tunnel
    You can use Cloudflare's free plan to expose local servers to the outside. The setup is a bit complex, but it is free to use.

  3. Zrok
    An open-source tunneling tool that has a free plan. It is particularly
    suitable for sharing backends.

You might want to try these tools as well. Is there any one
you would like to try? I can also help with specific setup methods,
so please feel free to let me know.


😶 < "Zrok" is new to me. What kind of tool is it?


Zrok is an open-source tunneling tool based on the OpenZiti
platform. It has the following features:

Features

  • Secure tunneling
    Zrok uses a zero-trust network to securely tunnel
    applications and resources.

  • Easy setup
    Installation and configuration are simple, and you can start tunneling in minutes.

  • Flexible options
    Private or public tunneling is possible, making it suitable for home or office use.

  • Open source
    It is provided as open source and can also be self-hosted.

How to use

  1. Download and install
    Download the Zrok binary and install it.

  2. Create an account
    Create an account using the zrok invite command.

  3. Enable environment
    Enable the tunneling environment using the zrok enable command.

  4. Share resources
    Easily share resources using the zrok share command.

For detailed information and downloads, please visit the official Zrok website.

Would you like to try Zrok?
Also, feel free to ask if you have any other questions!


😲 < I am interested.
   I want to use it in SageMaker Studio Lab, so please give me the setup steps!


Certainly!
Below are the steps to set up tunneling using Zrok.

Step 1: Check the official Zrok website

  1. Access the official Zrok website.

  2. Look for the download section and check the links for the latest binary files.

Step 2: Check the GitHub repository

  1. Access the Zrok GitHub repository.

  2. Look for the latest release tags or binary files.

If you cannot find the latest link, please
report the issue on the GitHub Issues page or contact the support team.

Please let me know if you have any other questions or need further support.


🤔 < There were three types of download links for Linux: "x86_64", "ARM64", and "ARM".
   Which one should I use for SageMaker Studio Lab?
😏 < If possible, I want to automate it, so please provide it in notebook format.


Since SageMaker Studio Lab typically uses the x86_64 (or amd64) architecture,
I recommend downloading the x86_64 version.

The following is a notebook-style guide for installing and using Zrok using the x86_64 version:

Zrok Installation and Usage Steps

Cell 1: Downloading Zrok

[ python ]

# Zrokのバイナリをダウンロード
!wget https://github.com/openziti/zrok/releases/download/v1.0.2/zrok_1.0.2_linux_amd64.tar.gz -O zrok.tar.gz

Cell 2: Extracting the binary

Extract the downloaded tar.gz file.

[ python ]

# バイナリを解凍
!tar -xzf zrok.tar.gz

Cell 3: Granting execution permissions

Grant execution permissions to the extracted binary.

[ python ]

# 解凍されたバイナリに実行権限を付与
!chmod +x zrok

Cell 4: Configuring Zrok

Configure Zrok.

[ python ]

# Zrokの設定
!zrok enable [あなたのトークン]

🤔 < I ran it and got this message back. Is this correct?
   ]10;?[ 3.361] INFO main.(*enableCommand).run: the zrok environment was successfully enabled...


That message is normal! Since it says "the zrok environment was successfully enabled...", it indicates that the Zrok environment has been correctly enabled.
Let's move on to the next step.

Cell 5: Sharing resources

Tunnel your resources.

[ python ]

# 公開リソースの共有
!zrok share public http://localhost:8888

With this, you can now expose your local host port (e.g., 8888) to the outside world via a tunnel using Zrok.

Please try running each cell in order. If any errors occur or if you have any other questions, please let me know. I am here to support you!


😄 < I clicked the link that appeared, and ComfyUI started up!
   This is amazing, thank you!!
😲 < By the way, are there any limitations to the zrok free plan?
   For example, is it only free for 30 days, or does it become paid if traffic exceeds 2GB?


Indeed, according to the official zrok website, the free plan has the following limitations:

  • Free Plan
    5GB/day traffic, 2 environments, 5 shared backends (2 reserved), 5 private access frontends.

  • Paid Plan
    20GB/day traffic, 5 environments, 10 shared backends, 10 private access frontends.

While the zrok free plan has limits on daily traffic and the number of available backends and frontends, it does not appear to have a trial period limit.


😄 < Understood! Thank you very much!!


You're very welcome! I'm glad I could help.
I'm happy to hear that tunneling with Zrok is working well for you. If you have any more
questions or need support in the future, please feel free to reach out anytime.

Have a wonderful day! 🚀😊


😄 < It's been almost a year since I switched from "ngrok" to "zrok",
and I have never once hit the daily bandwidth limit, even on the free plan.
Even after four hours of intensive image generation, the traffic stays
under 5GB. I highly recommend it!


[ Related Articles ]


いいなと思ったら応援しよう!

本地 那史 こんな記事でもよろしければ応援お願いします!もっと文音を可愛くして見せます!そして、その過程で得た知見を世に送り出していきます。