From ac822a253141fb63b60bc33d4aa5b5316b688946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 19 Nov 2022 20:45:38 +0100 Subject: [PATCH] update docs. --- docs/changelog.md | 2 ++ docs/getting-started/configuration.md | 19 ++++++++++--------- server/internal/config/server.go | 3 ++- server/internal/config/websocket.go | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 9f608a03..5b3653a5 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -8,11 +8,13 @@ - Added `NEKO_PATH_PREFIX`. - Added screenshot function `/screenshot.jpg?pwd=`, works only for unlocked rooms. - Added emoji support (by @yesBad). +- Added file transfer (by @prophetofxenu). ### Misc - Server: Split `remote` to `desktop` and `capture`. - Server: Refactored `xorg` - added `xevent` and clipboard is handled as event (no looped polling anymore). - Introduced `NEKO_AUDIO_CODEC=` and `NEKO_VIDEO_CODEC=` as a new way of setting codecs. +- Added CORS. ## [n.eko v2.6](https://github.com/m1k1o/neko/releases/tag/v2.6) diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md index 26a8db2c..84e378b7 100644 --- a/docs/getting-started/configuration.md +++ b/docs/getting-started/configuration.md @@ -32,6 +32,7 @@ nat1to1: - Currently supported: - `control` - `login` + - `file_transfer` - e.g. `control` ### WebRTC @@ -125,18 +126,18 @@ nat1to1: #### `NEKO_PATH_PREFIX`: - Path prefix for HTTP requests. - e.g. `/neko/` +#### `NEKO_CORS`: + - Cross origin request sharing, whitespace separated list of allowed hosts, `*` for all. + - e.g. `127.0.0.1 neko.example.com` ### File Transfer -#### `NEKO_FILE_TRANSFER`: - - Enable file transfer for admins at start - - e.g. `1` -#### `NEKO_UNPRIV_FILE_TRANSFER`: - - Enable file transfer for all users at start. Ignored if NEKO_FILE_TRANSFER not enabled. - - e.g. `1` +#### `NEKO_FILE_TRANSFER_ENABLED`: + - Enable file transfer feature. + - e.g. `true` #### `NEKO_FILE_TRANSFER_PATH`: - Path where files will be transferred between the host and users. By default this is - /home/neko/Downloads. If the path doesn't exist, it will be created. + `/home/neko/Downloads`. If the path doesn't exist, it will be created. - e.g. `/home/neko/Desktop` ### Expert settings @@ -165,10 +166,11 @@ Flags: --broadcast_url string URL for broadcasting, setting this value will automatically enable broadcasting --cert string path to the SSL cert used to secure the neko server --control_protection control protection means, users can gain control only if at least one admin is in the room + --cors strings list of allowed origins for CORS (default [*]) --device string audio device to capture (default "auto_null.monitor") --display string XDisplay to capture (default ":99.0") --epr string limits the pool of ephemeral ports that ICE UDP connections can allocate from (default "59000-59100") - --file_transfer allow file transfer for admins + --file_transfer_enabled enable file transfer feature (default false) --file_transfer_path string path to use for file transfer (default "/home/neko/Downloads") --g722 DEPRECATED: use audio_codec --h264 DEPRECATED: use video_codec @@ -194,7 +196,6 @@ Flags: --static string path to neko client files to serve (default "./www") --tcpmux int single TCP mux port for all peers --udpmux int single UDP mux port for all peers - --unpriv_file_transfer allow file transfer for non admins --video string video codec parameters to use for streaming --video_bitrate int video bitrate in kbit/s (default 3072) --video_codec string video codec to be used (default "vp8") diff --git a/server/internal/config/server.go b/server/internal/config/server.go index d3cd24fa..f39766ee 100644 --- a/server/internal/config/server.go +++ b/server/internal/config/server.go @@ -1,12 +1,13 @@ package config import ( - "m1k1o/neko/internal/utils" "net/http" "path" "github.com/spf13/cobra" "github.com/spf13/viper" + + "m1k1o/neko/internal/utils" ) type Server struct { diff --git a/server/internal/config/websocket.go b/server/internal/config/websocket.go index 163d9ec7..7e534fde 100644 --- a/server/internal/config/websocket.go +++ b/server/internal/config/websocket.go @@ -47,7 +47,7 @@ func (WebSocket) Init(cmd *cobra.Command) error { // File transfer - cmd.PersistentFlags().Bool("file_transfer_enabled", true, "enable file transfer feature") + cmd.PersistentFlags().Bool("file_transfer_enabled", false, "enable file transfer feature") if err := viper.BindPFlag("file_transfer_enabled", cmd.PersistentFlags().Lookup("file_transfer_enabled")); err != nil { return err }