mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-09 14:22:33 +02:00
update configuration docs.
This commit is contained in:
parent
76066aeae7
commit
856b0ec15a
6 changed files with 100 additions and 19 deletions
|
@ -2,7 +2,7 @@
|
||||||
sidebar_position: 3
|
sidebar_position: 3
|
||||||
---
|
---
|
||||||
|
|
||||||
# Desktop environment
|
# Desktop Environment
|
||||||
|
|
||||||
This section describes how to configure the desktop environment inside neko.
|
This section describes how to configure the desktop environment inside neko.
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ desktop:
|
||||||
You can specify the screen resolution using the environment variable `NEKO_DESKTOP_SCREEN`.
|
You can specify the screen resolution using the environment variable `NEKO_DESKTOP_SCREEN`.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Input devices
|
## Input Devices
|
||||||
|
|
||||||
Neko uses the [XTEST Extension Library](https://www.x.org/releases/X11R7.7/doc/libXtst/xtestlib.html) to simulate keyboard and mouse events. However, for more advanced input devices like touchscreens, we need to use a custom driver that can be loaded as a plugin to the X server and then neko can connect to it.
|
Neko uses the [XTEST Extension Library](https://www.x.org/releases/X11R7.7/doc/libXtst/xtestlib.html) to simulate keyboard and mouse events. However, for more advanced input devices like touchscreens, we need to use a custom driver that can be loaded as a plugin to the X server and then neko can connect to it.
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,17 @@ const path = require('path');
|
||||||
const parseConfigOptions = (text) => {
|
const parseConfigOptions = (text) => {
|
||||||
const lines = text.split('\n');
|
const lines = text.split('\n');
|
||||||
return lines.map(line => {
|
return lines.map(line => {
|
||||||
const match = line.match(/--([\w.]+)(?:\s(\w+))?\s+(.*?)(?:\s+\(default\s+"?([\w\/.@]+)"?\))?$/);
|
const match = line.match(/--([\w.]+)(?:\s(\w+))?\s+(.*?)(?:\s+\(default\s+"?([^"]+)"?\))?$/);
|
||||||
if (match) {
|
if (match) {
|
||||||
const [, key, type, description, defaultValue] = match;
|
let [, key, type, description, defaultValue] = match;
|
||||||
|
// if the type is not specified, it is a boolean
|
||||||
|
if (!type) {
|
||||||
|
type = 'boolean';
|
||||||
|
// if the default value is not specified, it is false
|
||||||
|
if (defaultValue !== 'false') {
|
||||||
|
defaultValue = 'true';
|
||||||
|
}
|
||||||
|
}
|
||||||
return { key: key.split('.'), type, defaultValue: defaultValue || undefined, description };
|
return { key: key.split('.'), type, defaultValue: defaultValue || undefined, description };
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
"broadcast",
|
"broadcast",
|
||||||
"autostart"
|
"autostart"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "automatically start broadcasting when neko starts and broadcast_url is set"
|
"description": "automatically start broadcasting when neko starts and broadcast_url is set"
|
||||||
},
|
},
|
||||||
|
@ -101,6 +102,7 @@
|
||||||
"microphone",
|
"microphone",
|
||||||
"enabled"
|
"enabled"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "enable microphone stream"
|
"description": "enable microphone stream"
|
||||||
},
|
},
|
||||||
|
@ -110,6 +112,8 @@
|
||||||
"screencast",
|
"screencast",
|
||||||
"enabled"
|
"enabled"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "enable screencast"
|
"description": "enable screencast"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -176,7 +180,8 @@
|
||||||
"pipelines"
|
"pipelines"
|
||||||
],
|
],
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "pipelines config in JSON used for video streaming (default \"[]\")"
|
"defaultValue": "[]",
|
||||||
|
"description": "pipelines config in JSON used for video streaming"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": [
|
"key": [
|
||||||
|
@ -194,6 +199,8 @@
|
||||||
"webcam",
|
"webcam",
|
||||||
"enabled"
|
"enabled"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "enable webcam stream"
|
"description": "enable webcam stream"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -229,6 +236,8 @@
|
||||||
"desktop",
|
"desktop",
|
||||||
"file_chooser_dialog"
|
"file_chooser_dialog"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "whether to handle file chooser dialog externally"
|
"description": "whether to handle file chooser dialog externally"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -237,6 +246,7 @@
|
||||||
"input",
|
"input",
|
||||||
"enabled"
|
"enabled"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "whether custom xf86 input driver should be used to handle touchscreen"
|
"description": "whether custom xf86 input driver should be used to handle touchscreen"
|
||||||
},
|
},
|
||||||
|
@ -247,7 +257,8 @@
|
||||||
"socket"
|
"socket"
|
||||||
],
|
],
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "socket path for custom xf86 input driver connection (default \"/tmp/xf86-input-neko.sock\")"
|
"defaultValue": "/tmp/xf86-input-neko.sock",
|
||||||
|
"description": "socket path for custom xf86 input driver connection"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": [
|
"key": [
|
||||||
|
@ -263,6 +274,7 @@
|
||||||
"desktop",
|
"desktop",
|
||||||
"unminimize"
|
"unminimize"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "automatically unminimize window when it is minimized"
|
"description": "automatically unminimize window when it is minimized"
|
||||||
},
|
},
|
||||||
|
@ -271,6 +283,7 @@
|
||||||
"desktop",
|
"desktop",
|
||||||
"upload_drop"
|
"upload_drop"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "whether drop upload is enabled"
|
"description": "whether drop upload is enabled"
|
||||||
},
|
},
|
||||||
|
@ -280,6 +293,7 @@
|
||||||
"file",
|
"file",
|
||||||
"hash"
|
"hash"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "member file provider: whether to hash passwords using sha256 (recommended)"
|
"description": "member file provider: whether to hash passwords using sha256 (recommended)"
|
||||||
},
|
},
|
||||||
|
@ -309,7 +323,8 @@
|
||||||
"admin_profile"
|
"admin_profile"
|
||||||
],
|
],
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "member multiuser provider: admin profile in JSON format (default \"{}\")"
|
"defaultValue": "{}",
|
||||||
|
"description": "member multiuser provider: admin profile in JSON format"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": [
|
"key": [
|
||||||
|
@ -328,7 +343,8 @@
|
||||||
"user_profile"
|
"user_profile"
|
||||||
],
|
],
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "member multiuser provider: user profile in JSON format (default \"{}\")"
|
"defaultValue": "{}",
|
||||||
|
"description": "member multiuser provider: user profile in JSON format"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": [
|
"key": [
|
||||||
|
@ -337,7 +353,8 @@
|
||||||
"users"
|
"users"
|
||||||
],
|
],
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "member object provider: users in JSON format (default \"[]\")"
|
"defaultValue": "[]",
|
||||||
|
"description": "member object provider: users in JSON format"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": [
|
"key": [
|
||||||
|
@ -362,6 +379,8 @@
|
||||||
"plugins",
|
"plugins",
|
||||||
"enabled"
|
"enabled"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "load plugins in runtime"
|
"description": "load plugins in runtime"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -369,6 +388,8 @@
|
||||||
"plugins",
|
"plugins",
|
||||||
"required"
|
"required"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "if true, neko will exit if there is an error when loading a plugin"
|
"description": "if true, neko will exit if there is an error when loading a plugin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -377,7 +398,8 @@
|
||||||
"bind"
|
"bind"
|
||||||
],
|
],
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "address/port/socket to serve neko (default \"127.0.0.1:8080\")"
|
"defaultValue": "127.0.0.1:8080",
|
||||||
|
"description": "address/port/socket to serve neko"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": [
|
"key": [
|
||||||
|
@ -408,6 +430,7 @@
|
||||||
"server",
|
"server",
|
||||||
"metrics"
|
"metrics"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "enable prometheus metrics available at /metrics"
|
"description": "enable prometheus metrics available at /metrics"
|
||||||
},
|
},
|
||||||
|
@ -425,6 +448,8 @@
|
||||||
"server",
|
"server",
|
||||||
"pprof"
|
"pprof"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "enable pprof endpoint available at /debug/pprof"
|
"description": "enable pprof endpoint available at /debug/pprof"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -432,6 +457,8 @@
|
||||||
"server",
|
"server",
|
||||||
"proxy"
|
"proxy"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "trust reverse proxy headers"
|
"description": "trust reverse proxy headers"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -455,6 +482,8 @@
|
||||||
"session",
|
"session",
|
||||||
"control_protection"
|
"control_protection"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "users can gain control only if at least one admin is in the room"
|
"description": "users can gain control only if at least one admin is in the room"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -463,6 +492,7 @@
|
||||||
"cookie",
|
"cookie",
|
||||||
"enabled"
|
"enabled"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "whether cookies authentication should be enabled"
|
"description": "whether cookies authentication should be enabled"
|
||||||
},
|
},
|
||||||
|
@ -492,6 +522,7 @@
|
||||||
"cookie",
|
"cookie",
|
||||||
"secure"
|
"secure"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "use secure cookies"
|
"description": "use secure cookies"
|
||||||
},
|
},
|
||||||
|
@ -517,6 +548,7 @@
|
||||||
"session",
|
"session",
|
||||||
"implicit_hosting"
|
"implicit_hosting"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "allow implicit control switching"
|
"description": "allow implicit control switching"
|
||||||
},
|
},
|
||||||
|
@ -525,6 +557,8 @@
|
||||||
"session",
|
"session",
|
||||||
"inactive_cursors"
|
"inactive_cursors"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "show inactive cursors on the screen"
|
"description": "show inactive cursors on the screen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -532,6 +566,8 @@
|
||||||
"session",
|
"session",
|
||||||
"locked_controls"
|
"locked_controls"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "whether controls should be locked for users initially"
|
"description": "whether controls should be locked for users initially"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -539,6 +575,8 @@
|
||||||
"session",
|
"session",
|
||||||
"locked_logins"
|
"locked_logins"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "whether logins should be locked for users initially"
|
"description": "whether logins should be locked for users initially"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -546,6 +584,7 @@
|
||||||
"session",
|
"session",
|
||||||
"merciful_reconnect"
|
"merciful_reconnect"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "allow reconnecting to websocket even if previous connection was not closed"
|
"description": "allow reconnecting to websocket even if previous connection was not closed"
|
||||||
},
|
},
|
||||||
|
@ -554,6 +593,8 @@
|
||||||
"session",
|
"session",
|
||||||
"private_mode"
|
"private_mode"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "whether private mode should be enabled initially"
|
"description": "whether private mode should be enabled initially"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -570,6 +611,8 @@
|
||||||
"estimator",
|
"estimator",
|
||||||
"debug"
|
"debug"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "enables debug logging for the bandwidth estimator"
|
"description": "enables debug logging for the bandwidth estimator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -598,6 +641,8 @@
|
||||||
"estimator",
|
"estimator",
|
||||||
"enabled"
|
"enabled"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "enables the bandwidth estimator"
|
"description": "enables the bandwidth estimator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -616,6 +661,8 @@
|
||||||
"estimator",
|
"estimator",
|
||||||
"passive"
|
"passive"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "passive estimator mode, when it does not switch pipelines, only estimates"
|
"description": "passive estimator mode, when it does not switch pipelines, only estimates"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -673,6 +720,8 @@
|
||||||
"webrtc",
|
"webrtc",
|
||||||
"icelite"
|
"icelite"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "configures whether or not the ICE agent should be a lite agent"
|
"description": "configures whether or not the ICE agent should be a lite agent"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -682,7 +731,8 @@
|
||||||
"backend"
|
"backend"
|
||||||
],
|
],
|
||||||
"type": "urls",
|
"type": "urls",
|
||||||
"description": "Backend only STUN and TURN servers in JSON format with urls, `username` and `credential` keys (default \"[]\")"
|
"defaultValue": "[]",
|
||||||
|
"description": "Backend only STUN and TURN servers in JSON format with urls, `username` and `credential` keys"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": [
|
"key": [
|
||||||
|
@ -691,13 +741,15 @@
|
||||||
"frontend"
|
"frontend"
|
||||||
],
|
],
|
||||||
"type": "urls",
|
"type": "urls",
|
||||||
"description": "Frontend only STUN and TURN servers in JSON format with urls, `username` and `credential` keys (default \"[]\")"
|
"defaultValue": "[]",
|
||||||
|
"description": "Frontend only STUN and TURN servers in JSON format with urls, `username` and `credential` keys"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": [
|
"key": [
|
||||||
"webrtc",
|
"webrtc",
|
||||||
"icetrickle"
|
"icetrickle"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
"defaultValue": "true",
|
"defaultValue": "true",
|
||||||
"description": "configures whether cadidates should be sent asynchronously using Trickle ICE"
|
"description": "configures whether cadidates should be sent asynchronously using Trickle ICE"
|
||||||
},
|
},
|
||||||
|
@ -707,7 +759,8 @@
|
||||||
"ip_retrieval_url"
|
"ip_retrieval_url"
|
||||||
],
|
],
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "URL address used for retrieval of the external IP address (default \"https://checkip.amazonaws.com\")"
|
"defaultValue": "https://checkip.amazonaws.com",
|
||||||
|
"description": "URL address used for retrieval of the external IP address"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": [
|
"key": [
|
||||||
|
@ -744,6 +797,8 @@
|
||||||
"key": [
|
"key": [
|
||||||
"debug"
|
"debug"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "enable debug mode"
|
"description": "enable debug mode"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -759,6 +814,8 @@
|
||||||
"log",
|
"log",
|
||||||
"json"
|
"json"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "logs in JSON format"
|
"description": "logs in JSON format"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -775,6 +832,8 @@
|
||||||
"log",
|
"log",
|
||||||
"nocolor"
|
"nocolor"
|
||||||
],
|
],
|
||||||
|
"type": "boolean",
|
||||||
|
"defaultValue": "true",
|
||||||
"description": "no ANSI colors in non-JSON output"
|
"description": "no ANSI colors in non-JSON output"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,10 +53,24 @@ export default () => {
|
||||||
code += buildYaml(value, prefix + ' ');
|
code += buildYaml(value, prefix + ' ');
|
||||||
} else {
|
} else {
|
||||||
let val = '';
|
let val = '';
|
||||||
if (value.defaultValue) {
|
switch (value.type) {
|
||||||
val = `"${value.defaultValue}"`;
|
case 'boolean':
|
||||||
} else if (value.type) {
|
val = `${value.defaultValue || false}`;
|
||||||
val = `<${value.type}>`;
|
break;
|
||||||
|
case 'int':
|
||||||
|
case 'float':
|
||||||
|
val = `${value.defaultValue || 0}`;
|
||||||
|
break;
|
||||||
|
case 'strings':
|
||||||
|
val = `[ ${value.defaultValue ? value.defaultValue.map(v => `"${v}"`).join(', ') : '<string>'} ]`;
|
||||||
|
break;
|
||||||
|
case 'duration':
|
||||||
|
case 'string':
|
||||||
|
val = `${value.defaultValue ? `"${value.defaultValue}"` : '<string>'}`;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
val = `<${value.type}>`;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
code += prefix+`# ${value.description || ''}\n`;
|
code += prefix+`# ${value.description || ''}\n`;
|
||||||
code += prefix+`${key}: ${val}\n`;
|
code += prefix+`${key}: ${val}\n`;
|
|
@ -11,6 +11,6 @@ If a configuration file is present, it will be read in and merged with the defau
|
||||||
|
|
||||||
Highest priority is given to the Environment Variables, followed by CLI arguments, and then the configuration file.
|
Highest priority is given to the Environment Variables, followed by CLI arguments, and then the configuration file.
|
||||||
|
|
||||||
import Configuration from './configuration.tsx'
|
import Configuration from './help.tsx'
|
||||||
|
|
||||||
<Configuration />
|
<Configuration />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
sidebar_position: 4
|
sidebar_position: 4
|
||||||
---
|
---
|
||||||
|
|
||||||
# WebRTC configuration
|
# WebRTC Configuration
|
||||||
|
|
||||||
This page describes how to configure WebRTC settings inside neko.
|
This page describes how to configure WebRTC settings inside neko.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue