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

Ports in default_settings.py, Ports in settings.py #1365

Closed
ghost opened this Issue Jul 17, 2017 · 3 comments

Comments

Projects
1 participant
@ghost

ghost commented Jul 17, 2017

An individual Evennia instance uses 6 or 8 ports, or appears to, and some of them are declared in array format so it could potentially use a lot more, and the declarations are SCATTERED throughout default_settings.py and not even mentioned in settings.py even though they're extremely important to anyone running network services.

Even worse the port numbers themselves are just flung willy nilly across the spectrum. 4000, 4001, 8000, 8001, 5001, 8022, and the real problem is that 4000 and 4001 (telnet port vs ssl port) are totally unrelated - 8000 and 5001 are totally related (internal vs external http ports) - 8000 and 8001 are totally unrelated (http port vs websocket port) and based on the comment 'Ports to use for SSL' I'm not even really sure what port 4001 is for because SSL isn't a protocol at all - so just WTF is operating on port 4001 that is using SSL? Should I spend a few days combing through Evennia and Django and Twisted trying to figure this out?

I run multiple Evennia instances and setting each one up is a giant pain in the butt. Starting at port 4000 is a good spot because it should offer plenty (thousands) of free consecutive ports (ie ports that aren't used by FTP, HTTP, POP3, etc, or used by popular games with dedicated servers often hosted on linux such as 7 days to die, half life or Source engine, etc).

In the Evennia repository, for the sanity of anyone running multiple MUs (and therefore the future success of Evennia) port declarations absolutely need to be moved into settings.py and they need to be kept all together in one spot. They can be left in default_settings.py, but when somebody runs evennia --init mygamename they should get this:

# A list of ports the Evennia telnet server listens on Can be one or many.
TELNET_PORTS = [4000]
# The webserver sits behind a Portal proxy. This is a list
# of tuples (proxyport,serverport) used. The proxyports are what
# the Portal proxy presents to the world. The serverports are
# the internal ports the proxy uses to forward data to the Server-side
# webserver (these should not be publicly open)
WEBSERVER_PORTS = [(4001, 4002)]
# Server-side websocket port to open for the webclient.
WEBSOCKET_CLIENT_PORT = 4003
# Ports to use for SSH
SSH_PORTS = [4004]
# Ports to use for SSL
# < Insert some explanation of exactly which protocol this SSL port applies to please? >
SSL_PORTS = [4005]
# The game server opens an AMP port so that the portal can
# communicate with it. This is an internal functionality of Evennia, usually
# operating between two processes on the same machine. You usually don't need to
# change this unless you cannot use the default AMP port/host for
# whatever reason.
AMP_PORT = 4006

That way all a person has to do is add 1 to each port number in the file, for each Evennia instance they're going to run. This could even be done for them in the evennia --init script but I'm not asking for that (if I were I'd build it in myself and push it).

You don't need to provide the host config fields along with the ports because most people won't need to configure that - all you need is to configure the ports for each individual instance.

Also when I type evennia --init myGameName it should present SERVERNAME = "myGameName" but instead it presents SERVERNAME = "Mygamename" which is weaksauce. Just saying.

@Griatch

This comment has been minimized.

Show comment
Hide comment
@Griatch

Griatch Jul 18, 2017

Member

Thanks for a well reasoned feature request! This sounds like a good idea to me. Since it is an overall layout change I think it makes more sense to bake it into the Devel branch and the upcoming Evennia 0.7.

Member

Griatch commented Jul 18, 2017

Thanks for a well reasoned feature request! This sounds like a good idea to me. Since it is an overall layout change I think it makes more sense to bake it into the Devel branch and the upcoming Evennia 0.7.

@Griatch Griatch added this to TODO in Evennia 0.7 Jul 18, 2017

@Griatch Griatch moved this from TODO to In progress on devel branch in Evennia 0.7 Jul 21, 2017

Griatch added a commit that referenced this issue Jul 21, 2017

@Griatch

This comment has been minimized.

Show comment
Hide comment
@Griatch

Griatch Jul 21, 2017

Member

Implemented in devel

Member

Griatch commented Jul 21, 2017

Implemented in devel

@Griatch Griatch moved this from In progress on devel branch to Done on devel branch in Evennia 0.7 Jul 21, 2017

@Griatch Griatch added the implemented label Jul 21, 2017

@Griatch

This comment has been minimized.

Show comment
Hide comment
@Griatch

Griatch Sep 20, 2017

Member

Closed with the merger of devel branch.

Member

Griatch commented Sep 20, 2017

Closed with the merger of devel branch.

@Griatch Griatch closed this Sep 20, 2017

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