mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-28 05:31:49 +02:00
VNC-155 Refactor
This commit is contained in:
parent
634731748a
commit
f12264c5ad
@ -1257,6 +1257,14 @@ sub DefineConfigToCLIConversion {
|
|||||||
allowedValues => [flatten(@allConfigKeys)]
|
allowedValues => [flatten(@allConfigKeys)]
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
my $deriveValueStripPercentSub = sub {
|
||||||
|
$self = shift;
|
||||||
|
|
||||||
|
my $value = $self->configValue();
|
||||||
|
$value =~ s/%$//;
|
||||||
|
|
||||||
|
$value;
|
||||||
|
};
|
||||||
KasmVNC::CliOption::beforeIsActive(\&limitVncModeOptions);
|
KasmVNC::CliOption::beforeIsActive(\&limitVncModeOptions);
|
||||||
my $ipv4_regexp = '((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}';
|
my $ipv4_regexp = '((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}';
|
||||||
my $ipv6_regexp = '(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))';
|
my $ipv6_regexp = '(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))';
|
||||||
@ -2006,14 +2014,7 @@ sub DefineConfigToCLIConversion {
|
|||||||
validator => $percentValidator
|
validator => $percentValidator
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
deriveValueSub => sub {
|
deriveValueSub => $deriveValueStripPercentSub
|
||||||
$self = shift;
|
|
||||||
|
|
||||||
my $value = $self->configValue();
|
|
||||||
$value =~ s/%$//;
|
|
||||||
|
|
||||||
$value;
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
KasmVNC::CliOption->new({
|
KasmVNC::CliOption->new({
|
||||||
name => 'VideoOutTime',
|
name => 'VideoOutTime',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user