source: apps/i2ptunnel/jsp/editClient.jsi @ 7bdfd07

Last change on this file since 7bdfd07 was 7bdfd07, checked in by zzz <zzz@…>, 18 months ago

i2ptunnel: select box for sig type

  • Property mode set to 100644
File size: 32.0 KB
Line 
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 proxy 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 proxy 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%>
37                <input type="submit" class="default" name="action" value="Save changes" />
38    <table id="clientTunnelEdit" class="tunnelConfig">
39        <tr>
40            <th>
41                <%=intl._t("Name")%>
42            </th><th>
43                <%=intl._t("Type")%>
44            </th>
45        </tr><tr>
46            <td>
47                <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" />
48            </td><td>
49                <%=tunnelTypeName%>
50            </td>
51        </tr><tr>
52            <th>
53                <%=intl._t("Description")%>
54            </th><th>
55                <%=intl._t("Auto Start Tunnel")%>
56            </th>
57        </tr><tr>
58            <td>
59                <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 tunnelDescription" />
60            </td><td>
61                <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" />
62                <%=intl._t("Automatically start tunnel when router starts")%></label>
63            </td>
64        </tr><tr>
65            <th colspan="2">
66<%          if ("streamrclient".equals(tunnelType)) { %>
67                <%=intl._t("Target")%>
68<%          } else { %>
69                <%=intl._t("Access Point")%>
70<%          } /* streamrclient */ %>
71            </th>
72        </tr><tr>
73            <td>
74                <b><%=intl._t("Port")%>:</b>
75<%
76                       String value = editBean.getClientPort(curTunnel);
77                       if (value == null || "".equals(value.trim())) {
78                           out.write(" <span class=\"required\"><font color=\"red\">(");
79                           out.write(intl._t("required"));
80                           out.write(")</font></span>");
81                       }
82%>
83                <input type="text" size="6" maxlength="5" name="port" title="<%=intl._t("Specify the local port this service should be accessible from")%>" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="required" />
84            </td>
85<%
86            if ("streamrclient".equals(tunnelType)) {
87%>
88            <td>
89                <b><%=intl._t("Host")%>:</b>
90<%
91                       String targetHost = editBean.getTargetHost(curTunnel);
92                       if (targetHost == null || "".equals(targetHost.trim())) {
93                           out.write(" <span class=\"required\"><font color=\"red\">(");
94                           out.write(intl._t("required"));
95                           out.write(")</font></span>");
96                       }
97%>
98                <input type="text" size="20" id="targetHost" name="targetHost" title="<%=intl._t("Hostname or IP address of the target server")%>" value="<%=targetHost%>" class="freetext host" placeholder="required" />
99            </td>
100<%
101            } else {
102%>
103            <td>
104                <b><%=intl._t("Reachable by")%>:</b>
105                <select id="reachableBy" name="reachableBy" title="<%=intl._t("Local interface (ip address) the client tunnel will be reachable from")%>" class="selectbox">
106<%
107                    String clientInterface = editBean.getClientInterface(curTunnel);
108                    for (String ifc : editBean.interfaceSet()) {
109                        out.write("<option value=\"");
110                        out.write(ifc);
111                        out.write('\"');
112                        if (ifc.equals(clientInterface))
113                            out.write(" selected=\"selected\"");
114                        out.write('>');
115                        out.write(ifc);
116                        out.write("</option>\n");
117                    }
118%>
119                </select>
120            </td>
121         <% } /* streamrclient */ %>
122        </tr>
123<%
124            if ("client".equals(tunnelType) || "ircclient".equals(tunnelType)) {
125%>
126        <tr>
127            <th colspan="2">
128                    <%=intl._t("Use SSL?")%>
129            </th>
130        </tr><tr>
131            <td colspan="2">
132                <label title="<%=intl._t("If you are accessing a service on a remote I2P router, you may wish to connect with SSL to avoid traffic interception. The client application should be also be configured to use SSL.")%>"><input value="1" type="checkbox" name="useSSL" <%=(editBean.isSSLEnabled(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
133                <%=intl._t("Clients use SSL to connect to tunnel")%></label>
134            </td>
135        </tr>
136<%
137            } /* tunnel types */
138
139            if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) {
140%>
141        <tr>
142            <th colspan="2">
143                    <%=intl._t("Outproxies")%>
144            </th>
145        </tr><tr>
146            <td colspan="2">
147                <input type="text" size="30" name="proxyList" title="<%=intl._t("Specify the .i2p address or destination (b32 or b64) of the outproxy here.")%>&nbsp;<%=intl._t("For a random selection from a pool, separate with commas e.g. server1.i2p,server2.i2p")%>" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext proxyList" />
148            </td>
149        </tr>
150<%
151                 if ("httpclient".equals(tunnelType)) {
152%>
153        <tr>
154            <th colspan="2">
155                       <%=intl._t("SSL Outproxies")%>
156            </th>
157        </tr><tr>
158            <td colspan="2">
159                   <input type="text" size="30" name="sslProxies" title="<%=intl._t("Specify the .i2p address or destination (b32 or b64) of the outproxy here.")%>&nbsp;<%=intl._t("For a random selection from a pool, separate with commas e.g. server1.i2p,server2.i2p")%>" value="<%=editBean.getSslProxies(curTunnel)%>" class="freetext proxyList" />
160            </td>
161        </tr>
162<%
163                 }  // httpclient
164%>
165        <tr>
166            <th colspan="2">
167                    <%=intl._t("Use Outproxy Plugin")%>
168            </th>
169        </tr><tr>
170            <td colspan="2">
171                <label title="<%=intl._t("If an outproxy plugin is installed (e.g. Orchid), use this instead of any configured outproxies to access websites outside of I2P")%>"><input value="1" type="checkbox" name="useOutproxyPlugin" <%=(editBean.getUseOutproxyPlugin(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
172<%=intl._t("Use plugin instead of above-listed proxies if available")%></label>
173            </td>
174        </tr>
175<%
176               } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) {
177%>
178        <tr>
179            <th colspan="2">
180                    <%=intl._t("Tunnel Destination")%>
181            </th>
182        </tr><tr>
183            <td colspan="2">
184                    <% String value2 = editBean.getClientDestination(curTunnel);
185                       if (value2 == null || "".equals(value2.trim())) {
186                           out.write(" <span class=\"required\"><font color=\"red\">(");
187                           out.write(intl._t("required"));
188                           out.write(")</font></span>");
189                       }
190%>
191                <input type="text" size="30" id="targetDestination" name="targetDestination" title="<%=intl._t("Specify the .i2p address or destination (b32 or b64) of the tunnel here.")%>&nbsp;<%=intl._t("For a random selection from a pool, separate with commas e.g. server1.i2p,server2.i2p")%>" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext destination" placeholder="required" />
192                (<%=intl._t("name, name:port, or destination")%>
193<%
194                        if ("streamrclient".equals(tunnelType)) {
195                            /* deferred resolution unimplemented in streamr client */
196%>
197                         - <%=intl._t("b32 not recommended")%>
198<%
199                        }
200%> )
201            </td>
202        </tr>
203<%
204            }
205
206            if (!"streamrclient".equals(tunnelType)) {
207%>
208        <tr>
209            <th colspan="2">
210                <%=intl._t("Shared Client")%>
211            </th>
212        </tr><tr>
213            <td colspan="2">
214                <label title="<%=intl._t("Traffic from all clients with this feature enabled will be routed over the same set of tunnels. This will make profiling the tunnels by an adversary more difficult, but will link the clients together.")%>"><input value="true" type="checkbox" name="shared"<%=(editBean.isSharedClient(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
215                <%=intl._t("Share tunnels with other clients and irc/httpclients? (Change requires restart of client proxy tunnel)")%></label>
216            </td>
217        </tr>
218<%
219            } // !streamrclient
220
221            if ("ircclient".equals(tunnelType)) {
222%>
223        <tr>
224            <th colspan="2">
225                    <%=intl._t("Enable DCC")%>
226            </th>
227        </tr><tr>
228            <td colspan="2">
229                <label title="<%=intl._t("Enables direct chat and file transfers, bypassing I2P")%>"><input value="1" type="checkbox" name="DCC"<%=(editBean.getDCC(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
230                <%=intl._t("Enable Direct Client-to-Client protocol. Note that this will compromise your anonymity and is <i>not</i> recommended.")%></label>
231            </td>
232        </tr>
233<%
234            } // ircclient
235%>
236    </table>
237    <h3><%=intl._t("Advanced networking options")%></h3>
238    <table class="tunnelConfig">
239<%
240            if (!"streamrclient".equals(tunnelType)) {
241               // no shared client tunnels for streamr
242%>
243        <tr>
244            <td class="infohelp" colspan="2">
245                <%=intl._t("Note: When this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!")%>
246            </td>
247        </tr>
248<%
249            } // !streamrclient
250%>
251        <tr>
252            <th colspan="2">
253                <%=intl._t("Tunnel Options")%>
254            </th>
255        </tr><tr>
256            <td>
257                <b><%=intl._t("Length")%></b>
258            </td><td>
259                <b><%=intl._t("Variance")%></b>
260            </td>
261        </tr><tr>
262            <td>
263                <select id="tunnelDepth" name="tunnelDepth" title="<%=intl._t("Length of each Tunnel")%>" class="selectbox">
264<%
265                       int tunnelDepth = editBean.getTunnelDepth(curTunnel, 3);
266                  %><option value="0"<%=(tunnelDepth == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop tunnel (no anonymity)")%></option>
267                    <option value="1"<%=(tunnelDepth == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("1 hop tunnel (low anonymity)")%></option>
268                    <option value="2"<%=(tunnelDepth == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("2 hop tunnel (medium anonymity)")%></option>
269                    <option value="3"<%=(tunnelDepth == 3 ? " selected=\"selected\"" : "") %>><%=intl._t("3 hop tunnel (high anonymity)")%></option>
270<%                 if (editBean.isAdvanced()) {
271                  %><option value="4"<%=(tunnelDepth == 4 ? " selected=\"selected\"" : "") %>>4 hop tunnel</option>
272                    <option value="5"<%=(tunnelDepth == 5 ? " selected=\"selected\"" : "") %>>5 hop tunnel</option>
273                    <option value="6"<%=(tunnelDepth == 6 ? " selected=\"selected\"" : "") %>>6 hop tunnel</option>
274                    <option value="7"<%=(tunnelDepth == 7 ? " selected=\"selected\"" : "") %>>7 hop tunnel</option>
275<%
276                   } else if (tunnelDepth > 3) {
277                %>    <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> <%=intl._t("hop tunnel (very poor performance)")%></option>
278<%
279                   }
280              %></select>
281            </td><td>
282                <select id="tunnelVariance" name="tunnelVariance" title="<%=intl._t("Level of Randomization for Tunnel Length")%>" class="selectbox">
283                    <% int tunnelVariance = editBean.getTunnelVariance(curTunnel, 0);
284                  %><option value="0"<%=(tunnelVariance  ==  0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop variance (no randomization, consistent performance)")%></option>
285                    <option value="1"<%=(tunnelVariance  ==  1 ? " selected=\"selected\"" : "") %>><%=intl._t("+ 0-1 hop variance (medium additive randomization, subtractive performance)")%></option>
286                    <option value="2"<%=(tunnelVariance  ==  2 ? " selected=\"selected\"" : "") %>><%=intl._t("+ 0-2 hop variance (high additive randomization, subtractive performance)")%></option>
287                    <option value="-1"<%=(tunnelVariance == -1 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-1 hop variance (standard randomization, standard performance)")%></option>
288                    <option value="-2"<%=(tunnelVariance == -2 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-2 hop variance (not recommended)")%></option>
289                <% if (tunnelVariance > 2 || tunnelVariance < -2) {
290                %>    <option value="<%=tunnelVariance%>" selected="selected"><%= (tunnelVariance > 2 ? "+ " : "+/- ") %>0-<%=tunnelVariance%> <%=intl._t("hop variance")%></option>
291                <% }
292              %></select>
293            </td>
294        </tr><tr>
295            <td>
296                <b><%=intl._t("Count")%></b>
297            </td><td>
298                <b><%=intl._t("Backup Count")%></b>
299            </td>
300        </tr><tr>
301            <td>
302                <select id="tunnelQuantity" name="tunnelQuantity" title="<%=intl._t("Number of Tunnels in Group")%>" class="selectbox">
303                    <%=editBean.getQuantityOptions(curTunnel, 0)%>
304                </select>
305            </td><td>
306                <select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="<%=intl._t("Number of Reserve Tunnels")%>" class="selectbox">
307<%
308                       int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0);
309                  %><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 backup tunnels (0 redundancy, no added resource usage)")%></option>
310                    <option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("1 backup tunnel each direction (low redundancy, low resource usage)")%></option>
311                    <option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("2 backup tunnels each direction (medium redundancy, medium resource usage)")%></option>
312                    <option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>><%=intl._t("3 backup tunnels each direction (high redundancy, high resource usage)")%></option>
313<%
314                   if (tunnelBackupQuantity > 3) {
315                %>    <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> <%=intl._t("backup tunnels")%></option>
316<%
317                   }
318              %></select>
319            </td>
320        </tr>
321<%
322            if ("client".equals(tunnelType)) {
323%>
324        <tr>
325            <th>
326                <%=intl._t("Profile")%>
327            </th><th>
328                <%=intl._t("Delay Connect")%>
329            </th>
330        </tr><tr>
331            <td>
332                <select id="connectionProfile" name="profile" title="<%=intl._t("Connection Profile")%>" class="selectbox">
333                    <% boolean interactiveProfile = editBean.isInteractive(curTunnel);
334                  %><option <%=(interactiveProfile == true  ? "selected=\"selected\" " : "")%>value="interactive"><%=intl._t("interactive connection")%> </option>
335                    <option <%=(interactiveProfile == false ? "selected=\"selected\" " : "")%>value="bulk"><%=intl._t("bulk connection (downloads/websites/BT)")%> </option>
336                </select>
337            </td><td>
338                <label title="<%=intl._t("Delay Connection")%>"><input value="1000" type="checkbox" name="connectDelay"<%=(editBean.shouldDelay(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
339                (<%=intl._t("for request/response connections")%>)</label> <% // TODO: Convey to users: Where is the (1s) delay introduced? What is the difference between delay connect and delay open? %>
340            </td>
341        </tr>
342<%
343            } // client
344
345            if (!editBean.isRouterContext()) {
346%>
347        <tr>
348            <th colspan="2">
349                <%=intl._t("Router I2CP Address")%>
350            </th>
351        </tr><tr>
352            <td>
353                <b><%=intl._t("Host")%>:</b>
354                <input type="text" name="clientHost" size="20" title="<%=intl._t("I2CP Hostname or IP")%>" value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext host" />
355            </td><td>
356                <b><%=intl._t("Port")%>:</b>
357                <input type="text" name="clientport" size="20" title="<%=intl._t("I2CP Port Number")%>" value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext port" />
358            </td>
359        </tr>
360<%
361            } // !isRouterContext
362
363            if (!"streamrclient".equals(tunnelType)) {
364                // streamr client sends pings so it will never be idle
365%>
366        <tr>
367            <th colspan="2">
368                <%=intl._t("Delay tunnel open until required")%>
369            </th>
370        </tr><tr>
371            <td colspan="2">
372                <label title="<%=intl._t("Conserve resources by only creating tunnels when required")%>"><input value="1" type="checkbox" name="delayOpen"<%=(editBean.getDelayOpen(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
373                <%=intl._t("Delay opening client tunnel until activity is detected on the configured tunnel port")%></label>
374            </td>
375        </tr>
376<%
377            } // !streamrclient
378%>
379        <tr>
380            <th colspan="2">
381                <%=intl._t("Reduce tunnel quantity when idle")%>
382            </th>
383        </tr><tr>
384            <td colspan="2">
385                <label title="<%=intl._t("Reduce tunnel count when idle but keep tunnel open (to ensure immediate availability)")%>"><input value="1" type="checkbox" name="reduce"<%=(editBean.getReduce(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
386                <%=intl._t("Reduce tunnel quantity when idle to conserve resources")%></label>
387            </td>
388        </tr><tr>
389            <td>
390                <b><%=intl._t("Reduced tunnel count")%>:</b>
391                <input type="text" id="reducedTunnelCount" name="reduceCount" size="1" maxlength="1" title="<%=intl._t("Reduced tunnel count")%>" value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext quantity" />
392            </td><td>
393                <b><%=intl._t("Idle period")%>:</b>
394                <input type="text" name="reduceTime" size="4" maxlength="4" title="<%=intl._t("Reduced Tunnel Idle Time")%>" value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext period" />
395                minutes
396            </td>
397        </tr><tr>
398            <th colspan="2">
399                <%=intl._t("Close tunnels when idle")%>
400            </th>
401        </tr><tr>
402            <td>
403                <label title="<%=intl._t("To conserve resources, close tunnels when not in use")%>"><input value="1" type="checkbox" name="close"<%=(editBean.getClose(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
404                <%=intl._t("Close client tunnels after specified idle period")%></label>
405            </td><td>
406                <b><%=intl._t("Idle period")%>:</b>
407                <input type="text" name="closeTime" size="4" maxlength="4" title="<%=intl._t("Close Tunnel Idle Time")%>" value="<%=editBean.getCloseTime(curTunnel)%>" class="freetext period" />
408                minutes
409            </td>
410        </tr><tr>
411            <td colspan="2">
412                <b><%=intl._t("New Keys on Reopen")%>:</b>
413                <span class="multiOption">
414                    <label title="<%=intl._t("Change tunnel identity (destination) when tunnels reopen")%>"><input value="1" type="radio" name="newDest"
415                        <%=(editBean.getNewDest(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
416                    <%=intl._t("Enable")%></label>
417                </span>
418                <span class="multiOption">
419                    <label title="<%=intl._t("Retain tunnel identity (destination) when tunnels reopen")%>"><input value="0" type="radio" name="newDest"
420                        <%=(editBean.getNewDest(curTunnel) || editBean.getPersistentClientKey(curTunnel) ? "" : " checked=\"checked\"")%> class="tickbox" />
421                    <%=intl._t("Disable")%></label>
422                </span>
423            </td>
424        </tr>
425<%
426            if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "socksirctunnel".equals(tunnelType) || "sockstunnel".equals(tunnelType)) {
427%>
428        <tr>
429            <th colspan="2">
430                <%=intl._t("Persistent private key")%>
431            </th>
432        </tr><tr>
433            <td>
434                <label title="<%=intl._t("Enabling this feature will ensure your tunnel identity (destination) remains static, for services offering features based on destination e.g. IRC user authentication")%>"><input value="2" type="radio" name="newDest"
435                     <%=(editBean.getPersistentClientKey(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
436                <%=intl._t("Generate key to enable persistent client tunnel identity")%></label>
437            </td><td>
438                <b><%=intl._t("File")%>:</b>
439                <input type="text" size="30" id="privKeyFile" name="privKeyFile" title="<%=intl._t("Path to Private Key File")%>" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" />
440            </td>
441        </tr>
442<%
443            String destb64 = editBean.getDestinationBase64(curTunnel);
444            if (destb64.length() > 0) {
445%>
446        <tr>
447            <td colspan="2">
448                <b><%=intl._t("Local destination")%></b>
449            </td>
450        </tr><tr>
451            <td colspan="2">
452                <div class="displayText" title="<%=intl._t("Read Only: Local Destination (if known)")%>" tabindex="0" onblur="resetScrollLeft(this)"><%=destb64%></div>
453            </td>
454        </tr><tr>
455            <td colspan="2">
456                <b><%=intl._t("Local Base 32")%>:</b>&nbsp;
457                <%=editBean.getDestHashBase32(curTunnel)%>
458            </td>
459        </tr>
460<%
461              } // if destb64
462            }
463
464            if ("httpclient".equals(tunnelType)) {
465%>
466        <tr>
467            <th colspan="2">
468                <%=intl._t("HTTP Filtering")%>
469            </th>
470        </tr><tr>
471            <td>
472                <label title="<%=intl._t("When enabled, the user agent of your web browser or http client will not be spoofed, potentially reducing your anonymity")%>"><input value="1" type="checkbox" name="allowUserAgent"<%=(editBean.getAllowUserAgent(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
473                <%=intl._t("Do not spoof User-Agent header")%></label>
474            </td><td>
475                <label title="<%=intl._t("When enabled, the referer (originating page) of your web requests will not be filtered, potentially reducing your anonymity")%>"><input value="1" type="checkbox" name="allowReferer"<%=(editBean.getAllowReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
476                <%=intl._t("Do not block Referer header")%></label>
477            </td>
478        </tr><tr>
479            <td>
480                <label title="<%=intl._t("When enabled, the accept headers (mime types support) broadcast by your web browser will not be filtered, potentially reducing your anonymity")%>"><input value="1" type="checkbox" name="allowAccept"<%=(editBean.getAllowAccept(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
481<%=intl._t("Do not block Accept headers")%></label>
482            </td><td>
483                <label title="<%=intl._t("Allow SSL to I2P addresses when enabled")%>"><input value="1" type="checkbox" name="allowInternalSSL"<%=(editBean.getAllowInternalSSL(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
484                <%=intl._t("Allow SSL to I2P addresses")%></label>
485            </td>
486        </tr>
487<%
488            } // if httpclient
489
490            if (true /* editBean.isAdvanced() */ ) {
491                int currentSigType = editBean.getSigType(curTunnel, tunnelType);
492                String disabled = editBean.canChangeSigType(curTunnel) ? "" : " disabled=\"disabled\" ";
493%>
494        <tr>
495            <th colspan="2">
496                <%=intl._t("Signature type")%> <%-- (<%=intl._t("Experts only!")%>) --%>
497            </th>
498        </tr><tr>
499            <td colspan="2">
500                <select id="sigType" name="sigType" class="selectbox">
501                    <option title="<%=intl._t("Legacy option (deprecated), provided for backward compatibility")%>" value="0" <%=(currentSigType==0 ? " selected=\"selected\"" : disabled)%> >
502                    DSA-SHA1</option>
503<%
504              if (editBean.isSigTypeAvailable(1)) {
505%>
506                    <option value="1" <%=(currentSigType==1 ? " selected=\"selected\"" : disabled)%> >
507                    ECDSA-P256</option>
508<%
509              }
510              if (editBean.isSigTypeAvailable(2)) {
511%>
512                    <option value="2" <%=(currentSigType==2 ? " selected=\"selected\"" : disabled)%> >
513                    ECDSA-P384</option>
514<%
515              }
516              if (editBean.isSigTypeAvailable(3)) {
517%>
518                    <option value="3" <%=(currentSigType==3 ? " selected=\"selected\"" : disabled)%> >
519                    ECDSA-P521</option>
520<%
521              }
522              if (editBean.isSigTypeAvailable(7)) {
523%>
524                    <option title="<%=intl._t("This is the default, recommended option")%>" value="7" <%=(currentSigType==7 ? " selected=\"selected\"" : disabled)%> >
525                    Ed25519-SHA-512</option>
526<%
527              }   // isAvailable
528%>
529                </select>
530            </td>
531        </tr>
532<%
533            } // isAdvanced
534
535            if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) {
536%>
537        <tr>
538            <th colspan="2">
539                <%=intl._t("Local Authorization")%>
540            </th>
541        </tr><tr>
542            <td colspan="2">
543                <label title="<%=intl._t("Enable to require a username and password to access this local service (for example if hosting on a LAN)")%>"><input value="1" type="checkbox" name="proxyAuth"<%=(editBean.getProxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
544                <%=intl._t("Require local authorization for this service")%></label>
545            </td>
546        </tr><tr>
547            <td>
548                <b><%=intl._t("Username")%>:</b>
549                <input type="text" name="proxyUsername" title="<%=intl._t("Set username required to access this service")%>" value="" class="freetext username" />
550            </td>
551            <td>
552                <b><%=intl._t("Password")%>:</b>
553                <input type="password" name="nofilter_proxyPassword" title="<%=intl._t("Set password required to access this service")%>" value="" class="freetext password" />
554            </td>
555        </tr><tr>
556            <th colspan="2">
557                <%=intl._t("Outproxy Authorization")%>
558            </th>
559        </tr><tr>
560            <td colspan="2">
561                <label title="<%=intl._t("Enable if the outproxy a username and password to access")%>"><input value="1" type="checkbox" id="startOnLoad" name="outproxyAuth"<%=(editBean.getOutproxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
562                <%=intl._t("Outproxy requires authorization")%></label>
563            </td>
564        </tr><tr>
565            <td>
566                <b><%=intl._t("Username")%>:</b>
567                <input type="text" name="outproxyUsername" title="<%=intl._t("Enter username required by outproxy")%>" value="<%=editBean.getOutproxyUsername(curTunnel)%>" class="freetext username" />
568            </td>
569
570            <td>
571                <b><%=intl._t("Password")%>:</b>
572                <input type="password" name="nofilter_outproxyPassword" title="<%=intl._t("Enter password required by outproxy")%>" value="<%=editBean.getOutproxyPassword(curTunnel)%>" class="freetext password" />
573            </td>
574        </tr>
575<%
576            } // httpclient || connect || socks || socksirc
577
578            if ("httpclient".equals(tunnelType)) {
579%>
580        <tr>
581            <th colspan="2">
582                <%=intl._t("Jump URL List")%>
583            </th>
584        </tr><tr>
585            <td colspan="2">
586                <textarea rows="2" style="height: 8em;" cols="60" id="hostField" name="jumpList" title="<%=intl._t("List of helper URLs providing jump links when a host is not found in your addressbook")%>" wrap="off" spellcheck="false"><%=editBean.getJumpList(curTunnel)%></textarea>
587            </td>
588        </tr>
589<%
590            } // httpclient
591%>
592        <tr>
593            <th colspan="2">
594                <%=intl._t("Custom options")%>
595            </th>
596        </tr><tr>
597            <td colspan="2">
598                <input type="text" id="customOptions" name="nofilter_customOptions" size="60" title="<%=intl._t("Advanced tunnel, streaming, and I2CP options")%>" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" spellcheck="false"/>
599            </td>
600        </tr><tr>
601            <td class="buttons" colspan="2">
602                    <input type="hidden" value="true" name="removeConfirm" />
603                    <button id="controlCancel" class="control" type="submit" name="action" value=""><%=intl._t("Cancel")%></button>
604                    <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>
605                    <button id="controlSave" class="control" type="submit" name="action" value="Save changes"><%=intl._t("Save")%></button>
606            </td>
607        </tr>
608</table>
Note: See TracBrowser for help on using the repository browser.