You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
492 B

3 years ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Proxy
{
class ProxyWeb : IWeb
{
private IWeb realWeb = new RealWeb();
List<string> BAD_SITES = new List<string>()
{
"https://hackersite.com",
"https://fraudsite.com",
"https://phishingsite.com"
};
public string Visit(string url)
{
if (BAD_SITES.Contains(url.ToLower()))
return "BAD_SITES";
return realWeb.Visit(url);
}
}
}