Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add domain option for tunnel creation #312

Merged
merged 2 commits into from
May 21, 2024

Conversation

glxgxr
Copy link
Contributor

@glxgxr glxgxr commented Jul 27, 2023

Since April 2023 it is possible to configure the domain option on tunnel creation with the ngrok client, so that you are able to use the free domain (without having to pay for a static subdomain). This merge request makes it possible to use it, otherwise it would just be ignored.

Reference:
https://ngrok.com/blog-post/new-ngrok-domains
https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/ngrok/#flags-12

@coffeduong
Copy link

@glxgxr I've tried apply your code in utils.js but it still random domain. I think it need to change other places too.
About document, we should update more in Options section, set domain in example code will make easier for understand.

@glxgxr
Copy link
Contributor Author

glxgxr commented Aug 5, 2023

@coffeduong What options did you use to initiate the tunnel? I am using

        const conf = {
            domain: "xxx.ngrok-free.app",
            region: "eu",
            addr: "3007",
            authtoken: "xxx"
        };

and it works fine.

Update: I'll update the documentation with an example to make it a little bit clearer.

@coffeduong
Copy link

@glxgxr @bubenshchykov the code is working, please merge it for the community

@pschild
Copy link

pschild commented Sep 28, 2023

Hi,
Very interested in this🔥Are there any plans when this PR is going to be merged? 😃
Thanks!

@glxgxr
Copy link
Contributor Author

glxgxr commented Oct 18, 2023

@philnash Any chances in merging this pull request? I think this could be very helpful for many services that use this package. 🙂

@shamoons
Copy link

shamoons commented Nov 9, 2023

Would love to have this in

@tnarik
Copy link

tnarik commented May 21, 2024

please, @bubenshchykov , merge this, as it is a very simple change that mostly just add the new additional option supported by the actual ngrok client to this library. Patching a local version of ngrok is trivial, but it would be so much better if it gets officially supported.

@bubenshchykov
Copy link
Owner

better later than never! :) merged... now trying to restore my npm access to publish, cc @philnash in case you can publish sooner

@bubenshchykov bubenshchykov merged commit 9904823 into bubenshchykov:master May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants