This project is read-only.

Proxy Connection Problem

Jan 17, 2012 at 2:04 PM
Edited Jan 17, 2012 at 2:05 PM

Hi !

I have downloaded the last version of the library.

When trying to connect through a proxy, I get a NullArgumentException in Session.NET.cs in

partial void SocketRead(int length, ref byte[] buffer)

Line 71

var receivedBytes = this._socket.Receive(buffer, offset + receivedTotal, length - receivedTotal, SocketFlags.None);

looks like buffer is null. The method is called from Session.cs in 

private byte SocketReadByte()

the buffer is never initialized. 

Also in 

private void ConnectSocks4(Socket socket)

at the end, dummyBuffer is also never initialized which cause SocketRead to throw an exception.

It is the same in 

private void ConnectSocks5(Socket socket)
Jan 17, 2012 at 2:58 PM

What implementation version do you use?

I only tested it with .NET 4.0 so far so may be I missed something in some other versions.




Jan 17, 2012 at 3:32 PM

The project Renci.Ssh, so i think it is the .NET 4.0 implementation.

Jan 20, 2012 at 2:31 PM

hmm, sorry, my mistake.


I just took a look at it and it apears for some reason I left those buffers as null.

Will fix it today.