icinga-powershell-framework/lib/webserver/Open-IcingaTCPClientConnection.psm1
Lord Hepipud 3d875639e4 Feature Requests: Add Proxy Server support
Also re-arranges web content by using old content from lib/web into lib/webserver, while new lib/web contains the proxy configuration.
Fixes #19
2020-11-19 17:16:33 +01:00

18 lines
478 B
PowerShell

function Open-IcingaTCPClientConnection()
{
param(
[System.Net.Sockets.TcpClient]$Client = $null,
[Security.Cryptography.X509Certificates.X509Certificate2]$Certificate = $null
);
if ($null -eq $Client -Or $null -eq $Certificate) {
return $null;
}
$Stream = New-IcingaSSLStream -Client $Client -Certificate $Certificate;
return @{
'Client' = $Client;
'Stream' = $Stream;
};
}