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