alexdlaird / pyngrok

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

Choosing region not working #32

Closed supercoder186 closed 4 years ago

supercoder186 commented 4 years ago

The region is not being selected on a tcp tunnel despite setting it in the options

host = ngrok.connect(8080, proto='tcp', options={'region': 'in'}) this would be equivalent to ngrok tcp -region=in 8080

Expected Behavior This should lead to the creation of a tcp tunnel with region in, but this is instead created with the US (default) region

Environment

The connection still opens in the default location, the US every time. No errors are being thrown, but the tcp tunnel just opens with the us region

alexdlaird commented 4 years ago

I'll try this again using a Windows machine, perhaps then I will be able to implement a good workaround in the project itself. In the meantime though, this has been identified previously as an issue with ngrok itself, and a workaround you can use is described here: https://github.com/alexdlaird/pyngrok/issues/26#issuecomment-581751014

supercoder186 commented 4 years ago

Okay this works. Thank you

alexdlaird commented 4 years ago

I was able to reproduce this on Windows—it appears to work when using pyngrok's ngrok command from the command line but the region parameter in options is not propagating through. I will take a look at this.

alexdlaird commented 4 years ago

See: https://github.com/alexdlaird/pyngrok/issues/26

alexdlaird commented 4 years ago

This is now natively supported in 2.1.0 with the region paramter.

Thanks for raising this, and sorry for the prior confusion on where the issue was!