Changeset dd5f8b45
- Timestamp:
- Apr 11, 2019 2:00:42 PM (2 years ago)
- Branches:
- master
- Children:
- 73790e23
- Parents:
- 2960156
- Location:
- apps/i2ptunnel/jsp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/i2ptunnel/jsp/editClient.jsi
r2960156 rdd5f8b45 1 1 <% 2 2 String tunnelTypeName; 3 3 String tunnelType; … … 14 14 <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" /> 15 15 <input type="hidden" name="type" value="<%=tunnelType%>" /> 16 16 <% 17 17 // these are four keys that are generated automatically on first save, 18 18 // and we want to persist in i2ptunnel.config, but don't want to … … 21 21 if (key != null && key.length() > 0) { %> 22 22 <input type="hidden" name="key1" value="<%=key%>" /> 23 <%}23 <% } 24 24 key = editBean.getKey2(curTunnel); 25 25 if (key != null && key.length() > 0) { %> 26 26 <input type="hidden" name="key2" value="<%=key%>" /> 27 <%}27 <% } 28 28 key = editBean.getKey3(curTunnel); 29 29 if (key != null && key.length() > 0) { %> 30 30 <input type="hidden" name="key3" value="<%=key%>" /> 31 <%}31 <% } 32 32 key = editBean.getKey4(curTunnel); 33 33 if (key != null && key.length() > 0) { %> 34 34 <input type="hidden" name="key4" value="<%=key%>" /> 35 <% } %> 35 <% } 36 %> 36 37 <input type="submit" class="default" name="action" value="Save changes" /> 37 38 38 <table id="clientTunnelEdit" class="tunnelConfig"> 39 39 <tr> 40 40 <th> 41 41 <%=intl._t("Name")%> 42 </th> 43 <th> 42 </th><th> 44 43 <%=intl._t("Type")%> 45 44 </th> 46 </tr> 47 <tr> 45 </tr><tr> 48 46 <td> 49 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" /> 50 </td> 51 <td> 48 </td><td> 52 49 <%=tunnelTypeName%> 53 50 </td> 54 </tr> 55 56 <tr> 51 </tr><tr> 57 52 <th> 58 53 <%=intl._t("Description")%> 59 </th> 60 61 <th> 54 </th><th> 62 55 <%=intl._t("Auto Start Tunnel")%> 63 56 </th> 64 </tr> 65 66 <tr> 57 </tr><tr> 67 58 <td> 68 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" /> 69 </td> 70 71 <td> 60 </td><td> 72 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" /> 73 62 <%=intl._t("Automatically start tunnel when router starts")%></label> 74 63 </td> 75 </tr> 76 77 <tr> 78 <th colspan="2"> 79 <% if ("streamrclient".equals(tunnelType)) { %> 64 </tr><tr> 65 <th colspan="2"> 66 <% if ("streamrclient".equals(tunnelType)) { %> 80 67 <%=intl._t("Target")%> 81 <%} else { %>68 <% } else { %> 82 69 <%=intl._t("Access Point")%> 83 <% } /* streamrclient */ %> 84 </th> 85 </tr> 86 <tr> 70 <% } /* streamrclient */ %> 71 </th> 72 </tr><tr> 87 73 <td> 88 74 <b><%=intl._t("Port")%>:</b> 89 <% String value = editBean.getClientPort(curTunnel); 75 <% 76 String value = editBean.getClientPort(curTunnel); 90 77 if (value == null || "".equals(value.trim())) { 91 78 out.write(" <span class=\"required\"><font color=\"red\">("); … … 93 80 out.write(")</font></span>"); 94 81 } 95 82 %> 96 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" /> 97 84 </td> 98 99 <%100 if ("streamrclient".equals(tunnelType)) {%>85 <% 86 if ("streamrclient".equals(tunnelType)) { 87 %> 101 88 <td> 102 89 <b><%=intl._t("Host")%>:</b> 103 90 <% 104 91 String targetHost = editBean.getTargetHost(curTunnel); 105 92 if (targetHost == null || "".equals(targetHost.trim())) { … … 108 95 out.write(")</font></span>"); 109 96 } 110 %> 111 97 %> 112 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" /> 113 99 </td> 114 <% } else { %> 115 100 <% 101 } else { 102 %> 116 103 <td> 117 104 <b><%=intl._t("Reachable by")%>:</b> 118 119 105 <select id="reachableBy" name="reachableBy" title="<%=intl._t("Local interface (ip address) the client tunnel will be reachable from")%>" class="selectbox"> 120 106 <% 121 107 String clientInterface = editBean.getClientInterface(curTunnel); 122 108 for (String ifc : editBean.interfaceSet()) { … … 130 116 out.write("</option>\n"); 131 117 } 132 118 %> 133 119 </select> 134 120 </td> 135 121 <% } /* streamrclient */ %> 136 122 </tr> 137 138 <%if ("client".equals(tunnelType) || "ircclient".equals(tunnelType)) {139 123 <% 124 if ("client".equals(tunnelType) || "ircclient".equals(tunnelType)) { 125 %> 140 126 <tr> 141 127 <th colspan="2"> 142 128 <%=intl._t("Use SSL?")%> 143 129 </th> 144 </tr> 145 <tr> 130 </tr><tr> 146 131 <td colspan="2"> 147 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" /> … … 149 134 </td> 150 135 </tr> 151 <% } /* tunnel types */ %> 152 153 <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { 154 %> 136 <% 137 } /* tunnel types */ 138 139 if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { 140 %> 155 141 <tr> 156 142 <th colspan="2"> 157 143 <%=intl._t("Outproxies")%> 158 144 </th> 159 </tr> 160 <tr> 145 </tr><tr> 161 146 <td colspan="2"> 162 147 <input type="text" size="30" name="proxyList" title="<%=intl._t("Specify the .i2p address or destination (b32 or b64) of the outproxy here.")%> <%=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 148 </td> 164 149 </tr> 165 166 <%if ("httpclient".equals(tunnelType)) {167 150 <% 151 if ("httpclient".equals(tunnelType)) { 152 %> 168 153 <tr> 169 154 <th colspan="2"> 170 155 <%=intl._t("SSL Outproxies")%> 171 156 </th> 172 </tr> 173 <tr> 157 </tr><tr> 174 158 <td colspan="2"> 175 159 <input type="text" size="30" name="sslProxies" title="<%=intl._t("Specify the .i2p address or destination (b32 or b64) of the outproxy here.")%> <%=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 160 </td> 177 161 </tr> 178 179 <% } // httpclient %> 162 <% 163 } // httpclient 164 %> 180 165 <tr> 181 166 <th colspan="2"> 182 167 <%=intl._t("Use Outproxy Plugin")%> 183 184 </th> 185 </tr> 186 <tr> 187 <td colspan="2"> 188 168 </th> 169 </tr><tr> 170 <td colspan="2"> 189 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" /> 190 172 <%=intl._t("Use plugin instead of above-listed proxies if available")%></label> 191 173 </td> 192 174 </tr> 193 <% } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { 194 %> 175 <% 176 } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { 177 %> 195 178 <tr> 196 179 <th colspan="2"> 197 180 <%=intl._t("Tunnel Destination")%> 198 181 </th> 199 </tr> 200 <tr> 182 </tr><tr> 201 183 <td colspan="2"> 202 184 <% String value2 = editBean.getClientDestination(curTunnel); … … 206 188 out.write(")</font></span>"); 207 189 } 208 %> 209 190 %> 210 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.")%> <%=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 192 (<%=intl._t("name, name:port, or destination")%> 212 <% if ("streamrclient".equals(tunnelType)) { /* deferred resolution unimplemented in streamr client */ %> 193 <% 194 if ("streamrclient".equals(tunnelType)) { 195 /* deferred resolution unimplemented in streamr client */ 196 %> 213 197 - <%=intl._t("b32 not recommended")%> 214 <% } %> ) 215 </td> 216 </tr> 217 218 <% } %> 219 220 <% if (!"streamrclient".equals(tunnelType)) { %> 198 <% 199 } 200 %> ) 201 </td> 202 </tr> 203 <% 204 } 205 206 if (!"streamrclient".equals(tunnelType)) { 207 %> 221 208 <tr> 222 209 <th colspan="2"> 223 210 <%=intl._t("Shared Client")%> 224 211 </th> 225 </tr> 226 <tr> 212 </tr><tr> 227 213 <td colspan="2"> 228 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" /> … … 230 216 </td> 231 217 </tr> 232 233 <% } // !streamrclient %> 234 235 <% if ("ircclient".equals(tunnelType)) { %> 218 <% 219 } // !streamrclient 220 221 if ("ircclient".equals(tunnelType)) { 222 %> 236 223 <tr> 237 224 <th colspan="2"> 238 225 <%=intl._t("Enable DCC")%> 239 226 </th> 240 </tr> 241 <tr> 227 </tr><tr> 242 228 <td colspan="2"> 243 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" /> … … 245 231 </td> 246 232 </tr> 247 248 <% } // ircclient %> 233 <% 234 } // ircclient 235 %> 249 236 </table> 250 251 237 <h3><%=intl._t("Advanced networking options")%></h3> 252 253 238 <table class="tunnelConfig"> 254 255 256 <% if (!"streamrclient".equals(tunnelType)) { %> <% // no shared client tunnels for streamr %> 239 <% 240 if (!"streamrclient".equals(tunnelType)) { 241 // no shared client tunnels for streamr 242 %> 257 243 <tr> 258 244 <td class="infohelp" colspan="2"> … … 260 246 </td> 261 247 </tr> 262 <% } // !streamrclient %> 248 <% 249 } // !streamrclient 250 %> 263 251 <tr> 264 252 <th colspan="2"> 265 253 <%=intl._t("Tunnel Options")%> 266 254 </th> 267 </tr> 268 <tr> 255 </tr><tr> 269 256 <td> 270 257 <b><%=intl._t("Length")%></b> 271 </td> 272 273 <td> 258 </td><td> 274 259 <b><%=intl._t("Variance")%></b> 275 260 </td> 276 </tr> 277 278 <tr> 261 </tr><tr> 279 262 <td> 280 263 <select id="tunnelDepth" name="tunnelDepth" title="<%=intl._t("Length of each Tunnel")%>" class="selectbox"> 281 <% int tunnelDepth = editBean.getTunnelDepth(curTunnel, 3); 264 <% 265 int tunnelDepth = editBean.getTunnelDepth(curTunnel, 3); 282 266 %><option value="0"<%=(tunnelDepth == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop tunnel (no anonymity)")%></option> 283 267 <option value="1"<%=(tunnelDepth == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("1 hop tunnel (low anonymity)")%></option> 284 268 <option value="2"<%=(tunnelDepth == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("2 hop tunnel (medium anonymity)")%></option> 285 269 <option value="3"<%=(tunnelDepth == 3 ? " selected=\"selected\"" : "") %>><%=intl._t("3 hop tunnel (high anonymity)")%></option> 286 <%if (editBean.isAdvanced()) {270 <% if (editBean.isAdvanced()) { 287 271 %><option value="4"<%=(tunnelDepth == 4 ? " selected=\"selected\"" : "") %>>4 hop tunnel</option> 288 272 <option value="5"<%=(tunnelDepth == 5 ? " selected=\"selected\"" : "") %>>5 hop tunnel</option> 289 273 <option value="6"<%=(tunnelDepth == 6 ? " selected=\"selected\"" : "") %>>6 hop tunnel</option> 290 274 <option value="7"<%=(tunnelDepth == 7 ? " selected=\"selected\"" : "") %>>7 hop tunnel</option> 291 <% } else if (tunnelDepth > 3) { 275 <% 276 } else if (tunnelDepth > 3) { 292 277 %> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> <%=intl._t("hop tunnel (very poor performance)")%></option> 293 <% } 278 <% 279 } 294 280 %></select> 295 </td> 296 297 <td> 281 </td><td> 298 282 <select id="tunnelVariance" name="tunnelVariance" title="<%=intl._t("Level of Randomization for Tunnel Length")%>" class="selectbox"> 299 283 <% int tunnelVariance = editBean.getTunnelVariance(curTunnel, 0); … … 308 292 %></select> 309 293 </td> 310 </tr> 311 <tr> 294 </tr><tr> 312 295 <td> 313 296 <b><%=intl._t("Count")%></b> 314 </td> 315 316 <td> 297 </td><td> 317 298 <b><%=intl._t("Backup Count")%></b> 318 299 </td> 319 </tr> 320 321 <tr> 300 </tr><tr> 322 301 <td> 323 302 <select id="tunnelQuantity" name="tunnelQuantity" title="<%=intl._t("Number of Tunnels in Group")%>" class="selectbox"> 324 303 <%=editBean.getQuantityOptions(curTunnel, 0)%> 325 304 </select> 326 </td> 327 328 <td> 305 </td><td> 329 306 <select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="<%=intl._t("Number of Reserve Tunnels")%>" class="selectbox"> 330 <% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0); 307 <% 308 int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0); 331 309 %><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 backup tunnels (0 redundancy, no added resource usage)")%></option> 332 310 <option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("1 backup tunnel each direction (low redundancy, low resource usage)")%></option> 333 311 <option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("2 backup tunnels each direction (medium redundancy, medium resource usage)")%></option> 334 312 <option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>><%=intl._t("3 backup tunnels each direction (high redundancy, high resource usage)")%></option> 335 <% if (tunnelBackupQuantity > 3) { 313 <% 314 if (tunnelBackupQuantity > 3) { 336 315 %> <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> <%=intl._t("backup tunnels")%></option> 337 <% } 316 <% 317 } 338 318 %></select> 339 319 </td> 340 320 </tr> 341 342 343 <% if (!"streamrclient".equals(tunnelType)) {%>321 <% 322 if (!"streamrclient".equals(tunnelType)) { 323 %> 344 324 <tr> 345 325 <th> 346 326 <%=intl._t("Profile")%> 347 </th> 348 349 <th> 327 </th><th> 350 328 <%=intl._t("Delay Connect")%> 351 329 </th> 352 353 </tr> 354 355 <tr> 330 </tr><tr> 356 331 <td> 357 332 <select id="connectionProfile" name="profile" title="<%=intl._t("Connection Profile")%>" class="selectbox"> … … 360 335 <option <%=(interactiveProfile == false ? "selected=\"selected\" " : "")%>value="bulk"><%=intl._t("bulk connection (downloads/websites/BT)")%> </option> 361 336 </select> 362 </td> 363 364 <td> 337 </td><td> 365 338 <label title="<%=intl._t("Delay Connection")%>"><input value="1000" type="checkbox" name="connectDelay"<%=(editBean.shouldDelay(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> 366 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? %> 367 340 </td> 368 341 </tr> 369 <% } // !streamrclient %> 370 342 <% 343 } // !streamrclient 344 %> 371 345 <tr> 372 346 <th colspan="2"> 373 347 <%=intl._t("Router I2CP Address")%> 374 348 </th> 375 </tr> 376 377 <tr> 349 </tr><tr> 378 350 <td> 379 351 <b><%=intl._t("Host")%>:</b> 380 352 <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> 353 </td><td> 385 354 <b><%=intl._t("Port")%>:</b> 386 355 <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 356 </td> 388 357 </tr> 389 390 <% if (!"streamrclient".equals(tunnelType)) { // streamr client sends pings so it will never be idle %> 391 358 <% 359 if (!"streamrclient".equals(tunnelType)) { 360 // streamr client sends pings so it will never be idle 361 %> 392 362 <tr> 393 363 <th colspan="2"> 394 364 <%=intl._t("Delay tunnel open until required")%> 395 365 </th> 396 </tr> 397 398 <tr> 366 </tr><tr> 399 367 <td colspan="2"> 400 368 <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" /> … … 402 370 </td> 403 371 </tr> 404 405 <% } // !streamrclient %>406 372 <% 373 } // !streamrclient 374 %> 407 375 <tr> 408 376 <th colspan="2"> 409 377 <%=intl._t("Reduce tunnel quantity when idle")%> 410 378 </th> 411 </tr> 412 413 <tr> 379 </tr><tr> 414 380 <td colspan="2"> 415 381 <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 382 <%=intl._t("Reduce tunnel quantity when idle to conserve resources")%></label> 417 383 </td> 418 </tr> 419 420 <tr> 384 </tr><tr> 421 385 <td> 422 386 <b><%=intl._t("Reduced tunnel count")%>:</b> 423 387 <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> 388 </td><td> 427 389 <b><%=intl._t("Idle period")%>:</b> 428 390 <input type="text" name="reduceTime" size="4" maxlength="4" title="<%=intl._t("Reduced Tunnel Idle Time")%>" value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext period" /> 429 391 minutes 430 392 </td> 431 </tr> 432 433 <tr> 393 </tr><tr> 434 394 <th colspan="2"> 435 395 <%=intl._t("Close tunnels when idle")%> 436 396 </th> 437 </tr> 438 439 <tr> 397 </tr><tr> 440 398 <td> 441 399 <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 400 <%=intl._t("Close client tunnels after specified idle period")%></label> 443 </td> 444 445 <td> 401 </td><td> 446 402 <b><%=intl._t("Idle period")%>:</b> 447 403 <input type="text" name="closeTime" size="4" maxlength="4" title="<%=intl._t("Close Tunnel Idle Time")%>" value="<%=editBean.getCloseTime(curTunnel)%>" class="freetext period" /> 448 404 minutes 449 405 </td> 450 </tr> 451 452 <tr> 406 </tr><tr> 453 407 <td colspan="2"> 454 408 <b><%=intl._t("New Keys on Reopen")%>:</b> … … 465 419 </td> 466 420 </tr> 467 468 <% if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "socksirctunnel".equals(tunnelType) || "sockstunnel".equals(tunnelType)) { %>469 421 <% 422 if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "socksirctunnel".equals(tunnelType) || "sockstunnel".equals(tunnelType)) { 423 %> 470 424 <tr> 471 425 <th colspan="2"> 472 426 <%=intl._t("Persistent private key")%> 473 427 </th> 474 </tr> 475 <tr> 428 </tr><tr> 476 429 <td> 477 430 <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 431 <%=(editBean.getPersistentClientKey(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> 479 432 <%=intl._t("Generate key to enable persistent client tunnel identity")%></label> 480 </td> 481 <td> 433 </td><td> 482 434 <b><%=intl._t("File")%>:</b> 483 435 <input type="text" size="30" id="privKeyFile" name="privKeyFile" title="<%=intl._t("Path to Private Key File")%>" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" /> 484 436 </td> 485 437 </tr> 486 438 <% 487 439 String destb64 = editBean.getDestinationBase64(curTunnel); 488 440 if (destb64.length() > 0) { 489 %> 490 441 %> 491 442 <tr> 492 443 <td colspan="2"> 493 444 <b><%=intl._t("Local destination")%></b> 494 445 </td> 495 </tr> 496 497 <tr> 446 </tr><tr> 498 447 <td colspan="2"> 499 448 <div class="displayText" title="<%=intl._t("Read Only: Local Destination (if known)")%>" tabindex="0" onblur="resetScrollLeft(this)"><%=destb64%></div> 500 449 </td> 501 </tr> 502 503 <tr> 450 </tr><tr> 504 451 <td colspan="2"> 505 452 <b><%=intl._t("Local Base 32")%>:</b> … … 507 454 </td> 508 455 </tr> 509 510 <% } // if destb64 %>511 <% } %>512 513 <% if ("httpclient".equals(tunnelType)) { %>514 456 <% 457 } // if destb64 458 } 459 460 if ("httpclient".equals(tunnelType)) { 461 %> 515 462 <tr> 516 463 <th colspan="2"> 517 464 <%=intl._t("HTTP Filtering")%> 518 465 </th> 519 </tr> 520 521 <tr> 466 </tr><tr> 522 467 <td> 523 468 <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 469 <%=intl._t("Do not spoof User-Agent header")%></label> 525 </td> 526 <td> 470 </td><td> 527 471 <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 472 <%=intl._t("Do not block Referer header")%></label> 529 473 </td> 530 </tr> 531 532 <tr> 474 </tr><tr> 533 475 <td> 534 476 <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 477 <%=intl._t("Do not block Accept headers")%></label> 536 </td> 537 538 <td> 478 </td><td> 539 479 <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 480 <%=intl._t("Allow SSL to I2P addresses")%></label> 541 481 </td> 542 482 </tr> 543 <% } // if httpclient %> 544 545 <% if (true /* editBean.isAdvanced() */ ) { 483 <% 484 } // if httpclient 485 486 if (true /* editBean.isAdvanced() */ ) { 546 487 int currentSigType = editBean.getSigType(curTunnel, tunnelType); 547 488 String disabled = editBean.canChangeSigType(curTunnel) ? "" : " disabled=\"disabled\" "; 548 489 %> 549 490 <tr> 550 491 <th colspan="2"> 551 492 <%=intl._t("Signature type")%> <%-- (<%=intl._t("Experts only!")%>) --%> 552 493 </th> 553 </tr> 554 555 <tr> 494 </tr><tr> 556 495 <td colspan="2"> 557 496 <span class="multiOption"> … … 559 498 DSA-SHA1</label> 560 499 </span> 561 562 <% if (editBean.isSigTypeAvailable(1)) { %>563 500 <% 501 if (editBean.isSigTypeAvailable(1)) { 502 %> 564 503 <span class="multiOption"> 565 504 <label><input value="1" type="radio" name="sigType" <%=disabled%> <%=(currentSigType==1 ? " checked=\"checked\"" : "")%> class="tickbox" /> 566 505 ECDSA-P256</label> 567 506 </span> 568 569 <% } 570 571 if (editBean.isSigTypeAvailable(2)) { %> 572 507 <% 508 } 509 if (editBean.isSigTypeAvailable(2)) { 510 %> 573 511 <span class="multiOption"> 574 512 <label><input value="2" type="radio" name="sigType" <%=disabled%> <%=(currentSigType==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> 575 513 ECDSA-P384</label> 576 514 </span> 577 578 <%}579 if (editBean.isSigTypeAvailable(3)) { %>580 515 <% 516 } 517 if (editBean.isSigTypeAvailable(3)) { 518 %> 581 519 <span class="multiOption"> 582 520 <label><input value="3" type="radio" name="sigType" <%=disabled%> <%=(currentSigType==3 ? " checked=\"checked\"" : "")%> class="tickbox" /> 583 521 ECDSA-P521</label> 584 522 </span> 585 586 <%}587 if (editBean.isSigTypeAvailable(7)) { %>588 523 <% 524 } 525 if (editBean.isSigTypeAvailable(7)) { 526 %> 589 527 <span class="multiOption"> 590 528 <label title="<%=intl._t("This is the default, recommended option")%>"><input value="7" type="radio" name="sigType" <%=disabled%> <%=(currentSigType==7 ? " checked=\"checked\"" : "")%> class="tickbox" /> … … 593 531 </td> 594 532 </tr> 595 <% } // isAvailable %> 596 597 <% } // isAdvanced %> 598 599 <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %> 533 <% 534 } // isAvailable 535 536 } // isAdvanced 537 538 if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { 539 %> 600 540 <tr> 601 541 <th colspan="2"> 602 542 <%=intl._t("Local Authorization")%> 603 543 </th> 604 </tr> 605 <tr> 544 </tr><tr> 606 545 <td colspan="2"> 607 546 <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 547 <%=intl._t("Require local authorization for this service")%></label> 609 548 </td> 610 </tr> 611 612 <tr> 549 </tr><tr> 613 550 <td> 614 551 <b><%=intl._t("Username")%>:</b> … … 619 556 <input type="password" name="nofilter_proxyPassword" title="<%=intl._t("Set password required to access this service")%>" value="" class="freetext password" /> 620 557 </td> 621 </tr> 622 623 <tr> 558 </tr><tr> 624 559 <th colspan="2"> 625 560 <%=intl._t("Outproxy Authorization")%> 626 561 </th> 627 </tr> 628 <tr> 562 </tr><tr> 629 563 <td colspan="2"> 630 564 <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 565 <%=intl._t("Outproxy requires authorization")%></label> 632 566 </td> 633 </tr> 634 635 <tr> 567 </tr><tr> 636 568 <td> 637 569 <b><%=intl._t("Username")%>:</b> … … 644 576 </td> 645 577 </tr> 646 647 <% } // httpclient || connect || socks || socksirc %>648 649 <% if ("httpclient".equals(tunnelType)) { %>650 578 <% 579 } // httpclient || connect || socks || socksirc 580 581 if ("httpclient".equals(tunnelType)) { 582 %> 651 583 <tr> 652 584 <th colspan="2"> 653 585 <%=intl._t("Jump URL List")%> 654 586 </th> 655 </tr> 656 <tr> 587 </tr><tr> 657 588 <td colspan="2"> 658 589 <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 590 </td> 660 591 </tr> 661 662 <% } // httpclient %>663 592 <% 593 } // httpclient 594 %> 664 595 <tr> 665 596 <th colspan="2"> 666 597 <%=intl._t("Custom options")%> 667 598 </th> 668 </tr> 669 670 <tr> 599 </tr><tr> 671 600 <td colspan="2"> 672 601 <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 602 </td> 674 </tr> 675 676 <tr> 603 </tr><tr> 677 604 <td class="buttons" colspan="2"> 678 605 <input type="hidden" value="true" name="removeConfirm" /> … … 682 609 </td> 683 610 </tr> 684 611 </table> -
apps/i2ptunnel/jsp/editServer.jsi
r2960156 rdd5f8b45 1 1 <% 2 2 String tunnelTypeName; 3 3 String tunnelType; … … 14 14 <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" /> 15 15 <input type="hidden" name="type" value="<%=tunnelType%>" /> 16 16 <% 17 17 // these are four keys that are generated automatically on first save, 18 18 // and we want to persist in i2ptunnel.config, but don't want to … … 21 21 if (key != null && key.length() > 0) { %> 22 22 <input type="hidden" name="key1" value="<%=key%>" /> 23 <%}23 <% } 24 24 key = editBean.getKey2(curTunnel); 25 25 if (key != null && key.length() > 0) { %> 26 26 <input type="hidden" name="key2" value="<%=key%>" /> 27 <%}27 <% } 28 28 key = editBean.getKey3(curTunnel); 29 29 if (key != null && key.length() > 0) { %> 30 30 <input type="hidden" name="key3" value="<%=key%>" /> 31 <%}31 <% } 32 32 key = editBean.getKey4(curTunnel); 33 33 if (key != null && key.length() > 0) { %> 34 34 <input type="hidden" name="key4" value="<%=key%>" /> 35 <%} %>35 <% } %> 36 36 <input type="submit" class="default" name="action" value="Save changes" /> 37 38 37 <table id="serverTunnelEdit" class="tunnelConfig"> 39 38 <tr> 40 39 <th> 41 40 <%=intl._t("Name")%> 42 </th> 43 <th> 41 </th><th> 44 42 <%=intl._t("Type")%> 45 43 </th> 46 </tr> 47 48 <tr> 44 </tr><tr> 49 45 <td> 50 46 <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> 47 </td><td> 53 48 <%=tunnelTypeName%> 54 49 </td> 55 </tr> 56 57 <tr> 50 </tr><tr> 58 51 <th> 59 52 <%=intl._t("Description")%> 60 </th> 61 62 <th> 53 </th><th> 63 54 <%=intl._t("Auto Start Tunnel")%> 64 55 </th> 65 </tr> 66 67 <tr> 56 </tr><tr> 68 57 <td> 69 58 <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> 59 </td><td> 73 60 <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 61 <%=intl._t("Automatically start tunnel when router starts")%></label> 75 62 </td> 76 </tr> 77 78 <tr> 63 </tr><tr> 79 64 <th colspan="2"> 80 65 <% if ("streamrserver".equals(tunnelType)) { %> … … 84 69 <% } %> 85 70 </th> 86 </tr> 87 88 <tr> 71 </tr><tr> 89 72 <% if (!"streamrserver".equals(tunnelType)) { %> 90 73 <td> … … 92 75 <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 76 </td> 94 <% } /* !streamrserver */ %> 95 77 <% } /* !streamrserver */ %> 96 78 <td> 97 79 <b><%=intl._t("Port")%>:</b> … … 102 84 out.write(")</font></span>"); 103 85 } 104 86 %> 105 87 <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)) { %>88 <% if (!"streamrserver".equals(tunnelType)) { %> 107 89 <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 90 <%=intl._t("Use SSL to connect to target")%></label> 109 <% } /* !streamrserver */ %> 110 </td> 111 <% if ("httpbidirserver".equals(tunnelType)) { %> 112 </tr> 113 114 <tr> 91 <% } /* !streamrserver */ %> 92 </td> 93 <% if ("httpbidirserver".equals(tunnelType)) { %> 94 </tr><tr> 115 95 <th colspan="2"> 116 96 <%=intl._t("Access Point")%> 117 97 </th> 118 </tr> 119 120 <tr> 98 </tr><tr> 121 99 <td> 122 100 <b><%=intl._t("Port")%>:</b> 123 101 124 <%String value4 = editBean.getClientPort(curTunnel);102 <% String value4 = editBean.getClientPort(curTunnel); 125 103 if (value4 == null || "".equals(value4.trim())) { 126 104 out.write(" <span class=\"required\"><font color=\"red\">("); … … 128 106 out.write(")</font></span>"); 129 107 } 130 %> 131 108 %> 132 109 <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 110 </td> 134 <% } /* httpbidirserver */ %> 135 <% if ("httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %>136 111 <% } /* httpbidirserver */ 112 if ("httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { 113 %> 137 114 <td> 138 115 <b><%=intl._t("Reachable by")%>:</b> 139 116 140 117 <select id="reachableBy" name="reachableBy" title="<%=intl._t("Listening interface (IP address) for client access (normally 127.0.0.1)")%>" class="selectbox"> 141 118 <% 142 119 String clientInterface = editBean.getClientInterface(curTunnel); 143 120 for (String ifc : editBean.interfaceSet()) { … … 151 128 out.write("</option>\n"); 152 129 } 153 130 %> 154 131 </select> 155 132 </td> 156 133 <% } /* httpbidirserver || streamrserver */ %> 157 134 </tr> 158 159 160 <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { 161 %> 162 135 <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { 136 %> 163 137 <tr> 164 138 <th> … … 166 140 </th> 167 141 <th></th> 168 </tr> 169 170 <tr> 142 </tr><tr> 171 143 <td colspan="2"> 172 144 <input type="text" size="20" id="websiteName" name="spoofedHost" title="<%=intl._t("Website Hostname e.g. mysite.i2p")%>" value="<%=editBean.getSpoofedHost(curTunnel)%>" class="freetext" /> … … 176 148 <% } 177 149 %> 178 179 150 <tr> 180 151 <th> 181 152 <%=intl._t("Local destination")%> 182 </th> 183 <th> 153 </th><th> 184 154 <%=intl._t("Private key file")%> 185 155 </th> 186 </tr> 187 188 <tr> 156 </tr><tr> 189 157 <td> 190 158 <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> 159 </td><td> 193 160 <% String value3 = editBean.getPrivateKeyFile(curTunnel); 194 161 if (value3 == null || "".equals(value3.trim())) { … … 201 168 </td> 202 169 </tr> 203 204 170 <% 205 171 /****** 206 %> 207 <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { 172 if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { 208 173 String sig = editBean.getNameSignature(curTunnel); 209 174 if (sig.length() > 0) { … … 222 187 boolean hasSusiDNS = pm.getPort(net.i2p.util.PortMapper.SVC_SUSIDNS) > 0; 223 188 if (!"".equals(b64)) { 224 %> 225 <tr> 226 227 <% 189 %> 190 <tr> 191 <% 228 192 b64 = b64.replace("=", "%3d"); 229 193 String name = editBean.getSpoofedHost(curTunnel); … … 232 196 // mysite.i2p is set in the installed i2ptunnel.config 233 197 if (name != null && !name.equals("") && !name.equals("mysite.i2p") && !name.contains(" ") && name.endsWith(".i2p")) { 234 198 %> 235 199 236 200 <td class="buttons" colspan="2"> 237 201 <% 238 202 if (hasImagegen) { 239 203 %> 240 204 <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 205 <% 242 206 } 243 207 if (hasSusiDNS) { 244 208 %> 245 209 <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 210 <% 247 211 } 248 212 %> 249 213 <a class="control" title="<%=intl._t("Register, unregister or change details for hostname")%>" href="register?tunnel=<%=curTunnel%>"><%=intl._t("Registration Authentication")%></a> 250 214 <% 251 215 if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { 252 216 %> 253 217 <a class="control" title="<%=intl._t("HTTPS configuration")%>" href="ssl?tunnel=<%=curTunnel%>"><%=intl._t("SSL Wizard")%></a> 254 218 <% 255 219 } 256 257 </td> 258 220 %> 221 </td> 222 <% 259 223 } else { 260 224 %> 261 225 <td class="infohelp" colspan="2"> 262 226 <%=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 227 </td> 264 228 <% 265 229 } // name 266 %> 267 </tr> 268 269 <% 230 %> 231 </tr> 232 <% 270 233 } // b64 271 234 272 235 %> 273 236 </table> 274 237 … … 282 245 </tr> 283 246 284 <%if (editBean.isAdvanced()) {247 <% if (editBean.isAdvanced()) { 285 248 %><tr> 286 249 <th colspan="2"> … … 289 252 </tr><% 290 253 } // isAdvanced() 291 254 %> 292 255 293 256 <tr> 294 257 <td> 295 258 <b><%=intl._t("Length")%></b> 296 </td> 297 298 <td> 259 </td><td> 299 260 <b><%=intl._t("Variance")%></b> 300 261 </td> 301 </tr> 302 303 <tr> 262 </tr><tr> 304 263 <td> 305 264 <select id="tunnelDepth" name="tunnelDepth" title="<%=intl._t("Length of each Tunnel")%>" class="selectbox"> … … 309 268 <option value="2"<%=(tunnelDepth == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("2 hop tunnel (medium anonymity)")%></option> 310 269 <option value="3"<%=(tunnelDepth == 3 ? " selected=\"selected\"" : "") %>><%=intl._t("3 hop tunnel (high anonymity)")%></option> 311 <%if (editBean.isAdvanced()) {270 <% if (editBean.isAdvanced()) { 312 271 %><option value="4"<%=(tunnelDepth == 4 ? " selected=\"selected\"" : "") %>>4 hop tunnel</option> 313 272 <option value="5"<%=(tunnelDepth == 5 ? " selected=\"selected\"" : "") %>>5 hop tunnel</option> 314 273 <option value="6"<%=(tunnelDepth == 6 ? " selected=\"selected\"" : "") %>>6 hop tunnel</option> 315 274 <option value="7"<%=(tunnelDepth == 7 ? " selected=\"selected\"" : "") %>>7 hop tunnel</option> 316 <%} else if (tunnelDepth > 3) {275 <% } else if (tunnelDepth > 3) { 317 276 %> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> <%=intl._t("hop tunnel (very poor performance)")%></option> 318 <%}277 <% } 319 278 %></select> 320 </td> 321 322 <td> 279 </td><td> 323 280 <select id="tunnelVariance" name="tunnelVariance" title="<%=intl._t("Level of Randomization for Tunnel Depth")%>" class="selectbox"> 324 281 <% int tunnelVariance = editBean.getTunnelVariance(curTunnel, 0); … … 328 285 <option value="-1"<%=(tunnelVariance == -1 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-1 hop variance (standard randomization, standard performance)")%></option> 329 286 <option value="-2"<%=(tunnelVariance == -2 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-2 hop variance (not recommended)")%></option> 330 <%if (tunnelVariance > 2 || tunnelVariance < -2) {287 <% if (tunnelVariance > 2 || tunnelVariance < -2) { 331 288 %> <option value="<%=tunnelVariance%>" selected="selected"><%= (tunnelVariance > 2 ? "+ " : "+/- ") %>0-<%=tunnelVariance%> <%=intl._t("hop variance")%></option> 332 <%}289 <% } 333 290 %></select> 334 291 </td> 335 </tr> 336 337 <tr> 292 </tr><tr> 338 293 <td> 339 294 <b><%=intl._t("Count")%></b> 340 </td> 341 342 <td> 295 </td><td> 343 296 <b><%=intl._t("Backup Count")%></b> 344 297 </td> 345 </tr> 346 347 <tr> 298 </tr><tr> 348 299 <td> 349 300 <select id="tunnelQuantity" name="tunnelQuantity" title="<%=intl._t("Number of Tunnels in Group")%>" class="selectbox"> 350 301 <%=editBean.getQuantityOptions(curTunnel, editBean.isAdvanced() ? 1 : 0)%> 351 302 </select> 352 </td> 353 354 <td> 303 </td><td> 355 304 <select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="<%=intl._t("Number of Reserve Tunnels")%>" class="selectbox"> 356 <%int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0);305 <% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0); 357 306 if (editBean.isAdvanced()) { 358 307 // TODO ngettext … … 361 310 <option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>>2 <%=intl._t("backup tunnels")%></option> 362 311 <option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>>3 <%=intl._t("backup tunnels")%></option> 363 312 <% 364 313 } else { 365 314 %><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 backup tunnels (0 redundancy, no added resource usage)")%></option> … … 367 316 <option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>><%=intl._t("2 backup tunnels each direction (medium redundancy, medium resource usage)")%></option> 368 317 <option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>><%=intl._t("3 backup tunnels each direction (high redundancy, high resource usage)")%></option> 369 <%} // isAdvanced()318 <% } // isAdvanced() 370 319 if (tunnelBackupQuantity > 3) { 371 320 %> <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> <%=intl._t("backup tunnels")%></option> 372 <%}321 <% } 373 322 %></select> 374 323 </td> 375 324 </tr> 376 325 377 <%if (editBean.isAdvanced()) {326 <% if (editBean.isAdvanced()) { 378 327 // repeat four options above for outbound 379 328 %><tr> … … 381 330 <%=intl._t("Outbound")%> 382 331 </th> 383 </tr> 384 <tr> 332 </tr><tr> 385 333 <td> 386 334 <b><%=intl._t("Length")%></b> 387 </td> 388 <td> 335 </td><td> 389 336 <b><%=intl._t("Variance")%></b> 390 337 </td> 391 </tr> 392 <tr> 338 </tr><tr> 393 339 <td> 394 340 <select id="tunnelDepthOut" name="tunnelDepthOut" title="<%=intl._t("Length of each Tunnel")%>" class="selectbox"> … … 403 349 <option value="7"<%=(tunnelDepthOut == 7 ? " selected=\"selected\"" : "") %>>7 hop tunnel</option> 404 350 </select> 405 </td> 406 <td> 351 </td><td> 407 352 <select id="tunnelVarianceOut" name="tunnelVarianceOut" title="<%=intl._t("Level of Randomization for Tunnel Depth")%>" class="selectbox"> 408 <%int tunnelVarianceOut = editBean.getTunnelVarianceOut(curTunnel, 0);353 <% int tunnelVarianceOut = editBean.getTunnelVarianceOut(curTunnel, 0); 409 354 %><option value="0"<%=(tunnelVarianceOut == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop variance (no randomization, consistent performance)")%></option> 410 355 <option value="1"<%=(tunnelVarianceOut == 1 ? " selected=\"selected\"" : "") %>><%=intl._t("+ 0-1 hop variance (medium additive randomization, subtractive performance)")%></option> … … 412 357 <option value="-1"<%=(tunnelVarianceOut == -1 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-1 hop variance (standard randomization, standard performance)")%></option> 413 358 <option value="-2"<%=(tunnelVarianceOut == -2 ? " selected=\"selected\"" : "") %>><%=intl._t("+/- 0-2 hop variance (not recommended)")%></option> 414 <%if (tunnelVarianceOut > 2 || tunnelVarianceOut < -2) {359 <% if (tunnelVarianceOut > 2 || tunnelVarianceOut < -2) { 415 360 %> <option value="<%=tunnelVarianceOut%>" selected="selected"><%= (tunnelVarianceOut > 2 ? "+ " : "+/- ") %>0-<%=tunnelVarianceOut%> <%=intl._t("hop variance")%></option> 416 <%}361 <% } 417 362 %></select> 418 363 </td> 419 </tr> 420 <tr> 364 </tr><tr> 421 365 <td> 422 366 <b><%=intl._t("Count")%></b> 423 </td> 424 425 <td> 367 </td><td> 426 368 <b><%=intl._t("Backup Count")%></b> 427 369 </td> 428 </tr> 429 <tr> 370 </tr><tr> 430 371 <td> 431 372 <select id="tunnelQuantityOut" name="tunnelQuantityOut" title="<%=intl._t("Number of Tunnels in Group")%>" class="selectbox"> 432 373 <%=editBean.getQuantityOptions(curTunnel, 2)%> 433 374 </select> 434 </td> 435 <td> 375 </td><td> 436 376 <select id="tunnelBackupQuantityOut" name="tunnelBackupQuantityOut" title="<%=intl._t("Number of Reserve Tunnels")%>" class="selectbox"> 437 <%int tunnelBackupQuantityOut = editBean.getTunnelBackupQuantityOut(curTunnel, 0);377 <% int tunnelBackupQuantityOut = editBean.getTunnelBackupQuantityOut(curTunnel, 0); 438 378 // TODO ngettext 439 379 %><option value="0"<%=(tunnelBackupQuantityOut == 0 ? " selected=\"selected\"" : "") %>>0 <%=intl._t("backup tunnels")%></option> … … 441 381 <option value="2"<%=(tunnelBackupQuantityOut == 2 ? " selected=\"selected\"" : "") %>>2 <%=intl._t("backup tunnels")%></option> 442 382 <option value="3"<%=(tunnelBackupQuantityOut == 3 ? " selected=\"selected\"" : "") %>>3 <%=intl._t("backup tunnels")%></option> 443 <%if (tunnelBackupQuantityOut > 3) {383 <% if (tunnelBackupQuantityOut > 3) { 444 384 %> <option value="<%=tunnelBackupQuantityOut%>" selected="selected"><%=tunnelBackupQuantityOut%> <%=intl._t("backup tunnels")%></option> 445 <%}385 <% } 446 386 %></select> 447 387 </td> 448 388 </tr> 449 389 <% 450 390 } // isAdvanced() End outbound config section 451 %> 452 453 <% if (!"streamrserver".equals(tunnelType)) { %> 454 391 392 if (!"streamrserver".equals(tunnelType)) { 393 %> 455 394 <tr> 456 395 <th colspan="2"> 457 396 <%=intl._t("Profile")%> 458 397 </th> 459 </tr> 460 461 <tr> 398 </tr><tr> 462 399 <td colspan="2"> 463 400 <select id="profile" name="profile" title="<%=intl._t("Connection Profile")%>" class="selectbox"> … … 468 405 </td> 469 406 </tr> 470 471 <% } /* !streamrserver */ %> 472 407 <% } /* !streamrserver */ %> 473 408 <tr> 474 409 <th colspan="2"> 475 410 <%=intl._t("Router I2CP Address")%> 476 411 </th> 477 </tr> 478 <tr> 412 </tr><tr> 479 413 <td> 480 414 <b><%=intl._t("Host")%>:</b> 481 415 <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> 416 </td><td> 484 417 <b><%=intl._t("Port")%>:</b> 485 418 <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 419 </td> 487 </tr> 488 489 <tr> 420 </tr><tr> 490 421 <th colspan="2"> 491 422 <%=intl._t("Encrypt Leaseset")%> 492 423 </th> 493 </tr> 494 495 <tr> 496 <td colspan="2"> 497 <% 424 </tr><tr> 425 <td colspan="2"> 426 <% 498 427 String curEncryptMode = editBean.getEncryptMode(curTunnel); 499 428 %> 500 429 <span class="multiOption"><label title="<%=intl._t("Allow all clients to connect to this service")%>"><input value="0" type="radio" name="encryptMode"<%=(curEncryptMode.equals("0") ? " checked=\"checked\"" : "")%> class="tickbox" /> 501 430 <%=intl._t("Disable")%></label></span> 502 431 <span class="multiOption"><label title="<%=intl._t("Only clients with the encryption key will be able to connect")%>"><input value="1" type="radio" name="encryptMode"<%=(curEncryptMode.equals("1") ? " checked=\"checked\"" : "")%> class="tickbox" /> 503 432 <%=intl._t("Encrypted")%></label></span> 504 433 <% 505 434 int curSigType = editBean.getSigType(curTunnel, tunnelType); 506 435 if (curSigType == 7 || curSigType == 11) { 507 436 %> 508 437 <span class="multiOption"><label title="<%=intl._t("Prevents server discovery by floodfills")%>"><input value="2" type="radio" name="encryptMode"<%=(curEncryptMode.equals("2") ? " checked=\"checked\"" : "")%> class="tickbox" /> 509 438 <%=intl._t("Blinded")%></label></span> 510 439 <span class="multiOption"><label title="<%=intl._t("Only clients with the password will be able to connect")%>"><input value="3" type="radio" name="encryptMode"<%=(curEncryptMode.equals("3") ? " checked=\"checked\"" : "")%> class="tickbox" /> 511 440 <%=intl._t("Blinded with lookup password")%></label></span> 512 441 <% 513 442 if (editBean.isAdvanced()) { 514 443 // TODO, unimplemented 515 444 %> 516 445 <span class="multiOption"><label title="<%=intl._t("Only clients with the encryption key will be able to connect")%>"><input value="4" type="radio" name="encryptMode"<%=(curEncryptMode.equals("4") ? " checked=\"checked\"" : "")%> class="tickbox" /> 517 446 <%=intl._t("Blinded with shared key")%></label></span> … … 522 451 <span class="multiOption"><label title="<%=intl._t("Only clients with the password and key will be able to connect")%>"><input value="7" type="radio" name="encryptMode"<%=(curEncryptMode.equals("7") ? " checked=\"checked\"" : "")%> class="tickbox" /> 523 452 <%=intl._t("Blinded with lookup password and per-user key")%></label></span> 524 453 <% 525 454 } // isAdvanced() 526 455 } // curSigType 527 %> 528 </td> 529 </tr> 530 531 <tr> 456 %> 457 </td> 458 </tr><tr> 532 459 <td> 533 460 <b><%=intl._t("Encryption Key")%></b> 534 </td> 535 536 <td> 461 </td><td> 537 462 <b><%=intl._t("Generate New Key")%></b> (<%=intl._t("Tunnel must be stopped first")%>) 538 463 </td> 539 </tr> 540 541 <tr> 464 </tr><tr> 542 465 <td> 543 466 <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> 544 </td> 545 546 <td> 467 </td><td> 547 468 <button class="control" type="submit" name="action" value="Generate" title="<%=intl._t("Generate new encryption key")%>"><%=intl._t("Generate")%></button> 548 469 </td> 549 470 </tr> 550 551 <% 471 <% 552 472 if (curSigType == 7 || curSigType == 11) { 553 473 %> 554 474 <tr> 555 475 <td> … … 558 478 </td><td> </td> 559 479 </tr> 560 480 <% 561 481 } // curSigType 562 %> 563 482 %> 564 483 <tr> 565 484 <th colspan="2"> 566 485 <%=intl._t("Restricted Access List")%> 567 486 </th> 568 </tr> 569 570 <tr> 487 </tr><tr> 571 488 <td colspan="2"> 572 489 <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" /> … … 577 494 <%=intl._t("Whitelist")%></label></span> 578 495 </td> 579 </tr> 580 581 <tr> 496 </tr><tr> 582 497 <td colspan="2"> 583 498 <b><%=intl._t("Access List Description")%></b> (<%=intl._t("Specify clients, 1 per line")%>) 584 499 </td> 585 </tr> 586 587 <tr> 500 </tr><tr> 588 501 <td colspan="2"> 589 502 <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> 590 503 </td> 591 </tr> 592 593 <tr> 504 </tr><tr> 594 505 <td colspan="2"> 595 506 <b><%=intl._t("Filter Definition File")%></b> 596 507 </td> 597 </tr> 598 599 <tr> 508 </tr><tr> 600 509 <td colspan="2"> 601 510 <%=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>) 602 511 </td> 603 </tr> 604 605 <tr> 512 </tr><tr> 606 513 <td colspan="2"> 607 514 <label for="filterDefinition"><%=intl._t("Absolute path to file containing filter definition")%></label> 608 515 <input type="text" id="filterDefinition" name="filterDefinition" value="<%=editBean.getFilterDefinition(curTunnel)%>" size="80"/> 609 516 </td> 610 </tr> 611 612 <tr> 517 </tr><tr> 613 518 <th colspan="2"> 614 519 <%=intl._t("Server Access Options")%> 615 520 </th> 616 521 </tr> 617 618 <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { 619 %> 620 522 <% 523 if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { 524 %> 621 525 <tr> 622 526 <td> 623 527 <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" /> 624 528 <%=intl._t("Block Access via Inproxies")%></label> 625 </td> 626 627 <td> 529 </td><td> 628 530 <label><input value="1" type="checkbox" name="rejectReferer"<%=(editBean.isRejectReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> 629 531 <%=intl._t("Block Accesses containing Referers")%></label> 630 532 </td> 631 </tr> 632 633 <tr> 533 </tr><tr> 634 534 <td> 635 535 <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" /> 636 536 <%=intl._t("Block these User-Agents")%></label> 637 </td> 638 639 <td> 537 </td><td> 640 538 <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" /> 641 539 </td> 642 540 </tr> 643 <% } // httpserver 644 %> 645 541 <% } // httpserver 542 %> 646 543 <tr> 647 544 <td> 648 545 <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" /> 649 546 <%=intl._t("Unique Local Address per Client")%></label> 650 </td> 651 652 <td> 547 </td><td> 653 548 <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" /> 654 549 <%=intl._t("Optimize for Multihoming")%></label> 655 550 </td> 656 </tr> 657 658 <tr> 551 </tr><tr> 659 552 <th colspan="2"> 660 553 <%=intl._t("Server Throttling")%> 661 554 </th> 662 </tr> 663 <tr> 555 </tr><tr> 664 556 <td id="throttle" colspan="4"> 665 666 557 <table id="throttler"> 667 558 <tr> … … 669 560 <%=intl._t("Inbound connection limits (0=unlimited)")%> 670 561 </th> 671 </tr> 672 <tr> 562 </tr><tr> 673 563 <td></td> 674 564 <td><b><%=intl._t("Per Minute")%></b></td> … … 676 566 <td><b><%=intl._t("Per Day")%></b></td> 677 567 <td class="blankColumn"></td> 678 </tr> 679 <tr> 568 </tr><tr> 680 569 <td><b><%=intl._t("Per Client")%></b></td> 681 570 <td> 682 571 <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" /> 683 </td> 684 <td> 572 </td><td> 685 573 <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" /> 686 </td> 687 <td> 574 </td><td> 688 575 <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" /> 689 </td> 690 <td class="blankColumn"></td> 691 </tr> 692 <tr> 576 </td><td class="blankColumn"></td> 577 </tr><tr> 693 578 <td><b><%=intl._t("Total")%></b></td> 694 579 <td> 695 580 <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" /> 696 </td> 697 <td> 581 </td><td> 698 582 <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" /> 699 </td> 700 <td> 583 </td><td> 701 584 <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" /> 702 </td> 703 <td class="blankColumn"></td> 585 </td><td class="blankColumn"></td> 586 </tr><tr> 587 <th colspan="5"><%=intl._t("Max concurrent connections (0=unlimited)")%></th> 588 </tr><tr> 589 <td></td><td> 590 <input type="text" name="maxStreams" title="<%=intl._t("Maximum number of simultaneous client connections")%>" value="<%=editBean.getMaxStreams(curTunnel)%>" class="freetext" /> 591 </td><td></td><td></td><td class="blankColumn"></td> 704 592 </tr> 705 <tr> 706 <th colspan="5"><%=intl._t("Max concurrent connections (0=unlimited)")%></th> 707 </tr> 708 <tr> 709 <td></td> 710 <td> 711 <input type="text" name="maxStreams" title="<%=intl._t("Maximum number of simultaneous client connections")%>" value="<%=editBean.getMaxStreams(curTunnel)%>" class="freetext" /> 712 </td> 713 <td></td> 714 <td></td> 715 <td class="blankColumn"></td> 716 </tr> 717 718 <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { 719 %> 593 <% 594 if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { 595 %> 720 596 <tr> 721 597 <th colspan="5"> 722 598 <%=intl._t("POST limits (0=unlimited)")%> 723 599 </th> 724 </tr> 725 <tr> 726 <td></td> 727 <td> 600 </tr><tr> 601 <td></td><td> 728 602 <b><%=intl._t("Per Period")%></b> 729 </td> 730 <td> 603 </td><td> 731 604 <b><%=intl._t("Ban Duration")%></b> 732 </td> 733 <td></td> 734 <td class="blankColumn"></td> 735 </tr> 736 <tr> 605 </td><td></td><td class="blankColumn"></td> 606 </tr><tr> 737 607 <td> 738 608 <b><%=intl._t("Per Client")%> 739 609 </b> 740 </td> 741 <td> 610 </td><td> 742 611 <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"/> 743 </td> 744 <td colspan="2"> 612 </td><td colspan="2"> 745 613 <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"/> 746 614 <%=intl._t("minutes")%> 747 </td> 748 <td class="blankColumn"></td> 749 </tr> 750 <tr> 615 </td><td class="blankColumn"></td> 616 </tr><tr> 751 617 <td> 752 618 <b><%=intl._t("Total")%> 753 619 </b> 754 </td> 755 <td> 620 </td><td> 756 621 <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"/> 757 </td> 758 <td colspan="2"> 622 </td><td colspan="2"> 759 623 <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"/> 760 624 <%=intl._t("minutes")%> 761 </td> 762 <td class="blankColumn"></td> 763 </tr> 764 <tr> 625 </td><td class="blankColumn"></td> 626 </tr><tr> 765 627 <td> 766 628 <b><%=intl._t("POST limit period")%> 767 629 </b> 768 </td> 769 <td colspan="2"> 630 </td><td colspan="2"> 770 631 <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"/> 771 632 <%=intl._t("minutes")%> 772 </td> 773 <td></td> 774 <td class="blankColumn"></td> 633 </td><td></td><td class="blankColumn"></td> 775 634 </tr> 776 777 <% } // httpserver 778 %> 635 <% } // httpserver 636 %> 779 637 780 638 </table> 781 639 </td> 782 </tr> 783 784 <tr> 640 </tr><tr> 785 641 <th colspan="2"> 786 642 <%=intl._t("Reduce tunnel quantity when idle")%> 787 643 </th> 788 </tr> 789 790 <tr> 644 </tr><tr> 791 645 <td colspan="2"> 792 646 <label><input value="1" type="checkbox" id="startOnLoad" name="reduce" <%=(editBean.getReduce(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> 793 647 <%=intl._t("Reduce tunnel quantity when idle to conserve resources")%></label> 794 648 </td> 795 </tr> 796 <tr> 649 </tr><tr> 797 650 <td> 798 651 <b><%=intl._t("Reduced tunnel count")%>:</b> … … 806 659 </td> 807 660 </tr> 808 809 661 <% /***************** %> 810 811 662 <tr> 812 663 <th colspan="2"> 813 664 <%=intl._t("New Certificate type")%> 814 665 </th> 815 </tr> 816 817 <tr> 666 </tr><tr> 818 667 <td colspan="2"> 819 668 <span class="multiOption"><label title="<%=intl._t("No Certificate")%>"><%=intl._t("None")%> … … 823 672 <input type="text" id="port" name="effort" size="2" maxlength="2" title="<%=intl._t("Hashcash Effort")%>" value="<%=editBean.getEffort(curTunnel)%>" class="freetext" /></span> 824 673 </td> 825 </tr> 826 827 <tr> 674 </tr><tr> 828 675 <th> 829 676 <%=intl._t("Hashcash Calc Time")%> 830 </th> 831 <th> 677 </th><th> 832 678 <%=intl._t("Hidden")%> 833 679 </th> 834 </tr> 835 836 <tr> 680 </tr><tr> 837 681 <td> 838 682 <button class="control" type="submit" name="action" value="Estimate" title="<%=intl._t("Estimate Calculation Time")%>"><%=intl._t("Estimate")%></button> 839 </td> 840 <td> 683 </td><td> 841 684 <input value="2" type="radio" id="startOnLoad" name="cert" title="<%=intl._t("Hidden Certificate")%>"<%=(editBean.getCert(curTunnel)==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> 842 685 </td> 843 </tr> 844 845 <tr> 686 </tr><tr> 846 687 <th colspan="2"> 847 688 <%=intl._t("Signed Certificate")%> 848 689 </th> 849 </tr> 850 851 <tr> 690 </tr><tr> 852 691 <td colspan="2"> 853 692 <label title="<%=intl._t("Signed Certificate")%>"><%=intl._t("Signed (signed by)")%>: … … 855 694 <input type="text" id="port" name="signer" size="50" title="<%=intl._t("Cert Signer")%>" value="<%=editBean.getSigner(curTunnel)%>" class="freetext" /> 856 695 </td> 857 </tr> 858 859 <tr> 696 </tr><tr> 860 697 <th colspan="2"> 861 698 <%=intl._t("Modify Certificate")%> <%=intl._t("(Tunnel must be stopped first)")%> 862 699 </th> 863 </tr> 864 865 <tr> 700 </tr><tr> 866 701 <td colspan="2"> 867 702 <button class="control" type="submit" name="action" value="Modify" title="<%=intl._t("Force new Certificate now")%>"><%=intl._t("Modify")%></button> 868 703 </td> 869 704 </tr> 870 871 <% **********************/ %> 872 873 <% 705 <% 706 **********************/ 874 707 int currentSigType = editBean.getSigType(curTunnel, tunnelType); 875 708 if (true /* editBean.isAdvanced() */ ) { 876 709 String disabled = editBean.canChangeSigType(curTunnel) ? "" : " disabled=\"disabled\" "; 877 710 %> 878 711 <tr> 879 712 <th colspan="2"> 880 713 <%=intl._t("Signature type")%> <%-- (<%=intl._t("Experts only! Changes B32!")%>) --%> 881 714 </th> 882 </tr> 883 <tr> 715 </tr><tr> 884 716 <td colspan="2"> 885 717 <span class="multiOption"> … … 887 719 DSA-SHA1</label> 888 720 </span> 889 <%if (editBean.isSigTypeAvailable(1)) { %>721 <% if (editBean.isSigTypeAvailable(1)) { %> 890 722 <span class="multiOption"> 891 723 <label><input value="1" type="radio" id="startOnLoad" name="sigType" <%=disabled%> <%=(currentSigType==1 ? " checked=\"checked\"" : "")%> class="tickbox" /> 892 724 ECDSA-P256</label> 893 725 </span> 894 <%}726 <% } 895 727 if (editBean.isSigTypeAvailable(2)) { %> 896 728 <span class="multiOption"> … … 898 730 ECDSA-P384</label> 899 731 </span> 900 <%}732 <% } 901 733 if (editBean.isSigTypeAvailable(3)) { %> 902 734 <span class="multiOption"> … … 904 736 ECDSA-P521</label> 905 737 </span> 906 <%}738 <% } 907 739 if (editBean.isSigTypeAvailable(7)) { %> 908 740 <span class="multiOption"> … … 910 742 Ed25519-SHA-512</label> 911 743 </span> 912 <% } // isAvailable %> 913 914 </td> 915 </tr> 916 917 <% } // isAdvanced %> 918 919 <% 744 <% } // isAvailable 745 %> 746 </td> 747 </tr> 748 <% } // isAdvanced 749 920 750 /* alternate dest, only if current dest is set and is DSA_SHA1 */ 921 751 922 752 if (currentSigType == 0 && !"".equals(b64) && !"streamrserver".equals(tunnelType)) { 923 %> 924 753 %> 925 754 <tr> 926 755 <th colspan="2"> 927 756 <%=intl._t("Alternate private key file")%> (Ed25519-SHA-512) 928 757 </th> 929 </tr> 930 931 <tr> 758 </tr><tr> 932 759 <td colspan="2"> 933 760 <input type="text" class="freetext" size="30" id="altPrivKeyFile" name="altPrivKeyFile" title="<%=intl._t("Path to Private Key File")%>" value="<%=editBean.getAltPrivateKeyFile(curTunnel)%>" /> 934 761 </td> 935 762 </tr> 936 937 <% 763 <% 938 764 String ab64 = editBean.getAltDestinationBase64(curTunnel); 939 765 if (!"".equals(ab64)) { 940 %> 941 766 %> 942 767 <tr> 943 768 <th colspan="2"> 944 769 <%=intl._t("Alternate local destination")%> 945 770 </th> 946 </tr> 947 948 <tr> 771 </tr><tr> 949 772 <td colspan="2"> 950 773 <div class="displayText" title="<%=intl._t("Read Only: Alternate Local Destination")%>" onblur="resetScrollLeft(this)"><%=ab64%></div> 951 774 </td> 952 </tr> 953 954 <tr> 775 </tr><tr> 955 776 <td colspan="2"> 956 777 <%=editBean.getAltDestHashBase32(curTunnel)%> 957 778 </td> 958 779 </tr> 959 960 <% 780 <% 961 781 ab64 = ab64.replace("=", "%3d"); 962 782 String name = editBean.getSpoofedHost(curTunnel); … … 965 785 // mysite.i2p is set in the installed i2ptunnel.config 966 786 if (name != null && !name.equals("") && !name.equals("mysite.i2p") && !name.contains(" ") && name.endsWith(".i2p")) { 967 %> 968 787 %> 969 788 <tr> 970 789 <td class="buttons" colspan="2"> 971 790 <% 972 791 if (hasImagegen) { 973 792 %> 974 793 <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> 975 794 <% 976 795 } 977 796 if (hasSusiDNS) { 978 797 %> 979 798 <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> 980 799 <% 981 800 } 982 801 } else { 983 %> 984 802 %> 985 803 <tr> 986 804 <td colspan="2"> … … 988 806 </td> 989 807 </tr> 990 991 <% 808 <% 992 809 } // name 993 %>994 <%995 810 } // ab64 996 %> 997 <% } // currentSigType %> 998 811 } // currentSigType 812 %> 999 813 <tr> 1000 814 <th colspan="2"> 1001 815 <%=intl._t("Custom options")%> 1002 816 </th> 1003 </tr> 1004 <tr> 817 </tr><tr> 1005 818 <td colspan="2"> 1006 819 <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)%>" /> 1007 820 </td> 1008 </tr> 1009 1010 <tr> 821 </tr><tr> 1011 822 <td class="buttons" colspan="2"> 1012 823 <input type="hidden" value="true" name="removeConfirm" /> … … 1016 827 </td> 1017 828 </tr> 1018 829 </table> -
apps/i2ptunnel/jsp/index.jsp
r2960156 rdd5f8b45 33 33 <% } 34 34 %> 35 </head> 36 <body id="tunnelListPage"> 37 35 </head><body id="tunnelListPage"> 38 36 <% 39 37 boolean isInitialized = indexBean.isInitialized(); … … 52 50 <textarea id="statusMessages" rows="4" cols="60" readonly="readonly"><%=msgs%></textarea> 53 51 </td> 54 </tr> 55 <tr> 52 </tr><tr> 56 53 <td class="buttons"> 57 54 <a class="control" href="list"><%=intl._t("Refresh")%></a> … … 88 85 </table> 89 86 </div> 90 91 87 <div class="panel" id="servers"> 92 93 88 <h2><%=intl._t("I2P Hidden Services")%></h2> 94 95 89 <table id="serverTunnels"> 96 90 <tr> … … 102 96 <th class="tunnelControl"><%=intl._t("Control")%></th> 103 97 </tr> 104 105 <% 98 <% 106 99 for (int curServer = 0; curServer < indexBean.getTunnelCount(); curServer++) { 107 100 if (indexBean.isClient(curServer)) continue; 108 %> 109 110 101 %> 111 102 <tr class="tunnelProperties"> 112 103 <td class="tunnelName"> 113 104 <a href="edit?tunnel=<%=curServer%>" title="<%=intl._t("Edit Server Tunnel Settings for")%> <%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%></a> 114 </td> 115 <td class="tunnelType"><%=indexBean.getTunnelType(curServer)%></td> 116 <td class="tunnelLocation"> 117 <% 105 </td><td class="tunnelType"><%=indexBean.getTunnelType(curServer)%> 106 </td><td class="tunnelLocation"> 107 <% 118 108 if (indexBean.isServerTargetLinkValid(curServer)) { 119 109 if (indexBean.isSSLEnabled(curServer)) { %> 120 110 <a href="https://<%=indexBean.getServerTarget(curServer)%>/" title="<%=intl._t("Test HTTPS server, bypassing I2P")%>" target="_top"><%=indexBean.getServerTarget(curServer)%> SSL</a> 121 <%} else { %>111 <% } else { %> 122 112 <a href="http://<%=indexBean.getServerTarget(curServer)%>/" title="<%=intl._t("Test HTTP server, bypassing I2P")%>" target="_top"><%=indexBean.getServerTarget(curServer)%></a> 123 113 <% 124 114 } 125 115 } else { 126 116 %><%=indexBean.getServerTarget(curServer)%> 127 117 <% 128 118 if (indexBean.isSSLEnabled(curServer)) { %> 129 119 SSL 130 120 <% 131 121 } 132 122 } 133 %> 134 </td> 135 <td class="tunnelPreview"> 136 <% 123 %> 124 </td><td class="tunnelPreview"> 125 <% 137 126 if (("httpserver".equals(indexBean.getInternalType(curServer)) || ("httpbidirserver".equals(indexBean.getInternalType(curServer)))) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { 138 127 %> 139 128 <a class="control" title="<%=intl._t("Test HTTP server through I2P")%>" href="http://<%=indexBean.getDestHashBase32(curServer)%>" target="_top"><%=intl._t("Preview")%></a> 140 129 <% 141 130 } else if (indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { 142 131 %><%=intl._t("Base32 Address")%>:<%=indexBean.getDestHashBase32(curServer)%> 143 132 <% 144 133 } else { 145 134 %><%=intl._t("No Preview")%> 146 135 <% 147 136 } 148 %> 149 </td> 150 <td class="tunnelStatus"> 151 <% 137 %> 138 </td><td class="tunnelStatus"> 139 <% 152 140 switch (indexBean.getTunnelStatus(curServer)) { 153 141 case IndexBean.STARTING: 154 142 %><div class="statusStarting text" title="<%=intl._t("Starting...")%>"><%=intl._t("Starting...")%></div> 155 </td> 156 <td class="tunnelControl"> 143 </td><td class="tunnelControl"> 157 144 <a class="control" title="<%=intl._t("Stop this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curServer%>"><%=intl._t("Stop")%></a> 158 145 <% 159 146 break; 160 147 case IndexBean.RUNNING: 161 148 %><div class="statusRunning text" title="<%=intl._t("Running")%>"><%=intl._t("Running")%></div> 162 </td> 163 <td class="tunnelControl"> 149 </td><td class="tunnelControl"> 164 150 <a class="control" title="<%=intl._t("Stop this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curServer%>"><%=intl._t("Stop")%></a> 165 151 <% 166 152 break; 167 153 case IndexBean.NOT_RUNNING: 168 154 %><div class="statusNotRunning text" title="<%=intl._t("Stopped")%>"><%=intl._t("Stopped")%></div> 169 </td> 170 <td class="tunnelControl"> 155 </td><td class="tunnelControl"> 171 156 <a class="control" title="<%=intl._t("Start this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=start&tunnel=<%=curServer%>"><%=intl._t("Start")%></a> 172 157 <% 173 158 break; 174 159 } 175 %> 176 </td> 177 </tr> 178 179 <tr> 160 %> 161 </td> 162 </tr><tr> 180 163 <td class="tunnelDestination" colspan="6"> 181 164 <span class="tunnelDestinationLabel"> 182 165 <% 183 166 String name = indexBean.getSpoofedHost(curServer); 184 167 if (name == null || name.equals("")) { … … 194 177 out.write(name); 195 178 } 196 %> 197 </td> 198 </tr> 199 200 <% 179 %> 180 </td> 181 </tr> 182 <% 201 183 String encName = indexBean.getEncryptedBase32(curServer); 202 184 if (encName != null && encName.length() > 0) { 203 185 %> 204 186 <tr> 205 187 <td class="tunnelDestination" colspan="6"> … … 208 190 </td> 209 191 </tr> 210 192 <% 211 193 } // encName 212 %> 213 194 %> 214 195 <tr> 215 196 <td class="tunnelDescription" colspan="6"> … … 218 199 </td> 219 200 </tr> 220 221 <% 201 <% 222 202 } // for loop 223 %> 224 203 %> 225 204 <tr> 226 205 <td class="newTunnel" colspan="6"> … … 240 219 </table> 241 220 </div> 242 243 221 <div class="panel" id="clients"> 244 222 <h2><%=intl._t("I2P Client Tunnels")%></h2> 245 246 223 <table id="clientTunnels"> 247 224 <tr> … … 253 230 <th class="tunnelControl"><%=intl._t("Control")%></th> 254 231 </tr> 255 256 <% 232 <% 257 233 for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) { 258 234 if (!indexBean.isClient(curClient)) continue; 259 %> 260 261 235 %> 262 236 <tr class="tunnelProperties"> 263 237 <td class="tunnelName"> 264 238 <a href="edit?tunnel=<%=curClient%>" title="<%=intl._t("Edit Tunnel Settings for")%> <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a> 265 </td> 266 267 <td class="tunnelType"><%=indexBean.getTunnelType(curClient)%></td> 268 <td class="tunnelInterface"> 269 <% 239 </td><td class="tunnelType"><%=indexBean.getTunnelType(curClient)%> 240 </td><td class="tunnelInterface"> 241 <% 270 242 /* should only happen for streamr client */ 271 243 String cHost= indexBean.getClientInterface(curClient); … … 277 249 out.write(cHost); 278 250 } 279 %> 280 </td> 281 <td class="tunnelPort"> 282 <% 251 %> 252 </td><td class="tunnelPort"> 253 <% 283 254 String cPort= indexBean.getClientPort2(curClient); 284 255 out.write(cPort); 285 256 if (indexBean.isSSLEnabled(curClient)) 286 257 out.write(" SSL"); 287 %> 288 </td> 289 <td class="tunnelStatus"> 290 <% 258 %> 259 </td><td class="tunnelStatus"> 260 <% 291 261 switch (indexBean.getTunnelStatus(curClient)) { 292 262 case IndexBean.STARTING: 293 263 %><div class="statusStarting text" title="<%=intl._t("Starting...")%>"><%=intl._t("Starting...")%></div> 294 </td> 295 <td class="tunnelControl"> 264 </td><td class="tunnelControl"> 296 265 <a class="control" title="<%=intl._t("Stop this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curClient%>"><%=intl._t("Stop")%></a> 297 266 <% 298 267 break; 299 268 case IndexBean.STANDBY: 300 269 %><div class="statusStarting text" title="<%=intl._t("Standby")%>"><%=intl._t("Standby")%></div> 301 </td> 302 <td class="tunnelControl"> 270 </td><td class="tunnelControl"> 303 271 <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curClient%>"><%=intl._t("Stop")%></a> 304 272 <% 305 273 break; 306 274 case IndexBean.RUNNING: 307 275 %><div class="statusRunning text" title="<%=intl._t("Running")%>"><%=intl._t("Running")%></div> 308 </td> 309 <td class="tunnelControl"> 276 </td><td class="tunnelControl"> 310 277 <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curClient%>"><%=intl._t("Stop")%></a> 311 278 <% 312 279 break; 313 280 case IndexBean.NOT_RUNNING: 314 281 %><div class="statusNotRunning text" title="<%=intl._t("Stopped")%>"><%=intl._t("Stopped")%></div> 315 </td> 316 <td class="tunnelControl"> 282 </td><td class="tunnelControl"> 317 283 <a class="control" title="<%=intl._t("Start this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=start&tunnel=<%=curClient%>"><%=intl._t("Start")%></a> 318 284 <% 319 285 break; 320 286 } 321 %> 322 </td> 323 </tr> 324 <tr> 287 %> 288 </td> 289 </tr><tr> 325 290 <td class="tunnelDestination" colspan="6"> 326 291 <span class="tunnelDestinationLabel"> 327 <%if ("httpclient".equals(indexBean.getInternalType(curClient)) || "connectclient".equals(indexBean.getInternalType(curClient)) ||292 <% if ("httpclient".equals(indexBean.getInternalType(curClient)) || "connectclient".equals(indexBean.getInternalType(curClient)) || 328 293 "sockstunnel".equals(indexBean.getInternalType(curClient)) || "socksirctunnel".equals(indexBean.getInternalType(curClient))) { %> 329 294 <b><%=intl._t("Outproxy")%>:</b> 330 <%} else { %>295 <% } else { %> 331 296 <b><%=intl._t("Destination")%>:</b> 332 <%} %>297 <% } %> 333 298 </span> 334 299 <% 335 300 if (indexBean.getIsUsingOutproxyPlugin(curClient)) { 336 301 %><%=intl._t("internal plugin")%><% … … 347 312 </td> 348 313 </tr> 349 314 <% /* TODO SSL outproxy for httpclient if plugin not present */ %> 350 315 <tr> 351 316 <td class="tunnelDescription" colspan="6"> … … 354 319 </td> 355 320 </tr> 356 321 <% 357 322 } 358 323 %> 359 324 <tr> 360 325 <td class="newTunnel" colspan="6"> … … 376 341 </table> 377 342 </div> 378 379 343 <% 380 344 … … 382 346 383 347 %> 384 385 </body> 386 </html> 348 </body></html>
Note: See TracChangeset
for help on using the changeset viewer.