diff --git a/unix/kasmvnc_defaults.yaml b/unix/kasmvnc_defaults.yaml index 292e93d..3d0551c 100644 --- a/unix/kasmvnc_defaults.yaml +++ b/unix/kasmvnc_defaults.yaml @@ -18,6 +18,7 @@ network: udp: public_ip: auto port: auto + payload_size: auto stun_server: auto ssl: pem_certificate: /etc/ssl/certs/ssl-cert-snakeoil.pem diff --git a/unix/vncserver b/unix/vncserver index ecdec9e..41fc1be 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -2366,6 +2366,24 @@ sub DefineConfigToCLIConversion { $value; } }), + KasmVNC::CliOption->new({ + name => 'udpSize', + configKeys => [ + KasmVNC::ConfigKey->new({ + name => "network.udp.payload_size", + validator => KasmVNC::PatternValidator->new({ + pattern => qr/^(auto|\d+)$/, + errorMessage => "must be 'auto' or an integer" + }), + }) + ], + isActiveSub => sub { + $self = shift; + + my $value = $self->configValue(); + isPresent($value) && $value ne 'auto'; + } + }), KasmVNC::CliOption->new({ name => 'udpPort', configKeys => [