alexdlaird / pyngrok

A Python wrapper for ngrok
https://pyngrok.readthedocs.io
MIT License
416 stars 59 forks source link

Question: how to use an Edge endpoint? #113

Closed angel-luis closed 10 months ago

angel-luis commented 10 months ago

Hi, I can't figure out how to connect to the Ngrok endpoint. I've the edge id and the domain, but I don't know how to use it with ngrok.connect(). I've tried ngrok.connect( addr=port, proto="http", domain="random-name.ngrok-free.app") but it throws ERR_NGROK_381.

alexdlaird commented 10 months ago

Since Edge isn't accessible from the client API, I don't see a way to use Edge endpoints with pyngrok. The domain parameter is meant for mounting your own domain, not an edge domain, hence why you're getting a 381 error, indicating the domain already exists. Presently this isn't something we plan to support, but would be an interesting addition to the library if it was contributed.

alexdlaird commented 10 months ago

Basic support for ngrok's Cloud Edge is being proposed in PR #117, which should be merged in the next couple days. Then you'll see it in pyngrok 6.1.0.