Merge pull request #1980 from skrashevich/monaco-editor-141225

Replace ace editor to Monaco with config hints
This commit is contained in:
Alex X
2025-12-27 12:10:15 +03:00
committed by GitHub
2 changed files with 1519 additions and 98 deletions
+326 -63
View File
@@ -24,7 +24,26 @@
"debug", "debug",
"info", "info",
"warn", "warn",
"error" "error",
"fatal",
"panic",
"disabled"
]
},
"source": {
"type": "string",
"examples": [
"rtsp://username:password@192.168.1.123/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
"rtsp://username:password@192.168.1.123/stream1",
"rtsp://username:password@192.168.1.123/h264Preview_01_main",
"rtmp://192.168.1.123/bcs/channel0_main.bcs?channel=0&stream=0&user=username&password=password",
"http://192.168.1.123/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password",
"http://username:password@192.168.1.123/cgi-bin/snapshot.cgi?channel=1",
"ffmpeg:media.mp4#video=h264#hardware#width=1920#height=1080#rotate=180#audio=copy",
"ffmpeg:virtual?video=testsrc&size=4K#video=h264#hardware#bitrate=50M",
"exec:ffmpeg -re -i media.mp4 -c copy -rtsp_transport tcp -f rtsp {output}",
"onvif://username:password@192.168.1.123:80?subtype=0",
"tapo://password@192.168.1.123:8800?channel=0&subtype=0"
] ]
} }
}, },
@@ -33,13 +52,14 @@
"type": "object", "type": "object",
"properties": { "properties": {
"listen": { "listen": {
"type": "string",
"default": ":1984", "default": ":1984",
"examples": [ "examples": [
"127.0.0.1:8080" "127.0.0.1:1984"
], ]
"$ref": "#/definitions/listen"
}, },
"username": { "username": {
"description": "Basic auth for WebUI",
"type": "string", "type": "string",
"examples": [ "examples": [
"admin" "admin"
@@ -48,24 +68,35 @@
"password": { "password": {
"type": "string" "type": "string"
}, },
"local_auth": {
"description": "Enable auth check for localhost requests",
"type": "boolean",
"default": false
},
"base_path": { "base_path": {
"description": "API prefix for serving on suburl (/api => /rtc/api)",
"type": "string", "type": "string",
"examples": [ "examples": [
"/go2rtc" "/rtc"
] ]
}, },
"static_dir": { "static_dir": {
"description": "Folder for static files (custom web interface)",
"type": "string", "type": "string",
"examples": [ "examples": [
"/var/www" "www"
] ]
}, },
"origin": { "origin": {
"description": "Allow CORS requests (only * supported)",
"type": "string", "type": "string",
"const": "*" "enum": [
"*",
""
]
}, },
"tls_listen": { "tls_listen": {
"$ref": "#/definitions/listen" "type": "string"
}, },
"tls_cert": { "tls_cert": {
"type": "string", "type": "string",
@@ -86,6 +117,111 @@
"examples": [ "examples": [
"/tmp/go2rtc.sock" "/tmp/go2rtc.sock"
] ]
},
"allow_paths": {
"description": "Allow only these HTTP paths (full paths, including base_path)",
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"/api",
"/api/streams",
"/api/webrtc"
]
]
}
}
},
"app": {
"type": "object",
"properties": {
"modules": {
"description": "Enable only these modules (empty / omitted means all)",
"type": "array",
"items": {
"type": "string",
"enum": [
"api",
"ws",
"http",
"rtsp",
"webrtc",
"mp4",
"hls",
"mjpeg",
"hass",
"homekit",
"onvif",
"rtmp",
"webtorrent",
"wyoming",
"echo",
"exec",
"expr",
"ffmpeg",
"alsa",
"v4l2",
"bubble",
"doorbird",
"dvrip",
"eseecloud",
"flussonic",
"gopro",
"isapi",
"ivideon",
"mpegts",
"nest",
"ring",
"roborock",
"tapo",
"tuya",
"xiaomi",
"yandex",
"debug",
"ngrok",
"pinggy",
"srtp"
]
}
}
}
},
"env": {
"description": "Config variables that can be referenced as ${NAME} / ${NAME:default}",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"echo": {
"type": "object",
"properties": {
"allow_paths": {
"description": "Allow only these binaries for echo: URLs (exact cmd name/path)",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"exec": {
"type": "object",
"properties": {
"allow_paths": {
"description": "Allow only these binaries for exec: URLs (exact cmd name/path)",
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"ffmpeg",
"/usr/bin/ffmpeg"
]
]
} }
} }
}, },
@@ -95,6 +231,26 @@
"bin": { "bin": {
"type": "string", "type": "string",
"default": "ffmpeg" "default": "ffmpeg"
},
"global": {
"type": "string",
"default": "-hide_banner"
},
"file": {
"type": "string",
"default": "-re -i {input}"
},
"http": {
"type": "string",
"default": "-fflags nobuffer -flags low_delay -i {input}"
},
"rtsp": {
"type": "string",
"default": "-fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i {input}"
},
"rtsp/udp": {
"type": "string",
"default": "-fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -i {input}"
} }
}, },
"additionalProperties": { "additionalProperties": {
@@ -117,12 +273,25 @@
"homekit": { "homekit": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"type": "object", "type": [
"object",
"null"
],
"properties": { "properties": {
"pin": { "pin": {
"description": "HomeKit pairing PIN",
"type": "string", "type": "string",
"default": "19550224", "default": "19550224",
"pattern": "^[0-9]{8}$" "anyOf": [
{
"type": "string",
"pattern": "^[0-9]{8}$"
},
{
"type": "string",
"pattern": "^[0-9]{3}-[0-9]{2}-[0-9]{3}$"
}
]
}, },
"name": { "name": {
"type": "string" "type": "string"
@@ -133,6 +302,29 @@
"device_private": { "device_private": {
"type": "string" "type": "string"
}, },
"category_id": {
"description": "Accessory category: `bridge`, `doorbell` or numeric ID",
"type": "string",
"default": "camera",
"anyOf": [
{
"type": "string",
"enum": [
"bridge",
"camera",
"doorbell"
]
},
{
"type": "string",
"pattern": "^[0-9]+$"
},
{
"type": "string",
"const": ""
}
]
},
"pairings": { "pairings": {
"type": "array", "type": "array",
"items": { "items": {
@@ -146,9 +338,11 @@
"type": "object", "type": "object",
"properties": { "properties": {
"format": { "format": {
"description": "Log format: color/json/text or empty for autodetect",
"type": "string", "type": "string",
"default": "color", "default": "color",
"enum": [ "enum": [
"",
"color", "color",
"json", "json",
"text" "text"
@@ -160,12 +354,26 @@
"$ref": "#/definitions/log_level" "$ref": "#/definitions/log_level"
}, },
"output": { "output": {
"description": "Log output: stdout/stderr/file[:path] or empty (memory only)",
"type": "string", "type": "string",
"default": "stdout", "default": "stdout",
"enum": [ "anyOf": [
"", {
"stdout", "type": "string",
"stderr" "enum": [
"",
"stdout",
"stderr"
]
},
{
"type": "string",
"pattern": "^file(:.+)?$",
"examples": [
"file",
"file:go2rtc.log"
]
}
] ]
}, },
"time": { "time": {
@@ -215,6 +423,9 @@
"homekit": { "homekit": {
"$ref": "#/definitions/log_level" "$ref": "#/definitions/log_level"
}, },
"mjpeg": {
"$ref": "#/definitions/log_level"
},
"mp4": { "mp4": {
"$ref": "#/definitions/log_level" "$ref": "#/definitions/log_level"
}, },
@@ -238,6 +449,9 @@
}, },
"webtorrent": { "webtorrent": {
"$ref": "#/definitions/log_level" "$ref": "#/definitions/log_level"
},
"wyoming": {
"$ref": "#/definitions/log_level"
} }
} }
}, },
@@ -253,6 +467,30 @@
} }
} }
}, },
"pinggy": {
"type": "object",
"properties": {
"tunnel": {
"description": "Expose local address via Pinggy",
"type": "string",
"examples": [
"http://127.0.0.1:1984",
"tcp://192.168.1.123:554"
]
}
}
},
"preload": {
"description": "Preload streams on startup (map stream name => probe query, default `video&audio`)",
"type": "object",
"additionalProperties": {
"type": "string",
"examples": [
"video&audio",
"video"
]
}
},
"publish": { "publish": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
@@ -277,10 +515,10 @@
"type": "object", "type": "object",
"properties": { "properties": {
"listen": { "listen": {
"type": "string",
"examples": [ "examples": [
":1935" ":1935"
], ]
"$ref": "#/definitions/listen"
} }
} }
}, },
@@ -288,8 +526,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"listen": { "listen": {
"default": ":8554", "type": "string",
"$ref": "#/definitions/listen" "default": ":8554"
}, },
"username": { "username": {
"type": "string", "type": "string",
@@ -314,75 +552,56 @@
"type": "object", "type": "object",
"properties": { "properties": {
"listen": { "listen": {
"default": ":8443", "type": "string",
"$ref": "#/definitions/listen" "default": ":8443"
} }
} }
}, },
"streams": { "streams": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"title": "Stream",
"anyOf": [ "anyOf": [
{ {
"description": "Source", "$ref": "#/definitions/source"
"type": "string",
"examples": [
"rtsp://username:password@192.168.1.123/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
"rtsp://username:password@192.168.1.123/stream1",
"rtsp://username:password@192.168.1.123/h264Preview_01_main",
"rtmp://192.168.1.123/bcs/channel0_main.bcs?channel=0&stream=0&user=username&password=password",
"http://192.168.1.123/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password",
"http://username:password@192.168.1.123/cgi-bin/snapshot.cgi?channel=1",
"ffmpeg:media.mp4#video=h264#hardware#width=1920#height=1080#rotate=180#audio=copy",
"ffmpeg:virtual?video=testsrc&size=4K#video=h264#hardware#bitrate=50M",
"bubble://username:password@192.168.1.123:34567/bubble/live?ch=0&stream=0",
"dvrip://username:password@192.168.1.123:34567?channel=0&subtype=0",
"exec:ffmpeg -re -i media.mp4 -c copy -rtsp_transport tcp -f rtsp {output}",
"isapi://username:password@192.168.1.123:80/",
"kasa://username:password@192.168.1.123:19443/https/stream/mixed",
"onvif://username:password@192.168.1.123:80?subtype=0",
"tapo://password@192.168.1.123:8800?channel=0&subtype=0",
"webtorrent:?share=xxx&pwd=xxx"
]
}, },
{ {
"type": "array", "type": "array",
"items": { "items": {
"description": "Source", "$ref": "#/definitions/source"
"type": "string"
} }
},
{
"type": "null"
} }
] ]
} }
}, },
"xiaomi": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"webrtc": { "webrtc": {
"type": "object", "type": "object",
"properties": { "properties": {
"listen": { "listen": {
"default": ":8555/tcp",
"type": "string", "type": "string",
"anyOf": [ "default": ":8555",
{ "examples": [
"type": "string", ":8555/udp"
"pattern": ":[0-9]{1,5}(/tcp|/udp)?$"
},
{
"type": "string",
"const": ""
}
] ]
}, },
"candidates": { "candidates": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/listen/anyOf/0" "type": "string",
}, "examples": [
"examples": [ "216.58.210.174:8555",
"216.58.210.174:8555", "stun:8555",
"stun:8555", "home.duckdns.org:8555"
"home.duckdns.org:8555" ]
] }
}, },
"ice_servers": { "ice_servers": {
"type": "array", "type": "array",
@@ -436,13 +655,13 @@
"description": "Use only these network types", "description": "Use only these network types",
"type": "array", "type": "array",
"items": { "items": {
"type": "string",
"enum": [ "enum": [
"tcp4", "tcp4",
"tcp6", "tcp6",
"udp4", "udp4",
"udp6" "udp6"
], ]
"type": "string"
} }
}, },
"udp_ports": { "udp_ports": {
@@ -472,7 +691,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"pwd": { "pwd": {
"type": "string" "type": "string",
"minLength": 4
}, },
"src": { "src": {
"type": "string" "type": "string"
@@ -481,6 +701,49 @@
} }
} }
} }
},
"wyoming": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"listen": {
"description": "Listen address for Wyoming server",
"type": "string"
},
"name": {
"description": "Optional satellite name (default: stream name)",
"type": "string"
},
"mode": {
"description": "Optional mode: mic / snd / default",
"type": "string",
"enum": [
"",
"mic",
"snd"
]
},
"event": {
"description": "Event handlers (map event type => expr script)",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"wake_uri": {
"description": "Optional WAKE service URI (ex. tcp://host:port?name=...)",
"type": "string",
"examples": [
"tcp://192.168.1.23:10400"
]
},
"vad_threshold": {
"description": "Optional VAD threshold (0.1..3.5 typical)",
"type": "number"
}
}
}
} }
} }
} }
+1193 -35
View File
File diff suppressed because it is too large Load Diff