summaryrefslogtreecommitdiffstats
path: root/usr/local/pkg/openvpn_cli.xml
blob: fd4b03e795dbc8fc778b00e35044c1a608acf892 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<packagegui>
	<name>openvpnclient</name>
	<title>OpenVPN: Client</title>
	<include_file>openvpn.inc</include_file>
	<delete_string>An OpenVPN client has been deleted.</delete_string>
	<addedit_string>An OpenVPN client has been created/modified.</addedit_string>
	<tabs>
		<tab>
			<text>Server</text>
			<url>/pkg.php?xml=openvpn.xml</url>
		</tab>
		<tab>
			<text>Client</text>
			<url>/pkg.php?xml=openvpn_cli.xml</url>
			<active/>
		</tab>
		<tab>
			<text>Client-specific configuration</text>
			<url>/pkg.php?xml=openvpn_csc.xml</url>
		</tab>
	</tabs>
	<adddeleteeditpagefields>
		<columnitem>
			<fieldname>disable</fieldname>
			<fielddescr>Disabled</fielddescr>
			<type>checkbox</type>
		</columnitem>
		<columnitem>
			<fieldname>serveraddr</fieldname>
			<fielddescr>Server</fielddescr>
		</columnitem>
		<columnitem>
			<fieldname>protocol</fieldname>
			<fielddescr>Protocol</fielddescr>
		</columnitem>
		<columnitem>
			<fieldname>description</fieldname>
			<fielddescr>Description</fielddescr>
		</columnitem>
	</adddeleteeditpagefields>
	<fields>
		<field>
			<fieldname>disable</fieldname>
			<fielddescr>Disable this tunnel</fielddescr>
			<description>This allows you to disable this tunnel without removing it from the list.</description>
			<required/>
			<type>checkbox</type>
		</field>
		<field>
			<fieldname>protocol</fieldname>
			<fielddescr>Protocol</fielddescr>
			<description>The protocol to be used for the VPN.</description>
			<required/>
			<type>select</type>
			<options>
				<option>
					<value>TCP</value>
					<name>TCP</name>
				</option>
				<option>
					<value>UDP</value>
					<name>UDP</name>
				</option>
			</options>
			<default_value>UDP</default_value>
		</field>
		<field>
			<fieldname>serveraddr</fieldname>
			<fielddescr>Server address</fielddescr>
			<description>This is the address OpenVPN will try to connect to in order to establish the tunnel. Set it to the remote endpoint's address.</description>
			<required/>
			<type>input</type>
		</field>
		<field>
			<fieldname>serverport</fieldname>
			<fielddescr>Server port</fielddescr>
			<description>The port OpenVPN will use to connect to the server. Most people would want to use 1194 here.</description>
			<required/>
			<type>input</type>
			<default_value>1194</default_value>
			<size>5</size>
		</field>
		<field>
			<fieldname>interface_ip</fieldname>
			<fielddescr>Interface IP</fielddescr>
			<description>This specifies the IPs to be assigned to the local interface. Expressed as a CIDR range. The first address in the range will be set to the remote endpoint of the interface, and the second will be assigned to the local endpoint. For TLS VPNs, the interface IPs are assigned by the server pool.</description>
			<type>input</type>
		</field>
		<field>
			<fieldname>remote_network</fieldname>
			<fielddescr>Remote network</fielddescr>
			<description>This is the network that will be accessable from your endpoint. Expressed as a CIDR range. You may leave this blank if all you want is to access the VPN clients. You normally want this set to the remote endpoint's LAN network.</description>
			<type>input</type>
		</field>
		<field>
			<fieldname>proxy_hostname</fieldname>
			<fielddescr>Proxy Host</fielddescr>
			<description>Proxy server hostname.</description>
                        <type>input</type>
		</field>
		<field>
			<fieldname>proxy_port</fieldname>
			<fielddescr>Proxy port</fielddescr>
			<description>The port OpenVPN will use on the proxy server.</description>
			<type>input</type>
			<default_value>3128</default_value>
			<size>5</size>
		</field>
		<field>
			<fieldname>crypto</fieldname>
			<fielddescr>Cryptography</fielddescr>
			<description>Here you can choose the cryptography algorithm to be used.</description>
			<required/>
			<type>select</type>
			<default_value>BF-CBC</default_value>
		</field>
		<field>
			<fieldname>auth_method</fieldname>
			<fielddescr>Authentication method</fielddescr>
			<description>The authentication method to be used.</description>
			<required/>
			<type>select</type>
			<options>
				<option>
					<value>shared_key</value>
					<name>Shared key</name>
				</option>
				<option>
					<value>pki</value>
					<name>PKI (Public Key Infrastructure)</name>
				</option>
			</options>
			<onchange>onAuthMethodChanged()</onchange>
		</field>
		<field>
			<fieldname>shared_key</fieldname>
			<fielddescr>Shared key</fielddescr>
			<description>Paste your shared key here.</description>
			<type>textarea</type>
			<encoding>base64</encoding>
			<rows>8</rows>
			<cols>40</cols>
		</field>
		<field>
			<fieldname>ca_cert</fieldname>
			<fielddescr>CA certificate</fielddescr>
			<description>Paste the server's CA certificate in X.509 format here.</description>
			<type>textarea</type>
			<encoding>base64</encoding>
			<rows>8</rows>
			<cols>40</cols>
		</field>
		<field>
			<fieldname>client_cert</fieldname>
			<fielddescr>Client certificate</fielddescr>
			<description>Paste your client certificate in X.509 format here.</description>
			<type>textarea</type>
			<encoding>base64</encoding>
			<rows>8</rows>
			<cols>40</cols>
		</field>
		<field>
			<fieldname>client_key</fieldname>
			<fielddescr>Client key</fielddescr>
			<description>Paste your client key in RSA format here.</description>
			<type>textarea</type>
			<encoding>base64</encoding>
			<rows>8</rows>
			<cols>40</cols>
		</field>
		<field>
			<fieldname>use_lzo</fieldname>
			<fielddescr>LZO compression</fielddescr>
			<description>Checking this will compress the packets using the LZO algorithm before sending them.</description>
			<type>checkbox</type>
		</field>
		<field>
			<fieldname>use_dynamicport</fieldname>
			<fielddescr>Dynamic sourceport</fielddescr>
			<description>Checking this will let the openvpn client choose a dynamic sourceport for this connection.</description>
			<type>checkbox</type>
		</field>
		<field>
			<fieldname>custom_options</fieldname>
			<fielddescr>Custom options</fielddescr>
			<description>You can put your own custom options here, separated by semi-colons (;). They'll be added to the client configuration.</description>
			<type>input</type>
		</field>
		<field>
			<fieldname>description</fieldname>
			<fielddescr>Description</fielddescr>
			<description>You may enter a description here. This is optional and is not parsed.</description>
			<type>input</type>
		</field>
	</fields>
	<custom_php_command_before_form>
		if(!$config['installedpackages']['openvpnclient'][config][0]['protocol'])
			unset($evaledvar);
		openvpn_get_ciphers(&amp;$pkg);
	</custom_php_command_before_form>
	<custom_php_after_head_command>
		openvpn_print_javascript('client');
	</custom_php_after_head_command>
	<custom_php_after_form_command>
		openvpn_print_javascript2();
	</custom_php_after_form_command>
	<custom_php_validation_command>
		openvpn_validate_input('client', $_POST, &amp;$input_errors);
	</custom_php_validation_command>
	<custom_php_resync_config_command>
		openvpn_resync('client', $id);
	</custom_php_resync_config_command>
</packagegui>
OpenPOWER on IntegriCloud