Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Forwarded Port Dynamic issue

$
0
0
Hi, I'm new guy, I'm try to use Forwarded Port Dynamic as code below

SshClient client = new SshClient("myhost", "myuser", "mypass");
client .Connect();

if(client.IsConnected)
{
ForwardedPortDynamic f = new ForwardedPortDynamic("localhost", 9951); //my port
client .AddForwardedPort (f);
f.Start();

//Then I use localhost:9951 as Http proxy

HttpWebRequest rq = (HttpWebRequest)WebRequest.Create("http://google.com");

rq.Proxy = new WebProxy("localhost:9951");
HttpWebResponse rp = (HttpWebResponse)rq.GetResponse();
f.Stop();
}

My problem: I can't get response.
Sorry about my english, I'm realy new guy.

Viewing all articles
Browse latest Browse all 1729

Trending Articles