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 below IP blocks in CIDR notation from the | 18 // Exclude network traffic to the list of IP blocks in CIDR notation from |
19 // tunnel. This can be used to bypass traffic to and from the VPN server. | 19 // the tunnel. This can be used to bypass traffic to and from the VPN |
20 // When many rules match a destination, routing decision is made based on | 20 // server. |
21 // longest matching prefix. | 21 // When many rules match a destination, the rule with the longest matching |
| 22 // prefix wins. |
22 DOMString[] exclusionList; | 23 DOMString[] exclusionList; |
23 // Include network traffic to the below IP blocks in CIDR notation to the | 24 // Include network traffic to the list of IP blocks in CIDR notation to the |
24 // tunnel. By default all user traffic is routed to the tunnel. This | 25 // tunnel. By default all user traffic is routed to the tunnel. This |
25 // parameter can be used to setup split tunnel. | 26 // parameter can be used to setup split tunnel. |
26 // When many rules match a destination, routing decision is made based on | 27 // When many rules match a destination, the rule with the longest matching |
27 // longest matching prefix. | 28 // prefix wins. |
28 DOMString[] inclusionList; | 29 DOMString[] inclusionList; |
29 // A list of search domains. (default: no search domain) | 30 // A list of search domains. (default: no search domain) |
30 DOMString[]? domainSearch; | 31 DOMString[]? domainSearch; |
31 // A list of IPs for the DNS servers. | 32 // A list of IPs for the DNS servers. |
32 DOMString[] dnsServers; | 33 DOMString[] dnsServers; |
33 }; | 34 }; |
34 | 35 |
35 // The enum is used by the platform to notify the client of the VPN session | 36 // The enum is used by the platform to notify the client of the VPN session |
36 // status. | 37 // status. |
37 enum PlatformMessage { | 38 enum PlatformMessage { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // session owned by the extension. | 110 // session owned by the extension. |
110 // |data|: The IP packet received from the platform. | 111 // |data|: The IP packet received from the platform. |
111 static void onPacketReceived(ArrayBuffer data); | 112 static void onPacketReceived(ArrayBuffer data); |
112 | 113 |
113 // Triggered when a configuration created by the extension is removed by the | 114 // Triggered when a configuration created by the extension is removed by the |
114 // platform. | 115 // platform. |
115 // |name|: Name of the configuration removed. | 116 // |name|: Name of the configuration removed. |
116 static void onConfigRemoved(DOMString name); | 117 static void onConfigRemoved(DOMString name); |
117 }; | 118 }; |
118 }; | 119 }; |
OLD | NEW |