Ghoster icon indicating copy to clipboard operation
Ghoster copied to clipboard

would it be possible to keep the same port everytime

Open RUGMJ opened this issue 5 years ago • 7 comments
trafficstars

RUGMJ avatar Aug 06 '20 13:08 RUGMJ

@RUGMJ7443 Currently, yes and no. Yes: The server picks the first available port in the range, meaning that if that port is always available, you will get the same port. This is typically the case when you forward one app at a time.

No: When that port is taken (say, by another user or app) then the port will be skipped and you get the next port in line.

We could implement a thing where we divide the range over a set of users (i.e if you have a range of 100 ports and 4 users in the system, then 4 users will each get a range of 25 ports, making sure that the ports of your choosing are not affected by other users.)

peterwilli avatar Aug 06 '20 14:08 peterwilli

How do I choose the range of ports I'd like to use

RUGMJ avatar Aug 06 '20 14:08 RUGMJ

How do I choose the range of ports I'd like to use

There's a sample config file, you can set your range there (rename it to config.js to make sure it's recognized). If you decide to run it with Docker, then you also have to change the ranges there so that the ports are forwarded outside of the container.

peterwilli avatar Aug 06 '20 14:08 peterwilli

I'm sorry to be a pain I don't use ssh that much

Where do I put that file?

RUGMJ avatar Aug 06 '20 14:08 RUGMJ

No problem, there's a config.sample.js file in the src/ folder when you clone the repository. You can rename that to config.js, and set your account there (you can simply rename the test username and password to something more private).

peterwilli avatar Aug 06 '20 14:08 peterwilli

and then i ssh into ssh user@ghoster_server.com -p 2222 -R 0:localhost:3000

RUGMJ avatar Aug 06 '20 14:08 RUGMJ

@RUGMJ7443 You need to host it yourself, at the moment. So ghoster_server.com is an example. However, should people be interested, I'm ok with hosting a public version with limited timeouts and port ranges (for testing purposes as I can't guarantee uptime).

peterwilli avatar Aug 06 '20 17:08 peterwilli