automatic icon indicating copy to clipboard operation
automatic copied to clipboard

Add ngrok support

Open dwu11 opened this issue 2 years ago • 9 comments

Description

Add support to access ui remotely through ngrok.

Notes

Uses the ngrok-py implementation from Automatic1111's webui with some small alterations to the library installation. Same command line args.

Environment and Testing

Windows 11 Pro, Python 3.10

dwu11 avatar Aug 11 '23 15:08 dwu11

problem with ngrok is supportability - if i merge this pr, then it becomes a supported solution and i have no chance of providing support since neither me or any of the active devs have ever worked with ngrok. unless you wish that i assign every future ngrok related issue to you?

on the other hand, this would be a perfect thing to write and release as an extension.

vladmandic avatar Aug 11 '23 15:08 vladmandic

But does it really have to be integrated? Set up ngrok are 2 commands, and 1 to run it.

tcmaps avatar Aug 13 '23 10:08 tcmaps

how well does it work? do ui components render correctly? refresh correctly? what about actual execution? i have no way to run any tests.

vladmandic avatar Aug 13 '23 10:08 vladmandic

I used ngrok on sagemaker and hadn't anything to complain so far, seems even faster than cloudflared. Only caveat may be the session limit of 1h with a free plan. It's quick to setup, pip install pyngrok will provide the ngrok binary in a shell also.

tcmaps avatar Aug 13 '23 10:08 tcmaps

i get what you're saying, but please understand what i'm saying - i have no idea about ngrok and unless someone is willing to own that, i'm not merging. but like i said, this would be near-trivial to write as an extension - why not do that?

vladmandic avatar Aug 13 '23 11:08 vladmandic

oh actually my initial question was more directed at op, whether integration/extension into the repo are even required, because it's simple enough to use as standalone package.

tcmaps avatar Aug 13 '23 11:08 tcmaps

oh actually my initial question was more directed at op, whether integration/extension into the repo are even required, because it's simple enough to use as standalone package.

True it's as simple as:

pip install pyngrok
ngrok config add-authtoken <YOUR_AUTHTOKEN>
ngrok http 7860

florianperrenet avatar Sep 11 '23 10:09 florianperrenet

Resources included for free, Ngrok:

Resource Limit on Free
Users 1
Active Endpoints1 1
ngrok static domain 1
Tunnels per agent up to 3
Bandwidth 1 GB/month
TCP Connection Rate 120/min
Agents 1
Edges 1
Logs/Events Up to 10,000 per month
OAuth/OIDC MAU Up to 5 per month
HTTP Requests Up to 100,000/month
Webhook verifications Up to 500/month

1 GB/month of bandwidth is not nearly enough for stable diffusion operations, frp integration would be awesome as a self-hosted option

HashedViking avatar Nov 08 '23 15:11 HashedViking

moving status to draft until maintainer is found.

vladmandic avatar Nov 18 '23 16:11 vladmandic

a year later and nobody volunteered so closing the pr. i cannot merge something i never tried in my life and be expected to maintain it myself.

vladmandic avatar Oct 21 '24 23:10 vladmandic