Merge branch 'develop'

This commit is contained in:
drieseng
2020-12-31 14:02:11 +01:00
8 changed files with 200 additions and 10 deletions
@@ -203,6 +203,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
@@ -278,6 +281,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
@@ -1184,7 +1220,7 @@
<Compile Include="..\Renci.SshNet\SftpClient.cs">
<Link>SftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
@@ -1407,7 +1443,7 @@
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
<SilverlightProjectProperties />
</FlavorProperties>
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -209,6 +209,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
@@ -284,6 +287,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
@@ -1190,7 +1226,7 @@
<Compile Include="..\Renci.SshNet\SftpClient.cs">
<Link>SftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
@@ -1411,7 +1447,7 @@
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
<SilverlightProjectProperties />
</FlavorProperties>
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -252,6 +252,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
@@ -327,6 +330,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
@@ -191,6 +191,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
@@ -266,6 +269,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
@@ -1169,7 +1205,7 @@
<Compile Include="..\Renci.SshNet\SftpClient.cs">
<Link>SftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
@@ -232,6 +232,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
@@ -307,6 +310,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
@@ -1444,7 +1480,7 @@
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -391,9 +391,9 @@ namespace Renci.SshNet.Abstractions
{
if (socket.ReceiveAsync(args))
{
if (!receiveCompleted.WaitOne(timeout))
if (!receiveCompleted.WaitOne(readTimeout))
throw new SshOperationTimeoutException(string.Format(CultureInfo.InvariantCulture,
"Socket read operation has timed out after {0:F0} milliseconds.", timeout.TotalMilliseconds));
"Socket read operation has timed out after {0:F0} milliseconds.", readTimeout.TotalMilliseconds));
}
else
{
+8 -2
View File
@@ -79,7 +79,13 @@ namespace Renci.SshNet.Common
private static string AsAscii(byte[] data, int length)
{
var ascii = new StringBuilder();
#if FEATURE_ENCODING_ASCII
var encoding = Encoding.ASCII;
#else
var encoding = new ASCIIEncoding();
#endif
var ascii = new StringBuilder();
const char dot = '.';
for (var i = 0; i < length; i++)
@@ -92,7 +98,7 @@ namespace Renci.SshNet.Common
}
else
{
ascii.Append(Encoding.ASCII.GetString(data, i, 1));
ascii.Append(encoding.GetString(data, i, 1));
}
}
@@ -143,7 +143,11 @@ namespace Renci.SshNet.Connection
return Array<byte>.Empty;
}
#if FEATURE_ENCODING_ASCII
return Encoding.ASCII.GetBytes(proxyUser);
#else
return new ASCIIEncoding().GetBytes(proxyUser);
#endif
}
}
}