Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _webRequest = (HttpWebRequest)WebRequest.Create(url);
- WebProxy myproxy = new WebProxy(proxy.ToString()) { BypassProxyOnLocal = false };
- _webRequest.Proxy = myproxy;
- _webRequest.Method = "GET";
- try
- {
- HttpWebResponse response = (HttpWebResponse)_webRequest.GetResponse();
- _logger.Items.Add($"Work! {proxy.ToString()}");
- }
- catch (Exception e)
- {
- _logger.Items.Add($"{e.Message} with {proxy.ToString()}");
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement