1

I would like to set up a tunnel to a socks5 proxy server, which is similar to the following command.

ssh -N -D 8888 root@remote.server

I already has a socks5 server run at remote.server:22(example). I need to get other web page by C# through that proxy server. How can I do this by Rebex?

It seems like the function of Rebex.Net.ProxySocket class, does it has sample code? And my socks5 server only support public key authentication method, but ProxySocket seems not.

flag

1 Answer

0

Rebex SshSession class can be used to tunnel connections through an SSH server, but Rebex ProxySocket component only supports Socks5 in client mode. It doesn't have the capability to act as a Socks5 server, which is what you need to reproduce "ssh -N -D"

Please check out the comments section of SSH port forwarding capable application question for additional information on what you would have to implement yourself.

Why don't you use a ready-made application such as Bitvise Tunnelier to achieve this?

link|flag
Thanks for your answer. I already read the post of "SSH port forwarding capable application" before asking this question. I was confused about the term of "server" before. After I re-read the post, I found that there are two kinds of server, one is SSH server, another one is Socks5 proxy server. Thus, I need to implement the Socks5 proxy server. Bitvise Tunnelier can act as a Socks5 proxy server for IE and Firefox. However, I want to connect other web sites by C#, not by a web browser. Are there any methods to do that? – shadow Mar 1 at 11:15
Does this mean you are using .NET WebRequest-HttpWebRequest or WebClient classes? Although these don't make it possible to specify a Socks5 proxy, it looks like it can use it if it's configured in IE - see social.msdn.microsoft.com/Forums/en-US/ncl/thread/… for more information. – Lukas Pokorny Mar 1 at 11:38

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.