예제 #1
0
        static void Main(string[] args)
        {
            var client = new InternetClient();
            var proxy  = new InternetProxy(client);

            proxy.AddToBlacklist("www.youtube.com");
            proxy.AddToBlacklist("www.facebook.com");

            proxy.Connect("www.google.com");
            proxy.Connect("www.youtube.com");
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("<Blocked site - Proxy>");
            Console.WriteLine(">Connect without proxy");
            IInternet i = new Internet();

            i.Connect("fido.com");
            i.Connect("pepe.com");
            Console.WriteLine(">Connect with proxy");
            IInternet p = new InternetProxy();

            p.Connect("fido.com");
            p.Connect("pepe.com");
        }