From a50f99baf8390c76657516258f32e285ba710083 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Mon, 14 Jul 2025 14:13:59 +0800 Subject: [PATCH] Improve configuration file documentation and clarity Signed-off-by: Jianhui Zhao --- rttys.conf | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/rttys.conf b/rttys.conf index 5a22e84..1f059b4 100644 --- a/rttys.conf +++ b/rttys.conf @@ -1,35 +1,40 @@ +# Device listen address and port (e.g., :5912 for all interfaces, 127.0.0.1:5912 for localhost only) #addr-dev: :5912 + +# User listen address and port (e.g., :5913 for all interfaces, 127.0.0.1:5913 for localhost only) #addr-user: :5913 -# Automatically select an available port in default +# HTTP proxy address and port (automatically select an available port by default) #addr-http-proxy: +# HTTP proxy redirect URL #http-proxy-redir-url: -# Used for set cookie +# Domain used for setting cookies #http-proxy-redir-domain: +# Authentication token for device connections #token: a1d4cdb1a3cd6a0e94aa3599afcddcf5 -# This url will be called when the device is connected if this url is configured -# The request method is POST -# The parameters are in JSON format: {"group": "group ID","id": "device ID", "token": "device TOKEN"} -# Return HTTP 200 to indicate that the device is allowed to connect. +# Device hook URL - called when a device connects (if configured) +# Request method: POST +# Parameters in JSON format: {"group": "group ID", "id": "device ID", "token": "device TOKEN"} +# Return HTTP 200 to allow the device to connect #dev-hook-url: http://127.0.0.1:8080/rttys-dev-hook -# This URL will be called when the user accesses APIs if this URL is configured. -# Rttys will pass all original headers, along with several additional specific headers: +# User hook URL - called when users access APIs (if configured) +# Rttys will pass all original headers, along with additional specific headers: # X-Rttys-Hook: true # X-Original-Method: original request method # X-Original-URL: original request URL -# Return HTTP 200 to indicate that the user is allowed to access the API. +# Return HTTP 200 to allow the user to access the API #user-hook-url: http://127.0.0.1:8080/rttys-user-hook -# Local access does not require authentication +# Local access authentication (disable authentication for local requests) #local-auth: false -# Web Management password +# Web management password #password: rttys -# Allow all origins for cross-domain request +# CORS support (allow all origins for cross-domain requests) #allow-origins: false