1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
using System;
using System.IO;
using System.Net;
static class Program {
    static void Main() {
        WebRequest request = WebRequest.Create("http://ja.doukaku.org/feeds/comments/");
        request.Timeout = 1000;
        request.Proxy = new WebProxy("http://proxy.example.net:8001/");
        request.Proxy.Credentials = new NetworkCredential("username", "password");
        using (StreamReader sr = new StreamReader(request.GetResponse().GetResponseStream())) {
            Console.WriteLine(sr.ReadToEnd());
        }
    }
}