Comments (10)
@NerdYouDontKnow @radiospiel @rhomeister
This is now live on ngrok.com. Version 1.5 binaries are available on https://ngrok.com/download. If you just restart ngrok, your installation should auto-update.
Docs are on the website but it's simple enough to explain here. There's a new "remote_port" attribute you can specify in your configuration on tcp tunnels:
tunnels:
ssh:
remote_port: 60001
proto:
tcp: 22
Please be advised that on ngrok.com, you may only reserve ports 50000-65353. The rest are reserved for me =)
I'm not adding a way to do this on the command line unless there is sufficient interest. I'd prefer to leave the CLI as simple as possible.
from ngrok.
I have been told that this will be added this week
from ngrok.
@rhomeister @NerdYouDontKnow As promised: commit 98902cf
Leaving this open until I get a chance to write the docs + release new binaries.
from ngrok.
This looks awesome already, thanks! A few questions though:
- is the server able to verify that a specific client (via its auth_token) is actually entitled to use the requested port? Ideally the ngrokd binary could be used to change the configuration of a running ngrokd process; but even a easily hackable custom configuration callback would probably suffice already.
- from a look at the source I feel the server tries to forward to a randomly chosen port if the requested port is not available; I think it should just return an error in that case. It might be possible however that I just don't understand the source completely :)
from ngrok.
Right now, there is no concept of a specific client being entitled to the requested port. I was planning on adding this to ngrok.com possibly as a paid feature for you to be able to reserve a domain/port that will be guaranteed never to be given to another user.
It would be really cool if ngrokd could be hot-reloaded or that there were an interface for customizing ngrokd's tunnel allocations. I'll take pull requests =)
The server will never assign you a random port if you ask for one specifically, the relevant code is here:
98902cf#diff-ce50bf6fa1855f8ac1439bedd572083aR131
The confusing code you saw is here:
98902cf#diff-ce50bf6fa1855f8ac1439bedd572083aR148
That log message should read: Failed to get cached port %d: %v, trying a random one. Ports get cached so that when you reconnect (either purposefully or when the network goes down), if you asked for a random port ngrokd makes a best effort to give you back the one you used previously, but obviously no guarantees.
from ngrok.
So when will this be available on ngrok.com?
On Oct 18, 2013, at 4:50 PM, inconshreveable [email protected] wrote:
Right now, there is no concept of a specific client being entitled to the requested port. I was planning on adding this to ngrok.com possibly as a paid feature for you to be able to reserve a domain/port that will be guaranteed never to be given to another user.
It would be really cool if ngrokd could be hot-reloaded or that there were an interface for customizing ngrokd's tunnel allocations. I'll take pull requests =)
The server will never assign you a random port if you ask for one specifically, the relevant code is here:
98902cf#diff-ce50bf6fa1855f8ac1439bedd572083aR131The confusing code you saw is here:
98902cf#diff-ce50bf6fa1855f8ac1439bedd572083aR148That log message should read: Failed to get cached port %d: %v, trying a random one. Ports get cached so that when you reconnect (either purposefully or when the network goes down), if you asked for a random port ngrokd makes a best effort to give you back the one you used previously, but obviously no guarantees.
—
Reply to this email directly or view it on GitHub.
from ngrok.
@inconshreveable sorry for my late reply. I finally found the time to work with ngrokd on a custom project and to revisit this issue. Thank you for your explanation, I will see how I fare.
from ngrok.
Question regarding the remote port. Those are shared amongst all ngrok users, is it not? So, I can attempt to have a service run this, but if someone is already using that port, it will fail. Is there a way to use subdomain instead, so that there isn't a possibility for collision?
from ngrok.
At the moment, no, that's not possible.
from ngrok.
Okay thanks!
from ngrok.
Related Issues (20)
- ngrok status reconnecting issue failed to send authentication request: read tcp HOT 6
- Ngrok in the termux HOT 2
- React + Express + Socket.io + Ngrok HOT 2
- Not registering server responses HOT 3
- question regarding memory usage HOT 2
- "An SSL error has occurred and a secure connection to the server cannot be made" HOT 1
- ngrok service doesn't reconnect after laptop sleep with ERR_NGROK_334 HOT 3
- Proposal to Fork and Maintain ngrok HOT 4
- There was an issue when use ngrok http http://xxx.xxx.xxx.xxx HOT 1
- Ngrok not working correctly for me HOT 1
- NGROK won't send image if it is embedded in HTML HOT 1
- "no longer signed" error when updating with apt on Ubuntu HOT 2
- NgRok minecraft 1 20 4 server (vanila) HOT 2
- Issue in sending sensor data from ESP8266 to Ngrok tunnel HOT 1
- Successfully create tunnel, not able to connect to it HOT 1
- Threat detected by Windows Security: AndroidOS/ZkarletFlash HOT 1
- Can't connect to gRPC
- Ngrok service start failed on macos HOT 2
- Consider transferring issues to the new repo HOT 3
- Reconnection issue with ngrok while tunneling HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngrok.