# Start Telnet+SSL game connection (requires PyOpenSSL). from evennia.server.portal import telnet_ssl for interface in SSL_INTERFACES: ifacestr = "" 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) factory = protocol.ServerFactory() factory.noisy = False factory.sessionhandler = PORTAL_SESSIONS factory.protocol = telnet_ssl.SSLProtocol ssl_context = telnet_ssl.getSSLContext() if ssl_context: ssl_service = internet.SSLServer(port, factory, telnet_ssl.getSSLContext(), interface=interface) ssl_service.setName('EvenniaSSL%s' % pstring) PORTAL.services.addService(ssl_service) INFO_DICT["telnet_ssl"].append("telnet+ssl%s: %s" % (ifacestr, port)) else: INFO_DICT["telnet_ssl"].append( "telnet+ssl%s: %s (deactivated - keys/cert unset)" % (ifacestr, port)) if SSH_ENABLED:
# Start Telnet+SSL game connection (requires PyOpenSSL). from evennia.server.portal import telnet_ssl for interface in SSL_INTERFACES: ifacestr = "" 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) factory = protocol.ServerFactory() factory.noisy = False factory.sessionhandler = PORTAL_SESSIONS factory.protocol = telnet_ssl.SSLProtocol ssl_context = telnet_ssl.getSSLContext() if ssl_context: ssl_service = internet.SSLServer(port, factory, telnet_ssl.getSSLContext(), interface=interface) ssl_service.setName('EvenniaSSL%s' % pstring) PORTAL.services.addService(ssl_service) INFO_DICT["telnet_ssl"].append("telnet+ssl%s: %s" % (ifacestr, port)) else: INFO_DICT["telnet_ssl"].append( "telnet+ssl%s: %s (deactivated - keys/cert unset)" % (ifacestr, port)) if SSH_ENABLED:
# Start Telnet+SSL game connection (requires PyOpenSSL). from evennia.server.portal import telnet_ssl for interface in SSL_INTERFACES: ifacestr = "" 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) factory = protocol.ServerFactory() factory.noisy = False factory.sessionhandler = PORTAL_SESSIONS factory.protocol = telnet_ssl.SSLProtocol ssl_context = telnet_ssl.getSSLContext() if ssl_context: ssl_service = internet.SSLServer( port, factory, telnet_ssl.getSSLContext(), interface=interface ) ssl_service.setName("EvenniaSSL%s" % pstring) PORTAL.services.addService(ssl_service) INFO_DICT["telnet_ssl"].append("telnet+ssl%s: %s" % (ifacestr, port)) else: INFO_DICT["telnet_ssl"].append( "telnet+ssl%s: %s (deactivated - keys/cert unset)" % (ifacestr, port) ) if SSH_ENABLED: