wifi_configuration_specifics.proto 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // Copyright 2019 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. //
  5. // Sync protocol datatype extension for Wi-Fi configuration items.
  6. // If you change or add any fields in this file, update proto_visitors.h and
  7. // potentially proto_enum_conversions.{h, cc}.
  8. syntax = "proto2";
  9. option java_multiple_files = true;
  10. option java_package = "org.chromium.components.sync.protocol";
  11. option optimize_for = LITE_RUNTIME;
  12. package sync_pb;
  13. message WifiConfigurationSpecifics {
  14. // SSID encoded to hex, letters should be upper case and 0x prefix should be
  15. // omitted. For example, ssid "network" would be provided as "6E6574776F726B".
  16. optional bytes hex_ssid = 1;
  17. enum SecurityType {
  18. SECURITY_TYPE_UNSPECIFIED = 0;
  19. SECURITY_TYPE_NONE = 1;
  20. SECURITY_TYPE_WEP = 2;
  21. SECURITY_TYPE_PSK = 3; // WPA-PSK or RSN-PSK
  22. }
  23. optional SecurityType security_type = 2;
  24. // The passphrase can be ASCII, UTF-8, or a string of hex digits.
  25. optional bytes passphrase = 3;
  26. enum AutomaticallyConnectOption {
  27. AUTOMATICALLY_CONNECT_UNSPECIFIED = 0;
  28. AUTOMATICALLY_CONNECT_DISABLED = 1;
  29. AUTOMATICALLY_CONNECT_ENABLED = 2;
  30. }
  31. optional AutomaticallyConnectOption automatically_connect = 4;
  32. enum IsPreferredOption {
  33. IS_PREFERRED_UNSPECIFIED = 0;
  34. IS_PREFERRED_DISABLED = 1;
  35. IS_PREFERRED_ENABLED = 2;
  36. }
  37. optional IsPreferredOption is_preferred = 5;
  38. enum MeteredOption {
  39. METERED_OPTION_UNSPECIFIED = 0;
  40. METERED_OPTION_NO = 1;
  41. METERED_OPTION_YES = 2;
  42. // Allows the device to use heuristics to determine if network is metered.
  43. METERED_OPTION_AUTO = 3;
  44. }
  45. optional MeteredOption metered = 6;
  46. message ProxyConfiguration {
  47. enum ProxyOption {
  48. PROXY_OPTION_UNSPECIFIED = 0;
  49. PROXY_OPTION_DISABLED = 1;
  50. // Use a Proxy Auto-config(PAC) Url, set in proxy_url
  51. PROXY_OPTION_AUTOMATIC = 2;
  52. // Uses Web Proxy Auto-Discovery Protocol (WPAD) to discover the proxy
  53. // settings using DHCP/DNS.
  54. PROXY_OPTION_AUTODISCOVERY = 3;
  55. // User sets details in manual_proxy_configuration.
  56. PROXY_OPTION_MANUAL = 4;
  57. }
  58. optional ProxyOption proxy_option = 1;
  59. // Only set if PROXY_OPTION_AUTOMATIC.
  60. optional string autoconfiguration_url = 2;
  61. message ManualProxyConfiguration {
  62. optional string http_proxy_url = 1;
  63. optional int32 http_proxy_port = 2;
  64. optional string secure_http_proxy_url = 3;
  65. optional int32 secure_http_proxy_port = 4;
  66. optional string socks_host_url = 5;
  67. optional int32 socks_host_port = 6;
  68. repeated string excluded_domains = 7;
  69. }
  70. // Only set if PROXY_OPTION_MANUAL.
  71. optional ManualProxyConfiguration manual_proxy_configuration = 3;
  72. }
  73. optional ProxyConfiguration proxy_configuration = 7;
  74. enum DnsOption {
  75. DNS_OPTION_UNSPECIFIED = 0;
  76. DNS_OPTION_DEFAULT_DHCP = 1;
  77. DNS_OPTION_CUSTOM = 2;
  78. }
  79. optional DnsOption dns_option = 10;
  80. // List of DNS servers to be used when set to DNS_OPTION_CUSTOM. Up to 4.
  81. repeated string custom_dns = 8;
  82. // The last time this configuration was connected to before being synced. It
  83. // will only be updated when the configuration is changed. This is represented
  84. // with the UNIX timestamp, ms since epoch.
  85. optional int64 last_connected_timestamp = 9;
  86. }