From c0ed7d7b1a6976b9fc25eb6b1f5791b2a4aa76df Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Thu, 17 Aug 2023 20:29:23 +1200 Subject: [PATCH] Add network.unix_relay to yaml config --- unix/KasmVNC/CliOption.pm | 2 +- unix/kasmvnc_defaults.yaml | 3 +++ unix/vncserver | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/unix/KasmVNC/CliOption.pm b/unix/KasmVNC/CliOption.pm index e696e2b..ae61bb0 100644 --- a/unix/KasmVNC/CliOption.pm +++ b/unix/KasmVNC/CliOption.pm @@ -35,7 +35,7 @@ sub new { }, toStringSub => $args->{toStringSub} || sub { my $self = shift; - + my $derivedValue = $self->deriveValue(); if (defined($derivedValue)) { return "-$self->{name} " . "'$derivedValue'"; diff --git a/unix/kasmvnc_defaults.yaml b/unix/kasmvnc_defaults.yaml index 8a90a0d..e042730 100644 --- a/unix/kasmvnc_defaults.yaml +++ b/unix/kasmvnc_defaults.yaml @@ -23,6 +23,9 @@ network: pem_certificate: /etc/ssl/certs/ssl-cert-snakeoil.pem pem_key: /etc/ssl/private/ssl-cert-snakeoil.key require_ssl: true + # unix_relay: + # name: + # path: user_session: # session_type: shared diff --git a/unix/vncserver b/unix/vncserver index 4dadc17..cdf447b 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -1402,6 +1402,24 @@ sub DefineConfigToCLIConversion { }) ] }), + KasmVNC::CliOption->new({ + name => 'UnixRelay', + configKeys => [ + KasmVNC::ConfigKey->new({ + name => "network.unix_relay.name", + type => KasmVNC::ConfigKey::ANY + }), + KasmVNC::ConfigKey->new({ + name => "network.unix_relay.path", + type => KasmVNC::ConfigKey::ANY + }) + ], + deriveValueSub => sub { + my $self = shift; + + $self->{"network.unix_relay.name"} . ":" . $self->{"network.unix_relay.path"}; + }, + }), KasmVNC::CliOption->new({ name => 'AlwaysShared', configKeys => [