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 web_allow_hosts to the config #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

codymoorhouse
Copy link

@codymoorhouse codymoorhouse commented Jan 27, 2023

What is in this PR?

As part of the latest version of ngrok (changelog) a new configuration was added and enforced.

Added DNS rebinding protection which includes web_allow_hosts configuration.

This PR adds an allow_hosts option so that other web hostnames can be used to inspect the tunnel.
Screenshot 2023-01-27 at 9 57 05 AM

Before

215147588-2135a5b1-eaad-4331-8b57-3b81f03886be

After

215147349-7ccae9c7-f02b-4908-86d7-319c478c830f

QA

Can test this by manually copy and pasting the changes into: /Users/{USERNAME}/.rvm/gems/ruby-2.7.6/bundler/gems/ngrok-tunnel-c2bf7ddea04a/lib/ngrok/tunnel.rb and then booting up the ngrok server. Then add localhost.test into a allow_hosts key when spinning up (starting) the tunnel

@codymoorhouse
Copy link
Author

Hey @jcw- (permissions are pretty limited here, couldn't assign you and had to fork the repo to make this PR). But the PR is ready, not a huge change or anything, let me know if you have any questions!

@jcw-
Copy link

jcw- commented Feb 2, 2023

Thanks for digging into this @codymoorhouse!

I believe the pattern here is to make an empty config file to force ngrok to stop looking for any real ones that might be present on the user's system, and then to control the config entirely via the options setup in ngrok_exec_params. So I think ideally we would add this new config there, if possible?

@codymoorhouse
Copy link
Author

Thanks for digging into this @codymoorhouse!

I believe the pattern here is to make an empty config file to force ngrok to stop looking for any real ones that might be present on the user's system, and then to control the config entirely via the options setup in ngrok_exec_params. So I think ideally we would add this new config there, if possible?

Ah yes, didn't even consider that and that does make sense. Unfortunately I just checked the available flags and I don't see one we could leverage for this specific configuration, so I think for the time we are stuck with the config file approach 😞

@codymoorhouse
Copy link
Author

Hey @jcw- just wondering if there are any other changes you might need/foresee here. Was hoping to merge in the other PR in our other repo, but it won't have any affect until this is deployed and packaged up

@jcw-
Copy link

jcw- commented Aug 1, 2023

sorry for the extended delay on this one @codymoorhouse - at this point, I'm going to see if Dev Accel can pick this one up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants