Proxy plugin module
This commit is contained in:
parent
a3169b50c2
commit
92c08bb0dc
3 changed files with 23 additions and 0 deletions
13
evennia/game_template/server/conf/proxy_plugins.py
Normal file
13
evennia/game_template/server/conf/proxy_plugins.py
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
"""
|
||||||
|
Proxy plugin hooks.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def start_proxy_service(web_root):
|
||||||
|
"""
|
||||||
|
This plugin module can define user-created services for the Portal to
|
||||||
|
start. This is necessary for exposing web-based protocols.
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
return web_root
|
||||||
|
|
@ -41,6 +41,11 @@ except Exception:
|
||||||
PORTAL_SERVICES_PLUGIN_MODULES = [
|
PORTAL_SERVICES_PLUGIN_MODULES = [
|
||||||
mod_import(module) for module in make_iter(settings.PORTAL_SERVICES_PLUGIN_MODULES)
|
mod_import(module) for module in make_iter(settings.PORTAL_SERVICES_PLUGIN_MODULES)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
PROXY_PLUGIN_MODULES = [
|
||||||
|
mod_import(module) for module in make_iter(settings.PROXY_PLUGIN_MODULES)
|
||||||
|
]
|
||||||
|
|
||||||
LOCKDOWN_MODE = settings.LOCKDOWN_MODE
|
LOCKDOWN_MODE = settings.LOCKDOWN_MODE
|
||||||
|
|
||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
|
|
@ -352,6 +357,9 @@ if WEBSERVER_ENABLED:
|
||||||
web_root.putChild(b"webclientdata", ajax_webclient)
|
web_root.putChild(b"webclientdata", ajax_webclient)
|
||||||
webclientstr = "webclient (ajax only)"
|
webclientstr = "webclient (ajax only)"
|
||||||
|
|
||||||
|
for plugin_module in PROXY_PLUGIN_MODULES:
|
||||||
|
web_root = plugin_module.start_proxy_service(web_root)
|
||||||
|
|
||||||
if WEBSOCKET_CLIENT_ENABLED and not websocket_started:
|
if WEBSOCKET_CLIENT_ENABLED and not websocket_started:
|
||||||
# start websocket client port for the webclient
|
# start websocket client port for the webclient
|
||||||
# we only support one websocket client
|
# we only support one websocket client
|
||||||
|
|
|
||||||
|
|
@ -356,6 +356,8 @@ PORTAL_SERVICES_PLUGIN_MODULES = ["server.conf.portal_services_plugins"]
|
||||||
MSSP_META_MODULE = "server.conf.mssp"
|
MSSP_META_MODULE = "server.conf.mssp"
|
||||||
# Module for web plugins.
|
# Module for web plugins.
|
||||||
WEB_PLUGINS_MODULE = "server.conf.web_plugins"
|
WEB_PLUGINS_MODULE = "server.conf.web_plugins"
|
||||||
|
# Module for Proxy plugins
|
||||||
|
PROXY_PLUGIN_MODULES = ["server.conf.proxy_plugins"]
|
||||||
# Tuple of modules implementing lock functions. All callable functions
|
# Tuple of modules implementing lock functions. All callable functions
|
||||||
# inside these modules will be available as lock functions.
|
# inside these modules will be available as lock functions.
|
||||||
LOCK_FUNC_MODULES = ("evennia.locks.lockfuncs", "server.conf.lockfuncs")
|
LOCK_FUNC_MODULES = ("evennia.locks.lockfuncs", "server.conf.lockfuncs")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue