Пример #1
0
            PORTAL.services.addService(ssh_service)

            print("  ssh%s: %s" % (ifacestr, port))

if WEBSERVER_ENABLED:

    # Start a reverse proxy to relay data to the Server-side webserver

    websocket_started = False
    for interface in WEBSERVER_INTERFACES:
        ifacestr = ""
        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)
            web_root = EvenniaReverseProxyResource('127.0.0.1', serverport, '')
            webclientstr = ""
            if WEBCLIENT_ENABLED:
                # create ajax client processes at /webclientdata
                from evennia.server.portal import webclient_ajax

                webclient = webclient_ajax.WebClient()
                webclient.sessionhandler = PORTAL_SESSIONS
                web_root.putChild("webclientdata", webclient)
                webclientstr = "\n   + webclient (ajax only)"

                if WEBSOCKET_CLIENT_ENABLED and not websocket_started:
                    # start websocket client port for the webclient
                    # we only support one websocket client
                    from evennia.server.portal import webclient
                    from evennia.utils.txws import WebSocketFactory
Пример #2
0
            INFO_DICT["ssh"].append("ssh%s: %s" % (ifacestr, port))


if WEBSERVER_ENABLED:
    from evennia.server.webserver import Website

    # Start a reverse proxy to relay data to the Server-side webserver

    websocket_started = False
    for interface in WEBSERVER_INTERFACES:
        ifacestr = ""
        if interface not in ('0.0.0.0', '::') or len(WEBSERVER_INTERFACES) > 1:
            ifacestr = "-%s" % interface
        for proxyport, serverport in WEBSERVER_PORTS:
            web_root = EvenniaReverseProxyResource('127.0.0.1', serverport, '')
            webclientstr = ""
            if WEBCLIENT_ENABLED:
                # create ajax client processes at /webclientdata
                from evennia.server.portal import webclient_ajax

                ajax_webclient = webclient_ajax.AjaxWebClient()
                ajax_webclient.sessionhandler = PORTAL_SESSIONS
                web_root.putChild("webclientdata", ajax_webclient)
                webclientstr = "webclient (ajax only)"

                if WEBSOCKET_CLIENT_ENABLED and not websocket_started:
                    # start websocket client port for the webclient
                    # we only support one websocket client
                    from evennia.server.portal import webclient
                    from evennia.utils.txws import WebSocketFactory
Пример #3
0
            print("  ssh%s: %s" % (ifacestr, port))


if WEBSERVER_ENABLED:
    from evennia.server.webserver import Website

    # Start a reverse proxy to relay data to the Server-side webserver

    websocket_started = False
    for interface in WEBSERVER_INTERFACES:
        ifacestr = ""
        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)
            web_root = EvenniaReverseProxyResource('127.0.0.1', serverport, '')
            webclientstr = ""
            if WEBCLIENT_ENABLED:
                # create ajax client processes at /webclientdata
                from evennia.server.portal import webclient_ajax

                ajax_webclient = webclient_ajax.AjaxWebClient()
                ajax_webclient.sessionhandler = PORTAL_SESSIONS
                web_root.putChild("webclientdata", ajax_webclient)
                webclientstr = "\n   + webclient (ajax only)"

                if WEBSOCKET_CLIENT_ENABLED and not websocket_started:
                    # start websocket client port for the webclient
                    # we only support one websocket client
                    from evennia.server.portal import webclient
                    from evennia.utils.txws import WebSocketFactory
Пример #4
0
            INFO_DICT["ssh"].append("ssh%s: %s" % (ifacestr, port))


if WEBSERVER_ENABLED:
    from evennia.server.webserver import Website

    # Start a reverse proxy to relay data to the Server-side webserver

    websocket_started = False
    for interface in WEBSERVER_INTERFACES:
        ifacestr = ""
        if interface not in ('0.0.0.0', '::') or len(WEBSERVER_INTERFACES) > 1:
            ifacestr = "-%s" % interface
        for proxyport, serverport in WEBSERVER_PORTS:
            web_root = EvenniaReverseProxyResource('127.0.0.1', serverport, '')
            webclientstr = ""
            if WEBCLIENT_ENABLED:
                # create ajax client processes at /webclientdata
                from evennia.server.portal import webclient_ajax

                ajax_webclient = webclient_ajax.AjaxWebClient()
                ajax_webclient.sessionhandler = PORTAL_SESSIONS
                web_root.putChild(b"webclientdata", ajax_webclient)
                webclientstr = "webclient (ajax only)"

                if WEBSOCKET_CLIENT_ENABLED and not websocket_started:
                    # start websocket client port for the webclient
                    # we only support one websocket client
                    from evennia.server.portal import webclient
                    from autobahn.twisted.websocket import WebSocketServerFactory
Пример #5
0
            print("  ssh%s: %s" % (ifacestr, port))


if WEBSERVER_ENABLED:
    from evennia.server.webserver import Website

    # Start a reverse proxy to relay data to the Server-side webserver

    websocket_started = False
    for interface in WEBSERVER_INTERFACES:
        ifacestr = ""
        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)
            web_root = EvenniaReverseProxyResource('127.0.0.1', serverport, '')
            webclientstr = ""
            if WEBCLIENT_ENABLED:
                # create ajax client processes at /webclientdata
                from evennia.server.portal import webclient_ajax

                webclient = webclient_ajax.WebClient()
                webclient.sessionhandler = PORTAL_SESSIONS
                web_root.putChild("webclientdata", webclient)
                webclientstr = "\n   + webclient (ajax only)"

                if WEBSOCKET_CLIENT_ENABLED and not websocket_started:
                    # start websocket client port for the webclient
                    # we only support one websocket client
                    from evennia.server.portal import webclient
                    from evennia.utils.txws import WebSocketFactory