Add option for socketio admin ui
This commit is contained in:
parent
fdcae7edab
commit
935add9144
2 changed files with 5 additions and 1 deletions
|
@ -11,7 +11,8 @@ run the client or server functions.
|
||||||
Client usage: syng client [-h] [--room ROOM] [--secret SECRET] \
|
Client usage: syng client [-h] [--room ROOM] [--secret SECRET] \
|
||||||
[--config-file CONFIG_FILE] [--server SERVER]
|
[--config-file CONFIG_FILE] [--server SERVER]
|
||||||
Server usage: syng server [-h] [--host HOST] [--port PORT] [--root-folder ROOT_FOLDER] \
|
Server usage: syng server [-h] [--host HOST] [--port PORT] [--root-folder ROOT_FOLDER] \
|
||||||
[--registration-keyfile REGISTRATION_KEYFILE] [--private] [--restricted]
|
[--registration-keyfile REGISTRATION_KEYFILE] [--private] [--restricted] \
|
||||||
|
[--admin-password PASSWORD]
|
||||||
GUI usage: syng gui
|
GUI usage: syng gui
|
||||||
|
|
||||||
The config file for the client should be a yaml file in the following style::
|
The config file for the client should be a yaml file in the following style::
|
||||||
|
@ -108,6 +109,7 @@ def main() -> None:
|
||||||
server_parser.add_argument("--registration-keyfile", "-k", default=None)
|
server_parser.add_argument("--registration-keyfile", "-k", default=None)
|
||||||
server_parser.add_argument("--private", "-P", action="store_true", default=False)
|
server_parser.add_argument("--private", "-P", action="store_true", default=False)
|
||||||
server_parser.add_argument("--restricted", "-R", action="store_true", default=False)
|
server_parser.add_argument("--restricted", "-R", action="store_true", default=False)
|
||||||
|
server_parser.add_argument("--admin-password", "-A", default=None)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
|
@ -1227,6 +1227,8 @@ class Server:
|
||||||
self.app.router.add_route("*", "/{room}/", self.root_handler)
|
self.app.router.add_route("*", "/{room}/", self.root_handler)
|
||||||
|
|
||||||
self.app.cleanup_ctx.append(self.background_tasks)
|
self.app.cleanup_ctx.append(self.background_tasks)
|
||||||
|
if args.admin_password:
|
||||||
|
self.sio.instrument(auth={"username": "admin", "password": args.admin_password})
|
||||||
|
|
||||||
web.run_app(self.app, host=args.host, port=args.port)
|
web.run_app(self.app, host=args.host, port=args.port)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue