1 | <% |
---|
2 | String tunnelTypeName; |
---|
3 | String tunnelType; |
---|
4 | if (curTunnel >= 0) { |
---|
5 | tunnelTypeName = editBean.getTunnelType(curTunnel); |
---|
6 | tunnelType = editBean.getInternalType(curTunnel); |
---|
7 | %><h2><%=intl._t("Edit Server Settings")%> (<%=editBean.getTunnelName(curTunnel)%>)</h2><% |
---|
8 | } else { |
---|
9 | tunnelTypeName = editBean.getTypeName(request.getParameter("type")); |
---|
10 | tunnelType = net.i2p.data.DataHelper.stripHTML(request.getParameter("type")); |
---|
11 | %><h2><%=intl._t("New Server Settings")%></h2><% |
---|
12 | } %> |
---|
13 | <input type="hidden" name="tunnel" value="<%=curTunnel%>" /> |
---|
14 | <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" /> |
---|
15 | <input type="hidden" name="type" value="<%=tunnelType%>" /> |
---|
16 | <% |
---|
17 | // these are four keys that are generated automatically on first save, |
---|
18 | // and we want to persist in i2ptunnel.config, but don't want to |
---|
19 | // show clogging up the custom options form. |
---|
20 | String key = editBean.getKey1(curTunnel); |
---|
21 | if (key != null && key.length() > 0) { %> |
---|
22 | <input type="hidden" name="key1" value="<%=key%>" /> |
---|
23 | <% } |
---|
24 | key = editBean.getKey2(curTunnel); |
---|
25 | if (key != null && key.length() > 0) { %> |
---|
26 | <input type="hidden" name="key2" value="<%=key%>" /> |
---|
27 | <% } |
---|
28 | key = editBean.getKey3(curTunnel); |
---|
29 | if (key != null && key.length() > 0) { %> |
---|
30 | <input type="hidden" name="key3" value="<%=key%>" /> |
---|
31 | <% } |
---|
32 | key = editBean.getKey4(curTunnel); |
---|
33 | if (key != null && key.length() > 0) { %> |
---|
34 | <input type="hidden" name="key4" value="<%=key%>" /> |
---|
35 | <% } %> |
---|
36 | <input type="submit" class="default" name="action" value="Save changes" /> |
---|
37 | |
---|
38 | <table id="serverTunnelEdit" class="tunnelConfig"> |
---|
39 | <tr> |
---|
40 | <th> |
---|
41 | <%=intl._t("Name")%> |
---|
42 | </th> |
---|
43 | <th> |
---|
44 | <%=intl._t("Type")%> |
---|
45 | </th> |
---|
46 | </tr> |
---|
47 | |
---|
48 | <tr> |
---|
49 | <td> |
---|
50 | <input type="text" size="30" maxlength="50" name="name" title="<%=intl._t("Name of tunnel to be displayed on Tunnel Manager home page and the router console sidebar")%>" value="<%=editBean.getTunnelName(curTunnel)%>" class="freetext tunnelName" /> |
---|
51 | </td> |
---|
52 | <td> |
---|
53 | <%=tunnelTypeName%> |
---|
54 | </td> |
---|
55 | </tr> |
---|
56 | |
---|
57 | <tr> |
---|
58 | <th> |
---|
59 | <%=intl._t("Description")%> |
---|
60 | </th> |
---|
61 | |
---|
62 | <th> |
---|
63 | <%=intl._t("Auto Start Tunnel")%> |
---|
64 | </th> |
---|
65 | </tr> |
---|
66 | |
---|
67 | <tr> |
---|
68 | <td> |
---|
69 | <input type="text" size="60" maxlength="80" name="nofilter_description" title="<%=intl._t("Description of tunnel to be displayed on Tunnel Manager home page")%>" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext tunnelDescriptionText" /> |
---|
70 | </td> |
---|
71 | |
---|
72 | <td> |
---|
73 | <label title="<%=intl._t("Enable this option to ensure this service is available when the router starts")%>"><input value="1" type="checkbox" name="startOnLoad"<%=(editBean.startAutomatically(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
74 | <%=intl._t("Automatically start tunnel when router starts")%></label> |
---|
75 | </td> |
---|
76 | </tr> |
---|
77 | |
---|
78 | <tr> |
---|
79 | <th colspan="2"> |
---|
80 | <% if ("streamrserver".equals(tunnelType)) { %> |
---|
81 | <%=intl._t("Access Point")%> |
---|
82 | <% } else { %> |
---|
83 | <%=intl._t("Target")%> |
---|
84 | <% } %> |
---|
85 | </th> |
---|
86 | </tr> |
---|
87 | |
---|
88 | <tr> |
---|
89 | <% if (!"streamrserver".equals(tunnelType)) { %> |
---|
90 | <td> |
---|
91 | <b><%=intl._t("Host")%>:</b> |
---|
92 | <input type="text" size="20" name="targetHost" title="<%=intl._t("Hostname or IP address of the target server")%>" value="<%=editBean.getTargetHost(curTunnel)%>" class="freetext host" /> |
---|
93 | </td> |
---|
94 | <% } /* !streamrserver */ %> |
---|
95 | |
---|
96 | <td> |
---|
97 | <b><%=intl._t("Port")%>:</b> |
---|
98 | <% String value = editBean.getTargetPort(curTunnel); |
---|
99 | if (value == null || "".equals(value.trim())) { |
---|
100 | out.write(" <span class=\"required\"><font color=\"red\">("); |
---|
101 | out.write(intl._t("required")); |
---|
102 | out.write(")</font></span>"); |
---|
103 | } |
---|
104 | %> |
---|
105 | <input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="<%=intl._t("Specify the port the server is running on")%>" value="<%=editBean.getTargetPort(curTunnel)%>" class="freetext port" placeholder="required" /> |
---|
106 | <% if (!"streamrserver".equals(tunnelType)) { %> |
---|
107 | <label title="<%=intl._t("To avoid traffic sniffing if connecting to a remote server, you can enable an SSL connection. Note that the target server must be configured to accept SSL connections.")%>"><input value="1" type="checkbox" name="useSSL"<%=(editBean.isSSLEnabled(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
108 | <%=intl._t("Use SSL to connect to target")%></label> |
---|
109 | <% } /* !streamrserver */ %> |
---|
110 | </td> |
---|
111 | <% if ("httpbidirserver".equals(tunnelType)) { %> |
---|
112 | </tr> |
---|
113 | |
---|
114 | <tr> |
---|
115 | <th colspan="2"> |
---|
116 | <%=intl._t("Access Point")%> |
---|
117 | </th> |
---|
118 | </tr> |
---|
119 | |
---|
120 | <tr> |
---|
121 | <td> |
---|
122 | <b><%=intl._t("Port")%>:</b> |
---|
123 | |
---|
124 | <% String value4 = editBean.getClientPort(curTunnel); |
---|
125 | if (value4 == null || "".equals(value4.trim())) { |
---|
126 | out.write(" <span class=\"required\"><font color=\"red\">("); |
---|
127 | out.write(intl._t("required")); |
---|
128 | out.write(")</font></span>"); |
---|
129 | } |
---|
130 | %> |
---|
131 | |
---|
132 | <input type="text" size="6" maxlength="5" name="port" title="<%=intl._t("Port required to access service (this can be a different port to the port the service is hosted on)")%>" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="required" /> |
---|
133 | </td> |
---|
134 | <% } /* httpbidirserver */ %> |
---|
135 | <% if ("httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %> |
---|
136 | |
---|
137 | <td> |
---|
138 | <b><%=intl._t("Reachable by")%>:</b> |
---|
139 | |
---|
140 | <select id="reachableBy" name="reachableBy" title="<%=intl._t("Listening interface (IP address) for client access (normally 127.0.0.1)")%>" class="selectbox"> |
---|
141 | <% |
---|
142 | String clientInterface = editBean.getClientInterface(curTunnel); |
---|
143 | for (String ifc : editBean.interfaceSet()) { |
---|
144 | out.write("<option value=\""); |
---|
145 | out.write(ifc); |
---|
146 | out.write('\"'); |
---|
147 | if (ifc.equals(clientInterface)) |
---|
148 | out.write(" selected=\"selected\""); |
---|
149 | out.write('>'); |
---|
150 | out.write(ifc); |
---|
151 | out.write("</option>\n"); |
---|
152 | } |
---|
153 | %> |
---|
154 | </select> |
---|
155 | </td> |
---|
156 | <% } /* httpbidirserver || streamrserver */ %> |
---|
157 | </tr> |
---|
158 | |
---|
159 | |
---|
160 | <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { |
---|
161 | %> |
---|
162 | |
---|
163 | <tr> |
---|
164 | <th> |
---|
165 | <%=intl._t("Website Hostname")%> |
---|
166 | </th> |
---|
167 | <th></th> |
---|
168 | </tr> |
---|
169 | |
---|
170 | <tr> |
---|
171 | <td colspan="2"> |
---|
172 | <input type="text" size="20" id="websiteName" name="spoofedHost" title="<%=intl._t("Website Hostname e.g. mysite.i2p")%>" value="<%=editBean.getSpoofedHost(curTunnel)%>" class="freetext" /> |
---|
173 | <%=intl._t("(leave blank for outproxies)")%> |
---|
174 | </td> |
---|
175 | </tr> |
---|
176 | <% } |
---|
177 | %> |
---|
178 | |
---|
179 | <tr> |
---|
180 | <th> |
---|
181 | <%=intl._t("Local destination")%> |
---|
182 | </th> |
---|
183 | <th> |
---|
184 | <%=intl._t("Private key file")%> |
---|
185 | </th> |
---|
186 | </tr> |
---|
187 | |
---|
188 | <tr> |
---|
189 | <td> |
---|
190 | <div class="displayText" title="<%=intl._t("Read Only: Local Destination (if known)")%>" tabindex="0" onblur="resetScrollLeft(this)"><%=editBean.getDestinationBase64(curTunnel)%></div> |
---|
191 | </td> |
---|
192 | <td> |
---|
193 | <% String value3 = editBean.getPrivateKeyFile(curTunnel); |
---|
194 | if (value3 == null || "".equals(value3.trim())) { |
---|
195 | out.write(" <span class=\"required\"><font color=\"red\">("); |
---|
196 | out.write(intl._t("required")); |
---|
197 | out.write(")</font></span>"); |
---|
198 | } |
---|
199 | %> |
---|
200 | <input type="text" size="30" id="privKeyFile" name="privKeyFile" title="<%=intl._t("Path to Private Key File")%>" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" placeholder="required" /> |
---|
201 | </td> |
---|
202 | </tr> |
---|
203 | |
---|
204 | <% |
---|
205 | /****** |
---|
206 | %> |
---|
207 | <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { |
---|
208 | String sig = editBean.getNameSignature(curTunnel); |
---|
209 | if (sig.length() > 0) { |
---|
210 | %><div id="sigField" class="rowItem"> |
---|
211 | <%=intl._t("Hostname Signature")%> |
---|
212 | <input type="text" size="30" readonly="readonly" title="<%=intl._t("Use to prove that the website name is for this destination")%>" value="<%=sig%>" wrap="off" class="freetext" /> |
---|
213 | </div> |
---|
214 | <% |
---|
215 | } // sig |
---|
216 | } // type |
---|
217 | ****/ |
---|
218 | |
---|
219 | String b64 = editBean.getDestinationBase64(curTunnel); |
---|
220 | net.i2p.util.PortMapper pm = net.i2p.I2PAppContext.getGlobalContext().portMapper(); |
---|
221 | boolean hasImagegen = pm.getPort(net.i2p.util.PortMapper.SVC_IMAGEGEN) > 0; |
---|
222 | boolean hasSusiDNS = pm.getPort(net.i2p.util.PortMapper.SVC_SUSIDNS) > 0; |
---|
223 | if (!"".equals(b64)) { |
---|
224 | %> |
---|
225 | <tr> |
---|
226 | |
---|
227 | <% |
---|
228 | b64 = b64.replace("=", "%3d"); |
---|
229 | String name = editBean.getSpoofedHost(curTunnel); |
---|
230 | if (name == null || name.equals("")) |
---|
231 | name = editBean.getTunnelName(curTunnel); |
---|
232 | // mysite.i2p is set in the installed i2ptunnel.config |
---|
233 | if (name != null && !name.equals("") && !name.equals("mysite.i2p") && !name.contains(" ") && name.endsWith(".i2p")) { |
---|
234 | %> |
---|
235 | |
---|
236 | <td class="buttons" colspan="2"> |
---|
237 | <% |
---|
238 | if (hasImagegen) { |
---|
239 | %> |
---|
240 | <a class="control" title="<%=intl._t("Generate a QR Code for this domain")%>" href="/imagegen/qr?s=320&t=<%=name%>&c=http%3a%2f%2f<%=name%>%2f%3fi2paddresshelper%3d<%=b64%>" target="_top"><%=intl._t("Generate QR Code")%></a> |
---|
241 | <% |
---|
242 | } |
---|
243 | if (hasSusiDNS) { |
---|
244 | %> |
---|
245 | <a class="control" title="<%=intl._t("Add to Private addressbook")%>" href="/susidns/addressbook.jsp?book=private&hostname=<%=name%>&destination=<%=b64%>#add"><%=intl._t("Add to local addressbook")%></a> |
---|
246 | <% |
---|
247 | } |
---|
248 | %> |
---|
249 | <a class="control" title="<%=intl._t("Register, unregister or change details for hostname")%>" href="register?tunnel=<%=curTunnel%>"><%=intl._t("Registration Authentication")%></a> |
---|
250 | <% |
---|
251 | if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { |
---|
252 | %> |
---|
253 | <a class="control" title="<%=intl._t("HTTPS configuration")%>" href="ssl?tunnel=<%=curTunnel%>"><%=intl._t("SSL Wizard")%></a> |
---|
254 | <% |
---|
255 | } |
---|
256 | %> |
---|
257 | </td> |
---|
258 | <% |
---|
259 | } else { |
---|
260 | %> |
---|
261 | <td class="infohelp" colspan="2"> |
---|
262 | <%=intl._t("Note: In order to enable QR code generation or registration authentication, configure the Website Hostname field (for websites) or the Name field (everything else) above with an .i2p suffixed hostname e.g. mynewserver.i2p")%> |
---|
263 | </td> |
---|
264 | <% |
---|
265 | } // name |
---|
266 | %> |
---|
267 | </tr> |
---|
268 | |
---|
269 | <% |
---|
270 | } // b64 |
---|
271 | |
---|
272 | %> |
---|
273 | </table> |
---|
274 | |
---|
275 | <h3><%=intl._t("Advanced networking options")%></h3> |
---|
276 | |
---|
277 | <table id="#advancedServerTunnelOptions" class="tunnelConfig"> |
---|
278 | <tr> |
---|
279 | <th colspan="2"> |
---|
280 | <%=intl._t("Tunnel Options")%> |
---|
281 | </th> |
---|
282 | </tr> |
---|
283 | |
---|
284 | <% if (editBean.isAdvanced()) { |
---|
285 | %><tr> |
---|
286 | <th colspan="2"> |
---|
287 | <%=intl._t("Inbound")%> |
---|
288 | </th> |
---|
289 | </tr><% |
---|
290 | } // isAdvanced() |
---|
291 | %> |
---|
292 | |
---|
293 | <tr> |
---|
294 | <td> |
---|
295 | <b><%=intl._t("Length")%></b> |
---|
296 | </td> |
---|
297 | |
---|
298 | <td> |
---|
299 | <b><%=intl._t("Variance")%></b> |
---|
300 | </td> |
---|
301 | </tr> |
---|
302 | |
---|
303 | <tr> |
---|
304 | <td> |
---|
305 | <select id="tunnelDepth" name="tunnelDepth" title="<%=intl._t("Length of each Tunnel")%>" class="selectbox"> |
---|
306 | <% int tunnelDepth = editBean.getTunnelDepth(curTunnel, 3); |
---|
307 | %><option value="0"<%=(tunnelDepth == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop tunnel (no anonymity)")%></option> |
---|
308 | <option value="1"<%=(tunnelDepth == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("1 hop tunnel (low anonymity)")%></option> |
---|
309 | <option value="2"<%=(tunnelDepth == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("2 hop tunnel (medium anonymity)")%></option> |
---|
310 | <option value="3"<%=(tunnelDepth == 3 ? " selected=\"selected\"" : "") %>><%=intl._t("3 hop tunnel (high anonymity)")%></option> |
---|
311 | <% if (editBean.isAdvanced()) { |
---|
312 | %><option value="4"<%=(tunnelDepth == 4 ? " selected=\"selected\"" : "") %>>4 hop tunnel</option> |
---|
313 | <option value="5"<%=(tunnelDepth == 5 ? " selected=\"selected\"" : "") %>>5 hop tunnel</option> |
---|
314 | <option value="6"<%=(tunnelDepth == 6 ? " selected=\"selected\"" : "") %>>6 hop tunnel</option> |
---|
315 | <option value="7"<%=(tunnelDepth == 7 ? " selected=\"selected\"" : "") %>>7 hop tunnel</option> |
---|
316 | <% } else if (tunnelDepth > 3) { |
---|
317 | %> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> <%=intl._t("hop tunnel (very poor performance)")%></option> |
---|
318 | <% } |
---|
319 | %></select> |
---|
320 | </td> |
---|
321 | |
---|
322 | <td> |
---|
323 | <select id="tunnelVariance" name="tunnelVariance" title="<%=intl._t("Level of Randomization for Tunnel Depth")%>" class="selectbox"> |
---|
324 | <% int tunnelVariance = editBean.getTunnelVariance(curTunnel, 0); |
---|
325 | %><option value="0"<%=(tunnelVariance == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop variance (no randomization, consistent performance)")%></option> |
---|
326 | <option value="1"<%=(tunnelVariance == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("+ 0-1 hop variance (medium additive randomization, subtractive performance)")%></option> |
---|
327 | <option value="2"<%=(tunnelVariance == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("+ 0-2 hop variance (high additive randomization, subtractive performance)")%></option> |
---|
328 | <option value="-1"<%=(tunnelVariance == -1 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-1 hop variance (standard randomization, standard performance)")%></option> |
---|
329 | <option value="-2"<%=(tunnelVariance == -2 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-2 hop variance (not recommended)")%></option> |
---|
330 | <% if (tunnelVariance > 2 || tunnelVariance < -2) { |
---|
331 | %> <option value="<%=tunnelVariance%>" selected="selected"><%= (tunnelVariance > 2 ? "+ " : "+/- ") %>0-<%=tunnelVariance%> <%=intl._t("hop variance")%></option> |
---|
332 | <% } |
---|
333 | %></select> |
---|
334 | </td> |
---|
335 | </tr> |
---|
336 | |
---|
337 | <tr> |
---|
338 | <td> |
---|
339 | <b><%=intl._t("Count")%></b> |
---|
340 | </td> |
---|
341 | |
---|
342 | <td> |
---|
343 | <b><%=intl._t("Backup Count")%></b> |
---|
344 | </td> |
---|
345 | </tr> |
---|
346 | |
---|
347 | <tr> |
---|
348 | <td> |
---|
349 | <select id="tunnelQuantity" name="tunnelQuantity" title="<%=intl._t("Number of Tunnels in Group")%>" class="selectbox"> |
---|
350 | <%=editBean.getQuantityOptions(curTunnel, editBean.isAdvanced() ? 1 : 0)%> |
---|
351 | </select> |
---|
352 | </td> |
---|
353 | |
---|
354 | <td> |
---|
355 | <select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="<%=intl._t("Number of Reserve Tunnels")%>" class="selectbox"> |
---|
356 | <% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0); |
---|
357 | if (editBean.isAdvanced()) { |
---|
358 | // TODO ngettext |
---|
359 | %><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>>0 <%=intl._t("backup tunnels")%></option> |
---|
360 | <option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>>1 <%=intl._t("backup tunnels")%></option> |
---|
361 | <option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>>2 <%=intl._t("backup tunnels")%></option> |
---|
362 | <option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>>3 <%=intl._t("backup tunnels")%></option> |
---|
363 | <% |
---|
364 | } else { |
---|
365 | %><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 backup tunnels (0 redundancy, no added resource usage)")%></option> |
---|
366 | <option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("1 backup tunnel each direction (low redundancy, low resource usage)")%></option> |
---|
367 | <option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("2 backup tunnels each direction (medium redundancy, medium resource usage)")%></option> |
---|
368 | <option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>><%=intl._t("3 backup tunnels each direction (high redundancy, high resource usage)")%></option> |
---|
369 | <% } // isAdvanced() |
---|
370 | if (tunnelBackupQuantity > 3) { |
---|
371 | %> <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> <%=intl._t("backup tunnels")%></option> |
---|
372 | <% } |
---|
373 | %></select> |
---|
374 | </td> |
---|
375 | </tr> |
---|
376 | |
---|
377 | <% if (editBean.isAdvanced()) { |
---|
378 | // repeat four options above for outbound |
---|
379 | %><tr> |
---|
380 | <th colspan="2"> |
---|
381 | <%=intl._t("Outbound")%> |
---|
382 | </th> |
---|
383 | </tr> |
---|
384 | <tr> |
---|
385 | <td> |
---|
386 | <b><%=intl._t("Length")%></b> |
---|
387 | </td> |
---|
388 | <td> |
---|
389 | <b><%=intl._t("Variance")%></b> |
---|
390 | </td> |
---|
391 | </tr> |
---|
392 | <tr> |
---|
393 | <td> |
---|
394 | <select id="tunnelDepthOut" name="tunnelDepthOut" title="<%=intl._t("Length of each Tunnel")%>" class="selectbox"> |
---|
395 | <% int tunnelDepthOut = editBean.getTunnelDepthOut(curTunnel, 3); |
---|
396 | %><option value="0"<%=(tunnelDepthOut == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop tunnel (no anonymity)")%></option> |
---|
397 | <option value="1"<%=(tunnelDepthOut == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("1 hop tunnel (low anonymity)")%></option> |
---|
398 | <option value="2"<%=(tunnelDepthOut == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("2 hop tunnel (medium anonymity)")%></option> |
---|
399 | <option value="3"<%=(tunnelDepthOut == 3 ? " selected=\"selected\"" : "") %>><%=intl._t("3 hop tunnel (high anonymity)")%></option> |
---|
400 | <option value="4"<%=(tunnelDepthOut == 4 ? " selected=\"selected\"" : "") %>>4 hop tunnel</option> |
---|
401 | <option value="5"<%=(tunnelDepthOut == 5 ? " selected=\"selected\"" : "") %>>5 hop tunnel</option> |
---|
402 | <option value="6"<%=(tunnelDepthOut == 6 ? " selected=\"selected\"" : "") %>>6 hop tunnel</option> |
---|
403 | <option value="7"<%=(tunnelDepthOut == 7 ? " selected=\"selected\"" : "") %>>7 hop tunnel</option> |
---|
404 | </select> |
---|
405 | </td> |
---|
406 | <td> |
---|
407 | <select id="tunnelVarianceOut" name="tunnelVarianceOut" title="<%=intl._t("Level of Randomization for Tunnel Depth")%>" class="selectbox"> |
---|
408 | <% int tunnelVarianceOut = editBean.getTunnelVarianceOut(curTunnel, 0); |
---|
409 | %><option value="0"<%=(tunnelVarianceOut == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop variance (no randomization, consistent performance)")%></option> |
---|
410 | <option value="1"<%=(tunnelVarianceOut == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("+ 0-1 hop variance (medium additive randomization, subtractive performance)")%></option> |
---|
411 | <option value="2"<%=(tunnelVarianceOut == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("+ 0-2 hop variance (high additive randomization, subtractive performance)")%></option> |
---|
412 | <option value="-1"<%=(tunnelVarianceOut == -1 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-1 hop variance (standard randomization, standard performance)")%></option> |
---|
413 | <option value="-2"<%=(tunnelVarianceOut == -2 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-2 hop variance (not recommended)")%></option> |
---|
414 | <% if (tunnelVarianceOut > 2 || tunnelVarianceOut < -2) { |
---|
415 | %> <option value="<%=tunnelVarianceOut%>" selected="selected"><%= (tunnelVarianceOut > 2 ? "+ " : "+/- ") %>0-<%=tunnelVarianceOut%> <%=intl._t("hop variance")%></option> |
---|
416 | <% } |
---|
417 | %></select> |
---|
418 | </td> |
---|
419 | </tr> |
---|
420 | <tr> |
---|
421 | <td> |
---|
422 | <b><%=intl._t("Count")%></b> |
---|
423 | </td> |
---|
424 | |
---|
425 | <td> |
---|
426 | <b><%=intl._t("Backup Count")%></b> |
---|
427 | </td> |
---|
428 | </tr> |
---|
429 | <tr> |
---|
430 | <td> |
---|
431 | <select id="tunnelQuantityOut" name="tunnelQuantityOut" title="<%=intl._t("Number of Tunnels in Group")%>" class="selectbox"> |
---|
432 | <%=editBean.getQuantityOptions(curTunnel, 2)%> |
---|
433 | </select> |
---|
434 | </td> |
---|
435 | <td> |
---|
436 | <select id="tunnelBackupQuantityOut" name="tunnelBackupQuantityOut" title="<%=intl._t("Number of Reserve Tunnels")%>" class="selectbox"> |
---|
437 | <% int tunnelBackupQuantityOut = editBean.getTunnelBackupQuantityOut(curTunnel, 0); |
---|
438 | // TODO ngettext |
---|
439 | %><option value="0"<%=(tunnelBackupQuantityOut == 0 ? " selected=\"selected\"" : "") %>>0 <%=intl._t("backup tunnels")%></option> |
---|
440 | <option value="1"<%=(tunnelBackupQuantityOut == 1 ? " selected=\"selected\"" : "") %>>1 <%=intl._t("backup tunnels")%></option> |
---|
441 | <option value="2"<%=(tunnelBackupQuantityOut == 2 ? " selected=\"selected\"" : "") %>>2 <%=intl._t("backup tunnels")%></option> |
---|
442 | <option value="3"<%=(tunnelBackupQuantityOut == 3 ? " selected=\"selected\"" : "") %>>3 <%=intl._t("backup tunnels")%></option> |
---|
443 | <% if (tunnelBackupQuantityOut > 3) { |
---|
444 | %> <option value="<%=tunnelBackupQuantityOut%>" selected="selected"><%=tunnelBackupQuantityOut%> <%=intl._t("backup tunnels")%></option> |
---|
445 | <% } |
---|
446 | %></select> |
---|
447 | </td> |
---|
448 | </tr> |
---|
449 | <% |
---|
450 | } // isAdvanced() End outbound config section |
---|
451 | %> |
---|
452 | |
---|
453 | <% if (!"streamrserver".equals(tunnelType)) { %> |
---|
454 | |
---|
455 | <tr> |
---|
456 | <th colspan="2"> |
---|
457 | <%=intl._t("Profile")%> |
---|
458 | </th> |
---|
459 | </tr> |
---|
460 | |
---|
461 | <tr> |
---|
462 | <td colspan="2"> |
---|
463 | <select id="profile" name="profile" title="<%=intl._t("Connection Profile")%>" class="selectbox"> |
---|
464 | <% boolean interactiveProfile = editBean.isInteractive(curTunnel); |
---|
465 | %><option <%=(interactiveProfile == true ? "selected=\"selected\" " : "")%>value="interactive"><%=intl._t("interactive connection")%> </option> |
---|
466 | <option <%=(interactiveProfile == false ? "selected=\"selected\" " : "")%>value="bulk"><%=intl._t("bulk connection (downloads/websites/BT)")%> </option> |
---|
467 | </select> |
---|
468 | </td> |
---|
469 | </tr> |
---|
470 | |
---|
471 | <% } /* !streamrserver */ %> |
---|
472 | |
---|
473 | <tr> |
---|
474 | <th colspan="2"> |
---|
475 | <%=intl._t("Router I2CP Address")%> |
---|
476 | </th> |
---|
477 | </tr> |
---|
478 | <tr> |
---|
479 | <td> |
---|
480 | <b><%=intl._t("Host")%>:</b> |
---|
481 | <input type="text" id="clientHost" name="clientHost" size="20" title="<%=intl._t("I2CP Hostname or IP")%>" value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> |
---|
482 | </td> |
---|
483 | <td> |
---|
484 | <b><%=intl._t("Port")%>:</b> |
---|
485 | <input type="text" id="clientPort" name="clientport" size="20" title="<%=intl._t("I2CP Port Number")%>" value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> |
---|
486 | </td> |
---|
487 | </tr> |
---|
488 | |
---|
489 | <tr> |
---|
490 | <th colspan="2"> |
---|
491 | <%=intl._t("Encrypt Leaseset")%> |
---|
492 | </th> |
---|
493 | </tr> |
---|
494 | |
---|
495 | <tr> |
---|
496 | <td colspan="2"> |
---|
497 | <label title="<%=intl._t("Only clients with the encryption key will be able to connect")%>"><input value="1" type="checkbox" id="startOnLoad" name="encrypt"<%=(editBean.getEncrypt(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
498 | <%=intl._t("Only allow clients with the encryption key to connect to this server")%></label> |
---|
499 | </td> |
---|
500 | </tr> |
---|
501 | |
---|
502 | <tr> |
---|
503 | <td> |
---|
504 | <b><%=intl._t("Encryption Key")%></b> |
---|
505 | </td> |
---|
506 | |
---|
507 | <td> |
---|
508 | <b><%=intl._t("Generate New Key")%></b> (<%=intl._t("Tunnel must be stopped first")%>) |
---|
509 | </td> |
---|
510 | </tr> |
---|
511 | |
---|
512 | <tr> |
---|
513 | <td> |
---|
514 | <textarea rows="1" style="height: 3em;" cols="44" id="leasesetKey" name="encryptKey" title="<%=intl._t("Encryption key required to access this service")%>" wrap="off" spellcheck="false"><%=editBean.getEncryptKey(curTunnel)%></textarea> |
---|
515 | </td> |
---|
516 | |
---|
517 | <td> |
---|
518 | <button class="control" type="submit" name="action" value="Generate" title="<%=intl._t("Generate new encryption key")%>"><%=intl._t("Generate")%></button> |
---|
519 | </td> |
---|
520 | </tr> |
---|
521 | |
---|
522 | <tr> |
---|
523 | <th colspan="2"> |
---|
524 | <%=intl._t("Restricted Access List")%> |
---|
525 | </th> |
---|
526 | </tr> |
---|
527 | |
---|
528 | <tr> |
---|
529 | <td colspan="2"> |
---|
530 | <span class="multiOption"><label title="<%=intl._t("Allow all clients to connect to this service")%>"><input value="0" type="radio" name="accessMode"<%=(editBean.getAccessMode(curTunnel).equals("0") ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
531 | <%=intl._t("Disable")%></label></span> |
---|
532 | <span class="multiOption"><label title="<%=intl._t("Prevent listed clients from connecting to this service")%>"><input value="2" type="radio" name="accessMode"<%=(editBean.getAccessMode(curTunnel).equals("2") ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
533 | <%=intl._t("Blacklist")%></label></span> |
---|
534 | <span class="multiOption"><label title="<%=intl._t("Only allow listed clients to connect to this service")%>"><input value="1" type="radio" name="accessMode"<%=(editBean.getAccessMode(curTunnel).equals("1") ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
535 | <%=intl._t("Whitelist")%></label></span> |
---|
536 | </td> |
---|
537 | </tr> |
---|
538 | |
---|
539 | <tr> |
---|
540 | <td colspan="2"> |
---|
541 | <b><%=intl._t("Access List Description")%></b> (<%=intl._t("Specify clients, 1 per line or describe access list")%>) |
---|
542 | </td> |
---|
543 | </tr> |
---|
544 | |
---|
545 | <tr> |
---|
546 | <td colspan="2"> |
---|
547 | <textarea rows="2" style="height: 8em;" cols="60" name="accessList" title="<%=intl._t("Control access to this service")%>" wrap="off" spellcheck="false"><%=editBean.getAccessList(curTunnel)%></textarea> |
---|
548 | </td> |
---|
549 | </tr> |
---|
550 | |
---|
551 | <tr> |
---|
552 | <td colspan="2"> |
---|
553 | <b><%=intl._t("Filter Definition File")%></b> |
---|
554 | </td> |
---|
555 | </tr> |
---|
556 | |
---|
557 | <tr> |
---|
558 | <td colspan="2"> |
---|
559 | <%=intl._t("You can define an advanced filter for this tunnel.")%> (<a href="http://i2p-projekt.i2p/spec/filter-format" target="_blank"><%=intl._t("Format Specification")%></a>) |
---|
560 | </td> |
---|
561 | </tr> |
---|
562 | |
---|
563 | <tr> |
---|
564 | <td colspan="2"> |
---|
565 | <label for="filterDefinition"><%=intl._t("Absolute path to file containing filter definition")%></label> |
---|
566 | <input type="text" id="filterDefinition" name="filterDefinition" value="<%=editBean.getFilterDefinition(curTunnel)%>" size="30"/> |
---|
567 | </td> |
---|
568 | </tr> |
---|
569 | |
---|
570 | <tr> |
---|
571 | <th colspan="2"> |
---|
572 | <%=intl._t("Server Access Options")%> |
---|
573 | </th> |
---|
574 | </tr> |
---|
575 | |
---|
576 | <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { |
---|
577 | %> |
---|
578 | |
---|
579 | <tr> |
---|
580 | <td> |
---|
581 | <label title="<%=intl._t("Prevent clients from accessing this service via an inproxy")%>"><input value="1" type="checkbox" name="rejectInproxy"<%=(editBean.isRejectInproxy(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
582 | <%=intl._t("Block Access via Inproxies")%></label> |
---|
583 | </td> |
---|
584 | |
---|
585 | <td> |
---|
586 | <label><input value="1" type="checkbox" name="rejectReferer"<%=(editBean.isRejectReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
587 | <%=intl._t("Block Accesses containing Referers")%></label> |
---|
588 | </td> |
---|
589 | </tr> |
---|
590 | |
---|
591 | <tr> |
---|
592 | <td> |
---|
593 | <label title="<%=intl._t("Deny User-Agents matching these strings (probably from inproxies)")%>"><input value="1" type="checkbox" name="rejectUserAgents"<%=(editBean.isRejectUserAgents(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
594 | <%=intl._t("Block these User-Agents")%></label> |
---|
595 | </td> |
---|
596 | |
---|
597 | <td> |
---|
598 | <input type="text" id="userAgents" name="userAgents" size="20" title="<%=intl._t("comma separated, e.g. Mozilla,Opera (case-sensitive)")%>" value="<%=editBean.getUserAgents(curTunnel)%>" class="freetext" /> |
---|
599 | </td> |
---|
600 | </tr> |
---|
601 | <% } // httpserver |
---|
602 | %> |
---|
603 | |
---|
604 | <tr> |
---|
605 | <td> |
---|
606 | <label title="<%=intl._t("Use unique IP addresses for each connecting client (local non-SSL servers only)")%>"><input value="1" type="checkbox" name="uniqueLocal"<%=(editBean.getUniqueLocal(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
607 | <%=intl._t("Unique Local Address per Client")%></label> |
---|
608 | </td> |
---|
609 | |
---|
610 | <td> |
---|
611 | <label title="<%=intl._t("Only enable if you are hosting this service on multiple routers")%>"><input value="1" type="checkbox" name="multihome"<%=(editBean.getMultihome(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
612 | <%=intl._t("Optimize for Multihoming")%></label> |
---|
613 | </td> |
---|
614 | </tr> |
---|
615 | |
---|
616 | <tr> |
---|
617 | <th colspan="2"> |
---|
618 | <%=intl._t("Server Throttling")%> |
---|
619 | </th> |
---|
620 | </tr> |
---|
621 | <tr> |
---|
622 | <td id="throttle" colspan="4"> |
---|
623 | |
---|
624 | <table id="throttler"> |
---|
625 | <tr> |
---|
626 | <th colspan="5"> |
---|
627 | <%=intl._t("Inbound connection limits (0=unlimited)")%> |
---|
628 | </th> |
---|
629 | </tr> |
---|
630 | <tr> |
---|
631 | <td></td> |
---|
632 | <td><b><%=intl._t("Per Minute")%></b></td> |
---|
633 | <td><b><%=intl._t("Per Hour")%></b></td> |
---|
634 | <td><b><%=intl._t("Per Day")%></b></td> |
---|
635 | <td class="blankColumn"></td> |
---|
636 | </tr> |
---|
637 | <tr> |
---|
638 | <td><b><%=intl._t("Per Client")%></b></td> |
---|
639 | <td> |
---|
640 | <input type="text" name="limitMinute" title="<%=intl._t("Maximum number of web page requests per minute for a unique client before access to the server is blocked")%>" value="<%=editBean.getLimitMinute(curTunnel)%>" class="freetext" /> |
---|
641 | </td> |
---|
642 | <td> |
---|
643 | <input type="text" name="limitHour" title="<%=intl._t("Maximum number of web page requests per hour for a unique client before access to the server is blocked")%>" value="<%=editBean.getLimitHour(curTunnel)%>" class="freetext" /> |
---|
644 | </td> |
---|
645 | <td> |
---|
646 | <input type="text" name="limitDay" title="<%=intl._t("Maximum number of web page requests per day for a unique client before access to the server is blocked")%>" value="<%=editBean.getLimitDay(curTunnel)%>" class="freetext" /> |
---|
647 | </td> |
---|
648 | <td class="blankColumn"></td> |
---|
649 | </tr> |
---|
650 | <tr> |
---|
651 | <td><b><%=intl._t("Total")%></b></td> |
---|
652 | <td> |
---|
653 | <input type="text" name="totalMinute" title="<%=intl._t("Total number of web page requests per minute before access to the server is blocked")%>" value="<%=editBean.getTotalMinute(curTunnel)%>" class="freetext" /> |
---|
654 | </td> |
---|
655 | <td> |
---|
656 | <input type="text" name="totalHour" title="<%=intl._t("Total number of web page requests per hour before access to the server is blocked")%>" value="<%=editBean.getTotalHour(curTunnel)%>" class="freetext" /> |
---|
657 | </td> |
---|
658 | <td> |
---|
659 | <input type="text" name="totalDay" title="<%=intl._t("Total number of web page requests per day before access to the server is blocked")%>" value="<%=editBean.getTotalDay(curTunnel)%>" class="freetext" /> |
---|
660 | </td> |
---|
661 | <td class="blankColumn"></td> |
---|
662 | </tr> |
---|
663 | <tr> |
---|
664 | <th colspan="5"><%=intl._t("Max concurrent connections (0=unlimited)")%></th> |
---|
665 | </tr> |
---|
666 | <tr> |
---|
667 | <td></td> |
---|
668 | <td> |
---|
669 | <input type="text" name="maxStreams" title="<%=intl._t("Maximum number of simultaneous client connections")%>" value="<%=editBean.getMaxStreams(curTunnel)%>" class="freetext" /> |
---|
670 | </td> |
---|
671 | <td></td> |
---|
672 | <td></td> |
---|
673 | <td class="blankColumn"></td> |
---|
674 | </tr> |
---|
675 | |
---|
676 | <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { |
---|
677 | %> |
---|
678 | <tr> |
---|
679 | <th colspan="5"> |
---|
680 | <%=intl._t("POST limits (0=unlimited)")%> |
---|
681 | </th> |
---|
682 | </tr> |
---|
683 | <tr> |
---|
684 | <td></td> |
---|
685 | <td> |
---|
686 | <b><%=intl._t("Per Period")%></b> |
---|
687 | </td> |
---|
688 | <td> |
---|
689 | <b><%=intl._t("Ban Duration")%></b> |
---|
690 | </td> |
---|
691 | <td></td> |
---|
692 | <td class="blankColumn"></td> |
---|
693 | </tr> |
---|
694 | <tr> |
---|
695 | <td> |
---|
696 | <b><%=intl._t("Per Client")%> |
---|
697 | </b> |
---|
698 | </td> |
---|
699 | <td> |
---|
700 | <input type="text" name="postMax" title="<%=intl._t("Maximum number of post requests permitted for a unique client for the configured timespan")%>" value="<%=editBean.getPostMax(curTunnel)%>" class="freetext quantity"/> |
---|
701 | </td> |
---|
702 | <td colspan="2"> |
---|
703 | <input type="text" name="postBanTime" title="<%=intl._t("If a client exceeds the maximum number of post requests per allocated period, enforce a ban for this number of minutes")%>" value="<%=editBean.getPostBanTime(curTunnel)%>" class="freetext period"/> |
---|
704 | <%=intl._t("minutes")%> |
---|
705 | </td> |
---|
706 | <td class="blankColumn"></td> |
---|
707 | </tr> |
---|
708 | <tr> |
---|
709 | <td> |
---|
710 | <b><%=intl._t("Total")%> |
---|
711 | </b> |
---|
712 | </td> |
---|
713 | <td> |
---|
714 | <input type="text" name="postTotalMax" title="<%=intl._t("Total number of post requests permitted for the configured timespan")%>" value="<%=editBean.getPostTotalMax(curTunnel)%>" class="freetext quantity"/> |
---|
715 | </td> |
---|
716 | <td colspan="2"> |
---|
717 | <input type="text" name="postTotalBanTime" title="<%=intl._t("If the maximum number of post requests per allocated period is exceeded, enforce a global access ban for this number of minutes")%>" value="<%=editBean.getPostTotalBanTime(curTunnel)%>" class="freetext period"/> |
---|
718 | <%=intl._t("minutes")%> |
---|
719 | </td> |
---|
720 | <td class="blankColumn"></td> |
---|
721 | </tr> |
---|
722 | <tr> |
---|
723 | <td> |
---|
724 | <b><%=intl._t("POST limit period")%> |
---|
725 | </b> |
---|
726 | </td> |
---|
727 | <td colspan="2"> |
---|
728 | <input type="text" name="postCheckTime" title="<%=intl._t("Timespan for the maximum number of post requests to be reached before a ban is triggered")%>" value="<%=editBean.getPostCheckTime(curTunnel)%>" class="freetext period"/> |
---|
729 | <%=intl._t("minutes")%> |
---|
730 | </td> |
---|
731 | <td></td> |
---|
732 | <td class="blankColumn"></td> |
---|
733 | </tr> |
---|
734 | |
---|
735 | <% } // httpserver |
---|
736 | %> |
---|
737 | |
---|
738 | </table> |
---|
739 | </td> |
---|
740 | </tr> |
---|
741 | |
---|
742 | <tr> |
---|
743 | <th colspan="2"> |
---|
744 | <%=intl._t("Reduce tunnel quantity when idle")%> |
---|
745 | </th> |
---|
746 | </tr> |
---|
747 | |
---|
748 | <tr> |
---|
749 | <td colspan="2"> |
---|
750 | <label><input value="1" type="checkbox" id="startOnLoad" name="reduce" <%=(editBean.getReduce(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
751 | <%=intl._t("Reduce tunnel quantity when idle to conserve resources")%></label> |
---|
752 | </td> |
---|
753 | </tr> |
---|
754 | <tr> |
---|
755 | <td> |
---|
756 | <b><%=intl._t("Reduced tunnel count")%>:</b> |
---|
757 | <input type="text" id="reduceCount" name="reduceCount" size="1" maxlength="1" title="<%=intl._t("Number of tunnels to keep open to maintain availability of service")%>" value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext quantity" /> |
---|
758 | </td> |
---|
759 | |
---|
760 | <td> |
---|
761 | <b><%=intl._t("Idle period")%>:</b> |
---|
762 | <input type="text" id="reduceTime" name="reduceTime" size="4" maxlength="4" title="<%=intl._t("Period of inactivity before tunnel number is reduced")%>" value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext period" /> |
---|
763 | <%=intl._t("minutes")%> |
---|
764 | </td> |
---|
765 | </tr> |
---|
766 | |
---|
767 | <% /***************** %> |
---|
768 | |
---|
769 | <tr> |
---|
770 | <th colspan="2"> |
---|
771 | <%=intl._t("New Certificate type")%> |
---|
772 | </th> |
---|
773 | </tr> |
---|
774 | |
---|
775 | <tr> |
---|
776 | <td colspan="2"> |
---|
777 | <span class="multiOption"><label title="<%=intl._t("No Certificate")%>"><%=intl._t("None")%> |
---|
778 | <input value="0" type="radio" id="startOnLoad" name="cert"<%=(editBean.getCert(curTunnel)==0 ? " checked=\"checked\"" : "")%> class="tickbox" /></label></span> |
---|
779 | <span class="multiOption"><label title="<%=intl._t("Hashcash Certificate")%>"><%=intl._t("Hashcash (effort)")%> |
---|
780 | <input value="1" type="radio" id="startOnLoad" name="cert"<%=(editBean.getCert(curTunnel)==1 ? " checked=\"checked\"" : "")%> class="tickbox" /></label> |
---|
781 | <input type="text" id="port" name="effort" size="2" maxlength="2" title="<%=intl._t("Hashcash Effort")%>" value="<%=editBean.getEffort(curTunnel)%>" class="freetext" /></span> |
---|
782 | </td> |
---|
783 | </tr> |
---|
784 | |
---|
785 | <tr> |
---|
786 | <th> |
---|
787 | <%=intl._t("Hashcash Calc Time")%> |
---|
788 | </th> |
---|
789 | <th> |
---|
790 | <%=intl._t("Hidden")%> |
---|
791 | </th> |
---|
792 | </tr> |
---|
793 | |
---|
794 | <tr> |
---|
795 | <td> |
---|
796 | <button class="control" type="submit" name="action" value="Estimate" title="<%=intl._t("Estimate Calculation Time")%>"><%=intl._t("Estimate")%></button> |
---|
797 | </td> |
---|
798 | <td> |
---|
799 | <input value="2" type="radio" id="startOnLoad" name="cert" title="<%=intl._t("Hidden Certificate")%>"<%=(editBean.getCert(curTunnel)==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
800 | </td> |
---|
801 | </tr> |
---|
802 | |
---|
803 | <tr> |
---|
804 | <th colspan="2"> |
---|
805 | <%=intl._t("Signed Certificate")%> |
---|
806 | </th> |
---|
807 | </tr> |
---|
808 | |
---|
809 | <tr> |
---|
810 | <td colspan="2"> |
---|
811 | <label title="<%=intl._t("Signed Certificate")%>"><%=intl._t("Signed (signed by)")%>: |
---|
812 | <input value="3" type="radio" id="startOnLoad" name="cert"<%=(editBean.getCert(curTunnel)==3 ? " checked=\"checked\"" : "")%> class="tickbox" /></label> |
---|
813 | <input type="text" id="port" name="signer" size="50" title="<%=intl._t("Cert Signer")%>" value="<%=editBean.getSigner(curTunnel)%>" class="freetext" /> |
---|
814 | </td> |
---|
815 | </tr> |
---|
816 | |
---|
817 | <tr> |
---|
818 | <th colspan="2"> |
---|
819 | <%=intl._t("Modify Certificate")%> <%=intl._t("(Tunnel must be stopped first)")%> |
---|
820 | </th> |
---|
821 | </tr> |
---|
822 | |
---|
823 | <tr> |
---|
824 | <td colspan="2"> |
---|
825 | <button class="control" type="submit" name="action" value="Modify" title="<%=intl._t("Force new Certificate now")%>"><%=intl._t("Modify")%></button> |
---|
826 | </td> |
---|
827 | </tr> |
---|
828 | |
---|
829 | <% **********************/ %> |
---|
830 | |
---|
831 | <% |
---|
832 | int currentSigType = editBean.getSigType(curTunnel, tunnelType); |
---|
833 | if (true /* editBean.isAdvanced() */ ) { |
---|
834 | String disabled = editBean.canChangeSigType(curTunnel) ? "" : " disabled=\"disabled\" "; |
---|
835 | %> |
---|
836 | <tr> |
---|
837 | <th colspan="2"> |
---|
838 | <%=intl._t("Signature type")%> <%-- (<%=intl._t("Experts only! Changes B32!")%>) --%> |
---|
839 | </th> |
---|
840 | </tr> |
---|
841 | <tr> |
---|
842 | <td colspan="2"> |
---|
843 | <span class="multiOption"> |
---|
844 | <label title="<%=intl._t("Legacy option (deprecated), provided for backward compatibility")%>"><input value="0" type="radio" id="startOnLoad" name="sigType" <%=disabled%> <%=(currentSigType==0 ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
845 | DSA-SHA1</label> |
---|
846 | </span> |
---|
847 | <% if (editBean.isSigTypeAvailable(1)) { %> |
---|
848 | <span class="multiOption"> |
---|
849 | <label><input value="1" type="radio" id="startOnLoad" name="sigType" <%=disabled%> <%=(currentSigType==1 ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
850 | ECDSA-P256</label> |
---|
851 | </span> |
---|
852 | <% } |
---|
853 | if (editBean.isSigTypeAvailable(2)) { %> |
---|
854 | <span class="multiOption"> |
---|
855 | <label><input value="2" type="radio" id="startOnLoad" name="sigType" <%=disabled%> <%=(currentSigType==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
856 | ECDSA-P384</label> |
---|
857 | </span> |
---|
858 | <% } |
---|
859 | if (editBean.isSigTypeAvailable(3)) { %> |
---|
860 | <span class="multiOption"> |
---|
861 | <label><input value="3" type="radio" id="startOnLoad" name="sigType" <%=disabled%> <%=(currentSigType==3 ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
862 | ECDSA-P521</label> |
---|
863 | </span> |
---|
864 | <% } |
---|
865 | if (editBean.isSigTypeAvailable(7)) { %> |
---|
866 | <span class="multiOption"> |
---|
867 | <label title="<%=intl._t("This is the default, recommended option")%>"><input value="7" type="radio" id="startOnLoad" name="sigType" <%=disabled%> <%=(currentSigType==7 ? " checked=\"checked\"" : "")%> class="tickbox" /> |
---|
868 | Ed25519-SHA-512</label> |
---|
869 | </span> |
---|
870 | <% } // isAvailable %> |
---|
871 | |
---|
872 | </td> |
---|
873 | </tr> |
---|
874 | |
---|
875 | <% } // isAdvanced %> |
---|
876 | |
---|
877 | <% |
---|
878 | /* alternate dest, only if current dest is set and is DSA_SHA1 */ |
---|
879 | |
---|
880 | if (currentSigType == 0 && !"".equals(b64) && !"streamrserver".equals(tunnelType)) { |
---|
881 | %> |
---|
882 | |
---|
883 | <tr> |
---|
884 | <th colspan="2"> |
---|
885 | <%=intl._t("Alternate private key file")%> (Ed25519-SHA-512) |
---|
886 | </th> |
---|
887 | </tr> |
---|
888 | |
---|
889 | <tr> |
---|
890 | <td colspan="2"> |
---|
891 | <input type="text" class="freetext" size="30" id="altPrivKeyFile" name="altPrivKeyFile" title="<%=intl._t("Path to Private Key File")%>" value="<%=editBean.getAltPrivateKeyFile(curTunnel)%>" /> |
---|
892 | </td> |
---|
893 | </tr> |
---|
894 | |
---|
895 | <% |
---|
896 | String ab64 = editBean.getAltDestinationBase64(curTunnel); |
---|
897 | if (!"".equals(ab64)) { |
---|
898 | %> |
---|
899 | |
---|
900 | <tr> |
---|
901 | <th colspan="2"> |
---|
902 | <%=intl._t("Alternate local destination")%> |
---|
903 | </th> |
---|
904 | </tr> |
---|
905 | |
---|
906 | <tr> |
---|
907 | <td colspan="2"> |
---|
908 | <div class="displayText" title="<%=intl._t("Read Only: Alternate Local Destination")%>" onblur="resetScrollLeft(this)"><%=ab64%></div> |
---|
909 | </td> |
---|
910 | </tr> |
---|
911 | |
---|
912 | <tr> |
---|
913 | <td colspan="2"> |
---|
914 | <%=editBean.getAltDestHashBase32(curTunnel)%> |
---|
915 | </td> |
---|
916 | </tr> |
---|
917 | |
---|
918 | <% |
---|
919 | ab64 = ab64.replace("=", "%3d"); |
---|
920 | String name = editBean.getSpoofedHost(curTunnel); |
---|
921 | if (name == null || name.equals("")) |
---|
922 | name = editBean.getTunnelName(curTunnel); |
---|
923 | // mysite.i2p is set in the installed i2ptunnel.config |
---|
924 | if (name != null && !name.equals("") && !name.equals("mysite.i2p") && !name.contains(" ") && name.endsWith(".i2p")) { |
---|
925 | %> |
---|
926 | |
---|
927 | <tr> |
---|
928 | <td class="buttons" colspan="2"> |
---|
929 | <% |
---|
930 | if (hasImagegen) { |
---|
931 | %> |
---|
932 | <a class="control" title="<%=intl._t("Generate QR Code")%>" href="/imagegen/qr?s=320&t=<%=name%>&c=http%3a%2f%2f<%=name%>%2f%3fi2paddresshelper%3d<%=ab64%>" target="_top"><%=intl._t("Generate QR Code")%></a> |
---|
933 | <% |
---|
934 | } |
---|
935 | if (hasSusiDNS) { |
---|
936 | %> |
---|
937 | <a class="control" title="<%=intl._t("Add to Private addressbook")%>" href="/susidns/addressbook.jsp?book=private&hostname=<%=name%>&destination=<%=ab64%>#add"><%=intl._t("Add to local addressbook")%></a> |
---|
938 | <% |
---|
939 | } |
---|
940 | } else { |
---|
941 | %> |
---|
942 | |
---|
943 | <tr> |
---|
944 | <td colspan="2"> |
---|
945 | <%=intl._t("Note: In order to enable QR code generation or registration authentication, configure the Website Hostname field (for websites) or the Name field (everything else) above with an .i2p suffixed hostname e.g. mynewserver.i2p")%> |
---|
946 | </td> |
---|
947 | </tr> |
---|
948 | |
---|
949 | <% |
---|
950 | } // name |
---|
951 | %> |
---|
952 | <% |
---|
953 | } // ab64 |
---|
954 | %> |
---|
955 | <% } // currentSigType %> |
---|
956 | |
---|
957 | <tr> |
---|
958 | <th colspan="2"> |
---|
959 | <%=intl._t("Custom options")%> |
---|
960 | </th> |
---|
961 | </tr> |
---|
962 | <tr> |
---|
963 | <td colspan="2"> |
---|
964 | <input type="text" class="freetext" id="customOptions" name="nofilter_customOptions" size="60" title="<%=intl._t("Advanced tunnel, streaming, and I2CP options")%>" value="<%=editBean.getCustomOptions(curTunnel)%>" /> |
---|
965 | </td> |
---|
966 | </tr> |
---|
967 | |
---|
968 | <tr> |
---|
969 | <td class="buttons" colspan="2"> |
---|
970 | <input type="hidden" value="true" name="removeConfirm" /> |
---|
971 | <button id="controlCancel" class="control" type="submit" name="action" value=""><%=intl._t("Cancel")%></button> |
---|
972 | <button id="controlDelete" <%=(editBean.allowJS() ? "onclick=\"if (!confirm('Are you sure you want to delete?')) { return false; }\" " : "")%>class="control" type="submit" name="action" value="Delete this proxy" title="<%=intl._t("Delete this Proxy (cannot be undone)")%>"><%=intl._t("Delete")%></button> |
---|
973 | <button id="controlSave" class="control" type="submit" name="action" value="Save changes"><%=intl._t("Save")%></button> |
---|
974 | </td> |
---|
975 | </tr> |
---|
976 | </table> |
---|