diff --git a/src/server/portal/portal.py b/src/server/portal/portal.py index d4d3333055..8d2c953c85 100644 --- a/src/server/portal/portal.py +++ b/src/server/portal/portal.py @@ -175,11 +175,8 @@ if TELNET_ENABLED: from src.server.portal import telnet for interface in TELNET_INTERFACES: - if ":" in interface: - print " iPv6 interfaces not yet supported" - continue ifacestr = "" - if interface != '0.0.0.0' or len(TELNET_INTERFACES) > 1: + if interface not in ('0.0.0.0', '::') or len(TELNET_INTERFACES) > 1: ifacestr = "-%s" % interface for port in TELNET_PORTS: pstring = "%s:%s" % (ifacestr, port) @@ -199,11 +196,8 @@ if SSL_ENABLED: from src.server.portal import ssl for interface in SSL_INTERFACES: - if ":" in interface: - print " iPv6 interfaces not yet supported" - continue ifacestr = "" - if interface != '0.0.0.0' or len(SSL_INTERFACES) > 1: + if interface not in ('0.0.0.0', '::') or len(SSL_INTERFACES) > 1: ifacestr = "-%s" % interface for port in SSL_PORTS: pstring = "%s:%s" % (ifacestr, port) @@ -228,11 +222,8 @@ if SSH_ENABLED: from src.server.portal import ssh for interface in SSH_INTERFACES: - if ":" in interface: - print " iPv6 interfaces not yet supported" - continue ifacestr = "" - if interface != '0.0.0.0' or len(SSH_INTERFACES) > 1: + if interface not in ('0.0.0.0', '::') or len(SSH_INTERFACES) > 1: ifacestr = "-%s" % interface for port in SSH_PORTS: pstring = "%s:%s" % (ifacestr, port) @@ -250,11 +241,8 @@ if WEBSERVER_ENABLED: # Start a reverse proxy to relay data to the Server-side webserver for interface in WEBSERVER_INTERFACES: - if ":" in interface: - print " iPv6 interfaces not yet supported" - continue ifacestr = "" - if interface != '0.0.0.0' or len(WEBSERVER_INTERFACES) > 1: + if interface not in ('0.0.0.0', '::') or len(WEBSERVER_INTERFACES) > 1: ifacestr = "-%s" % interface for proxyport, serverport in WEBSERVER_PORTS: pstring = "%s:%s<->%s" % (ifacestr, proxyport, serverport) diff --git a/src/settings_default.py b/src/settings_default.py index dca957a9c8..a03c0d8d10 100644 --- a/src/settings_default.py +++ b/src/settings_default.py @@ -26,7 +26,7 @@ TELNET_ENABLED = True # A list of ports the Evennia telnet server listens on # Can be one or many. TELNET_PORTS = [4000] -# Interface addresses to listen to. If 0.0.0.0, listen to all. +# Interface addresses to listen to. If 0.0.0.0, listen to all. Use :: for IPv6. TELNET_INTERFACES = ['0.0.0.0'] # OOB (out-of-band) telnet communication allows Evennia to communicate # special commands and data with enabled Telnet clients. This is used @@ -50,7 +50,7 @@ ALLOWED_HOSTS = ["*"] # the internal ports the proxy uses to forward data to the Server-side # webserver (these should not be publicly open) WEBSERVER_PORTS = [(8000, 5001)] -# Interface addresses to listen to. If 0.0.0.0, listen to all. +# Interface addresses to listen to. If 0.0.0.0, listen to all. Use :: for IPv6. WEBSERVER_INTERFACES = ['0.0.0.0'] # IP addresses that may talk to the server in a reverse proxy configuration, # like NginX. @@ -66,13 +66,13 @@ WEBCLIENT_ENABLED = True SSH_ENABLED = False # Ports to use for SSH SSH_PORTS = [8022] -# Interface addresses to listen to. If 0.0.0.0, listen to all. +# Interface addresses to listen to. If 0.0.0.0, listen to all. Use :: for IPv6. SSH_INTERFACES = ['0.0.0.0'] # Actiave SSL protocol (SecureSocketLibrary) SSL_ENABLED = False # Ports to use for SSL SSL_PORTS = [4001] -# Interface addresses to listen to. If 0.0.0.0, listen to all. +# Interface addresses to listen to. If 0.0.0.0, listen to all. Use :: for IPv6. SSL_INTERFACES = ['0.0.0.0'] # The path that contains this settings.py file (no trailing slash). BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))