switches.cc 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright (c) 2016 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "brightray/common/switches.h"
  5. namespace brightray {
  6. namespace switches {
  7. // Comma-separated list of rules that control how hostnames are mapped.
  8. //
  9. // For example:
  10. // "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
  11. // "MAP *.google.com proxy" --> Forces all google.com subdomains to be
  12. // resolved to "proxy".
  13. // "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
  14. // Will also force the port of the resulting
  15. // socket address to be 77.
  16. // "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
  17. // except for "www.google.com".
  18. //
  19. // These mappings apply to the endpoint host in a net::URLRequest (the TCP
  20. // connect and host resolver in a direct connection, and the CONNECT in an http
  21. // proxy connection, and the endpoint host in a SOCKS proxy connection).
  22. const char kHostRules[] = "host-rules";
  23. // Don't use a proxy server, always make direct connections. Overrides any
  24. // other proxy server flags that are passed.
  25. const char kNoProxyServer[] = "no-proxy-server";
  26. // Uses a specified proxy server, overrides system settings. This switch only
  27. // affects HTTP and HTTPS requests.
  28. const char kProxyServer[] = "proxy-server";
  29. // Bypass specified proxy for the given semi-colon-separated list of hosts. This
  30. // flag has an effect only when --proxy-server is set.
  31. const char kProxyBypassList[] = "proxy-bypass-list";
  32. // Uses the pac script at the given URL.
  33. const char kProxyPacUrl[] = "proxy-pac-url";
  34. // Disable HTTP/2 and SPDY/3.1 protocols.
  35. const char kDisableHttp2[] = "disable-http2";
  36. // Whitelist containing servers for which Integrated Authentication is enabled.
  37. const char kAuthServerWhitelist[] = "auth-server-whitelist";
  38. // Whitelist containing servers for which Kerberos delegation is allowed.
  39. const char kAuthNegotiateDelegateWhitelist[] =
  40. "auth-negotiate-delegate-whitelist";
  41. } // namespace switches
  42. } // namespace brightray