Quantcast
Viewing all articles
Browse latest Browse all 1729

New Post: Dynamic Port Forwarding (SOCKS proxy)

Hi,

I've written the following code:
Inline Code
publicpartialclass frmPrimary : Form
{
        SshClient mainClient;
        ForwardedPortDynamic mainForwardedPort;

        public frmPrimary()
        {
            InitializeComponent();
        }

        privatevoid btnConnect_Click(object sender, EventArgs e)
        {
            //Initialize SSH connection
            mainClient = new SshClient("xxx.xxx.xxx.xx", txtUser.Text, txtPassword.Text);
            mainForwardedPort = new ForwardedPortDynamic("127.0.0.1", 9999); //Dynamic Proxy port
            mainClient.Connect();
            mainClient.AddForwardedPort(mainForwardedPort);
            mainForwardedPort.Start();
        }
}
The connection is established and login successful, but I'm unable to pass my data through the SOCKS proxy, although I could do the same when I use PuTTy Dynamic Port Forwarding

The proxy in Firefox is set to 127.0.0.1 with port 9999 (SOCKS proxy), it works fine with PuTTy Dynamic Port Forwarding, but doesn't work at all with my code.

Could you please tell me what's wrong?

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>