| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Use the <code>chrome.vpnProvider</code> API to implement a VPN | 5 // Use the <code>chrome.vpnProvider</code> API to implement a VPN |
| 6 // client. | 6 // client. |
| 7 namespace vpnProvider { | 7 namespace vpnProvider { |
| 8 // A parameters class for the VPN interface. | 8 // A parameters class for the VPN interface. |
| 9 dictionary Parameters { | 9 dictionary Parameters { |
| 10 // IP address for the VPN interface in CIDR notation. | 10 // IP address for the VPN interface in CIDR notation. |
| 11 // IPv4 is currently the only supported mode. | 11 // IPv4 is currently the only supported mode. |
| 12 DOMString address; | 12 DOMString address; |
| 13 // Broadcast address for the VPN interface. (default: deduced | 13 // Broadcast address for the VPN interface. (default: deduced |
| 14 // from IP address and mask) | 14 // from IP address and mask) |
| 15 DOMString? broadcastAddress; | 15 DOMString? broadcastAddress; |
| 16 // MTU setting for the VPN interface. (default: 1500 bytes) | 16 // MTU setting for the VPN interface. (default: 1500 bytes) |
| 17 DOMString? mtu; | 17 DOMString? mtu; |
| 18 // Exclude network traffic to the list of IP blocks in CIDR notation from | 18 // Exclude network traffic to the list of IP blocks in CIDR notation from |
| 19 // the tunnel. This can be used to bypass traffic to and from the VPN | 19 // the tunnel. This can be used to bypass traffic to and from the VPN |
| 20 // server. | 20 // server. |
| 21 // When many rules match a destination, the rule with the longest matching | 21 // When many rules match a destination, the rule with the longest matching |
| 22 // prefix wins. | 22 // prefix wins. |
| 23 // Entries that correspond to the same CIDR block are treated as duplicates. |
| 24 // Such duplicates in the collated (exclusionList + inclusionList) list are |
| 25 // eliminated and the exact duplicate entry that will be eliminated is |
| 26 // undefined. |
| 23 DOMString[] exclusionList; | 27 DOMString[] exclusionList; |
| 24 // Include network traffic to the list of IP blocks in CIDR notation to the | 28 // Include network traffic to the list of IP blocks in CIDR notation to the |
| 25 // tunnel. By default all user traffic is routed to the tunnel. This | 29 // tunnel. This parameter can be used to set up a split tunnel. By default |
| 26 // parameter can be used to setup split tunnel. | 30 // no traffic is directed to the tunnel. Adding the entry "0.0.0.0/0" to |
| 31 // this list gets all the user traffic redirected to the tunnel. |
| 27 // When many rules match a destination, the rule with the longest matching | 32 // When many rules match a destination, the rule with the longest matching |
| 28 // prefix wins. | 33 // prefix wins. |
| 34 // Entries that correspond to the same CIDR block are treated as duplicates. |
| 35 // Such duplicates in the collated (exclusionList + inclusionList) list are |
| 36 // eliminated and the exact duplicate entry that will be eliminated is |
| 37 // undefined. |
| 29 DOMString[] inclusionList; | 38 DOMString[] inclusionList; |
| 30 // A list of search domains. (default: no search domain) | 39 // A list of search domains. (default: no search domain) |
| 31 DOMString[]? domainSearch; | 40 DOMString[]? domainSearch; |
| 32 // A list of IPs for the DNS servers. | 41 // A list of IPs for the DNS servers. |
| 33 DOMString[] dnsServers; | 42 DOMString[] dnsServers; |
| 34 }; | 43 }; |
| 35 | 44 |
| 36 // The enum is used by the platform to notify the client of the VPN session | 45 // The enum is used by the platform to notify the client of the VPN session |
| 37 // status. | 46 // status. |
| 38 enum PlatformMessage { | 47 enum PlatformMessage { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // session owned by the extension. | 119 // session owned by the extension. |
| 111 // |data|: The IP packet received from the platform. | 120 // |data|: The IP packet received from the platform. |
| 112 static void onPacketReceived(ArrayBuffer data); | 121 static void onPacketReceived(ArrayBuffer data); |
| 113 | 122 |
| 114 // Triggered when a configuration created by the extension is removed by the | 123 // Triggered when a configuration created by the extension is removed by the |
| 115 // platform. | 124 // platform. |
| 116 // |name|: Name of the configuration removed. | 125 // |name|: Name of the configuration removed. |
| 117 static void onConfigRemoved(DOMString name); | 126 static void onConfigRemoved(DOMString name); |
| 118 }; | 127 }; |
| 119 }; | 128 }; |
| OLD | NEW |