source: apps/i2ptunnel/jsp/editClient.jsi @ 277a161

Last change on this file since 277a161 was 277a161, checked in by zzz <zzz@…>, 2 years ago

Console: Tagged string fixes (ticket #2017)
CSS tweaks

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