proxy_info.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_WINHTTP_PROXY_INFO_H_
  5. #define COMPONENTS_WINHTTP_PROXY_INFO_H_
  6. #include <string>
  7. namespace winhttp {
  8. struct ProxyInfo {
  9. ProxyInfo();
  10. ProxyInfo(bool auto_detect,
  11. const std::wstring& auto_config_url,
  12. const std::wstring& proxy,
  13. const std::wstring& proxy_bypass);
  14. ~ProxyInfo();
  15. ProxyInfo(const ProxyInfo& proxy_info);
  16. ProxyInfo& operator=(const ProxyInfo& proxy_info);
  17. ProxyInfo(ProxyInfo&& proxy_info);
  18. ProxyInfo& operator=(ProxyInfo&& proxy_info);
  19. // Specifies the configuration is Web Proxy Auto Discovery (WPAD).
  20. bool auto_detect = false;
  21. // The url of the proxy auto configuration (PAC) script, if known.
  22. std::wstring auto_config_url;
  23. // Named proxy information.
  24. // The proxy string is usually something as "http=foo:80;https=bar:8080".
  25. // According to the documentation for WINHTTP_PROXY_INFO, multiple proxies
  26. // are separated by semicolons or whitespace.
  27. std::wstring proxy;
  28. std::wstring proxy_bypass;
  29. };
  30. } // namespace winhttp
  31. #endif // COMPONENTS_WINHTTP_PROXY_INFO_H_