Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public class MyProxy : IWebProxy
  2. {
  3. public MyProxy(string proxyUri)
  4. : this(new Uri(proxyUri))
  5. {
  6. }
  7.  
  8. public MyProxy(Uri proxyUri)
  9. {
  10. this.ProxyUri = proxyUri;
  11. }
  12.  
  13. public Uri ProxyUri { get; set; }
  14.  
  15. public ICredentials Credentials { get; set; }
  16.  
  17. public Uri GetProxy(Uri destination)
  18. {
  19. return this.ProxyUri;
  20. }
  21.  
  22. public bool IsBypassed(Uri host)
  23. {
  24. return false; /* Proxy all requests */
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement