mohammed90 / caddy-ngrok-listener

Caddy listener_wrapper to automatically listen on an ngrok tunnel
Apache License 2.0
20 stars 2 forks source link

Add addtional tunnel opts for http, tls, and tcp #4

Closed jtszalay closed 1 year ago

jtszalay commented 1 year ago

This PR adds the following:

jtszalay commented 1 year ago

Thanks for taking the time to review all these PRs! I was trying to get a caddy-ngrok plugin started last month but was struggling to get the foundations together. I kept trying to figure out how to make it listen on the ngrok listener AND the default caddy listener. I didn't think to drop the incoming listener and just return the ngrok listener.

I've since come across this project this week: https://github.com/daniel-garcia/multilistener/blob/master/listener.go Thoughts on making this a multilistener so that local address and port still work?

mohammed90 commented 1 year ago

Thanks for taking the time to review all these PRs! I was trying to get a caddy-ngrok plugin started last month but was struggling to get the foundations together.

Thank YOU for those PRs! I loved seeing them coming. They brought the project to maturity faster than it would've taken me 😁

I kept trying to figure out how to make it listen on the ngrok listener AND the default caddy listener.

Ignoring Caddy's listener just felt natural for the purpose of the module 😂

I've since come across this project this week: https://github.com/daniel-garcia/multilistener/blob/master/listener.go Thoughts on making this a multilistener so that local address and port still work?

Intriguing! But I'm not sure whether users will naturally expect both listeners to work, because it's a "wrapper", or only ngrok's listener because it's ngrok. Do you think it's possible to have a toggle? You don't have to go the toggle route, I'm genuinely curious which way is better.

I don't personally use ngrok, even though I drafted this module, so I can't have a solid opinion on it. What do you think users expect?