YAML config WIP

This commit is contained in:
Dmitry Maksyoma 2021-11-05 22:43:32 +13:00
parent 8e96d4cac5
commit f79c3b3b11
3 changed files with 37 additions and 7 deletions

View File

@ -1118,10 +1118,26 @@ sub DefineFilePathsAndStuff {
DetectFontPath();
%xvncArgsToConfigAliases = (
'-AcceptPointerEvents' => [qw(pointer.allow_clicks_and_cursor_movement)]
'-AcceptPointerEvents' => [qw(pointer.allow_clicks_and_cursor_movement)],
'-AcceptKeyEvents' => [qw(keyboard.allow_input)],
'-AcceptSetDesktopSize' => [qw(desktop.allow_resize)],
'-FrameRate' => [qw(framerate)],
'-DynamicQualityMin' => [qw(dynamic_quality.min)],
'-DynamicQualityMax' => [qw(dynamic_quality.max)],
'-TreatLossless' => [qw(treat_lossless)],
'-PreferBandwidth' => [qw(prefer_bandwidth)],
'-JpegVideoQuality' => [qw(video.jpeg_quality)],
'-WebpVideoQuality' => [qw(video.webp_quality)],
'-VideoScaling' => [qw(video.scaling_method)],
'-SendCutText' => [qw(dlp.clipboard.allow_copy_to_client_clipboard)],
'-DLP_ClipSendMax' => [qw(dlp.clipboard.limit_bytes_copied_to_client_clipboard)],
'-AcceptCutText' => [qw(dlp.clipboard.allow_paste_to_server)],
'-DLP_ClipAcceptMax' => [qw(dlp.clipboard.limit_bytes_pasted_to_server_clipboard)],
'-MaxCutText' => [qw(dlp.clipboard.max_paste_size dlp.clipboard.delay)],
'-DLP_ClipDelay' => [qw(dlp.clipboard.delay)],
'-DLP_KeyRateLimit' => [qw(dlp.keyboard.limit_keypress_rate_per_second)],
'-httpd' => [qw(httpd_directory)],
);
$xvncArgsToConfigAliases{'-MaxCutText'} = [qw(dlp.clipboard.max_paste_size dlp.clipboard.delay)];
$xvncArgsToConfigAliases{'-httpd'} = [qw(httpd_directory)];
}
sub ParseAndProcessCliOptions {

View File

@ -1,7 +1,7 @@
---
# geometry: 1024x768
# interface: 192.168.0.1
framerate: 40
framerate: 10
# dynamic_quality:
# min: 7
# max: 8

View File

@ -14,24 +14,38 @@ dynamic_quality:
max: 8
treat_lossless: 10
prefer_bandwidth: true
video:
jpeg_quality: -1
webp_quality: -1
scaling_method: 2
max_video_resolution:
width: 640
height: 480
dlp:
region:
x1: 10
y1: 10
top_left_point: 10,10
bottom_right_point: 40,40
allow_click: false
clipboard:
allow_copy_to_client_clipboard: true
limit_bytes_copied_to_client_clipboard: 10000
allow_paste_to_server: true
limit_bytes_pasted_to_server_clipboard: 10000
max_paste_size: 262144
send_max: 10000
accept_max: 10000
delay: 1000
keyboard:
ratelimit: 30
# Set to a positive number. To disable, set to "no_limit" or 0.
limit_keypress_rate_per_second: no_limit
logging:
level: verbose
# Mouse, trackpad, etc.
pointer:
allow_clicks_and_cursor_movement: false
allow_clicks_and_cursor_movement: true
keyboard:
allow_input: true
desktop:
allow_resize: true