quarkiverse / quarkus-ngrok

ngrok is a globally distributed reverse proxy fronting your web services running in any cloud or private network, or your machine
https://docs.quarkiverse.io/quarkus-ngrok/dev/index.html
Apache License 2.0
7 stars 7 forks source link

Get same URL on every execution, is it possible? #95

Closed raul-and closed 8 months ago

raul-and commented 8 months ago

Hello, I'm a student creating one of my first selfmade projects, I'm making a telegram bot using quarkus and ngrok. In order to process the messages I send to the bot via Telegram I have to use a class which has to extend TelegramWebhookBot, that class has some abstract methods which have to be overriden. The method I'm having problems with is called "getBotPath", it basically returns the path of the bot a.k.a ngrok endpoint. Everytime I execute the quarkus app a new endpoint is generated, I need it to be consistent, is there anyway possible you can help me with this problem?

Thanks.

melloware commented 8 months ago

I could be wrong but I think you have to pay NGrok for an account that gives you a dedicated URL. The free version automatically assigns you a different address every restart.

geoand commented 8 months ago

I'm no ngrok expert, but I think the same as @melloware

gsmet commented 8 months ago

If it’s for testing, you can also give smee.io a try.

Also do you need the url to be stable or do you need it to be accessible so that you can return it?

raul-and commented 8 months ago

Yes it's for testing, I will have a look on smee.io thanks. I think both ways work, if it's accessible and I can return it on getBotPath method it will work, also if its consistent I can put it on application.properties and reference it from there.

gsmet commented 7 months ago

@raul-and you will probably be interested by @maxandersen 's work here: https://github.com/quarkiverse/quarkus-ngrok/pull/98

raul-and commented 7 months ago

@gsmet @melloware Thanks! That's very useful.

maxandersen commented 7 months ago

Correct. Ngrok does allow one free static domain for its free plan. Just needs the domain to be set once #98 is in.