From c58697012852f8330bc521f77df10f34c6e000ea Mon Sep 17 00:00:00 2001 From: str4d <str4d@mail.i2p> Date: Mon, 11 Jul 2016 06:54:26 +0000 Subject: [PATCH] Migrate i2ptunnel UI to tables, drop duplicate ids --- apps/i2ptunnel/jsp/editClient.jsp | 967 +++++++++++++++------------- apps/i2ptunnel/jsp/editServer.jsp | 1000 +++++++++++++++-------------- apps/i2ptunnel/jsp/index.jsp | 348 +++++----- apps/i2ptunnel/jsp/register.jsp | 370 ++++++----- apps/i2ptunnel/jsp/wizard.jsp | 308 +++++---- 5 files changed, 1631 insertions(+), 1362 deletions(-) diff --git a/apps/i2ptunnel/jsp/editClient.jsp b/apps/i2ptunnel/jsp/editClient.jsp index b09b2ed545..f97f6346b2 100644 --- a/apps/i2ptunnel/jsp/editClient.jsp +++ b/apps/i2ptunnel/jsp/editClient.jsp @@ -23,8 +23,7 @@ <% if (editBean.allowCSS()) { %><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" /> - <link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> - <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> + <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> <% } %> <style type='text/css'> @@ -32,8 +31,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; } </style> </head> <body id="tunnelEditPage"> - <div id="pageHeader"> - </div> + <% if (editBean.isInitialized()) { @@ -41,19 +39,18 @@ input.default { width: 1px; height: 1px; visibility: hidden; } %> <form method="post" action="list"> - <div id="tunnelEditPanel" class="panel"> - <div class="header"> + <div class="panel"> <% String tunnelTypeName; String tunnelType; if (curTunnel >= 0) { tunnelTypeName = editBean.getTunnelType(curTunnel); tunnelType = editBean.getInternalType(curTunnel); - %><h4><%=intl._t("Edit proxy settings")%></h4><% + %><h2><%=intl._t("Edit proxy settings")%> (<%=editBean.getTunnelName(curTunnel)%>)</h2><% } else { tunnelTypeName = editBean.getTypeName(request.getParameter("type")); tunnelType = net.i2p.data.DataHelper.stripHTML(request.getParameter("type")); - %><h4><%=intl._t("New proxy settings")%></h4><% + %><h2><%=intl._t("New proxy settings")%></h2><% } %> <input type="hidden" name="tunnel" value="<%=curTunnel%>" /> <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" /> @@ -79,70 +76,88 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <input type="hidden" name="key4" value="<%=key%>" /> <% } %> <input type="submit" class="default" name="action" value="Save changes" /> - </div> - - <div class="separator"> - <hr /> - </div> - - <div id="nameField" class="rowItem"> - <label for="name" accesskey="N"> - <%=intl._t("Name")%>:(<span class="accessKey">N</span>) - </label> - <input type="text" size="30" maxlength="50" name="name" id="name" title="Tunnel Name" value="<%=editBean.getTunnelName(curTunnel)%>" class="freetext" /> - </div> - <div id="typeField" class="rowItem"> - <label><%=intl._t("Type")%>:</label> - <span class="text"><%=tunnelTypeName%></span> - </div> - <div id="descriptionField" class="rowItem"> - <label for="description" accesskey="e"> - <%=intl._t("Description")%>:(<span class="accessKey">E</span>) - </label> - <input type="text" size="60" maxlength="80" name="nofilter_description" id="description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext" /> - </div> - - <div class="subdivider"> - <hr /> - </div> - - <div id="accessField" class="rowItem"> + + <table id="clientTunnelEdit" class="tunnelConfig"> + <tr> + <th> + <%=intl._t("Name")%> + </th> + <th> + <%=intl._t("Type")%> + </th> + </tr> + <tr> + <td> + <input type="text" size="30" maxlength="50" name="name" title="Tunnel Name" value="<%=editBean.getTunnelName(curTunnel)%>" class="freetext tunnelName" /> + </td> + <td> + <%=tunnelTypeName%> + </td> + </tr> + + <tr> + <th> + <%=intl._t("Description")%> + </th> + + <th> + <%=intl._t("Auto Start Tunnel")%> + </th> + </tr> + + <tr> + <td> + <input type="text" size="60" maxlength="80" name="nofilter_description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext tunnelDescription" /> + </td> + + <td> + <input value="1" type="checkbox" name="startOnLoad" title="Start Tunnel Automatically"<%=(editBean.startAutomatically(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Automatically start tunnel when router starts")%> + </td> + </tr> + + <tr> + <th colspan="2"> <% if ("streamrclient".equals(tunnelType)) { %> - <label><%=intl._t("Target")%>:</label> + <%=intl._t("Target")%> <% } else { %> - <label><%=intl._t("Access Point")%>:</label> + <%=intl._t("Access Point")%> <% } /* streamrclient */ %> - </div> - <div id="portField" class="rowItem"> - <label for="port" accesskey="P"> - <span class="accessKey">P</span>ort: + </th> + </tr> + <tr> + <td> + <b><%=intl._t("Port")%>:</b> <% String value = editBean.getClientPort(curTunnel); if (value == null || "".equals(value.trim())) { - out.write(" <font color=\"red\">("); + out.write(" <span class=\"required\"><font color=\"red\">("); out.write(intl._t("required")); - out.write(")</font>"); + out.write(")</font></span>"); } %> - </label> - <input type="text" size="6" maxlength="5" id="port" name="port" title="Access Port Number" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext" /> - </div> - <div id="reachField" class="rowItem"> - <label for="reachableBy" accesskey="r"> + <input type="text" size="6" maxlength="5" name="port" title="Access Port Number" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="required" /> + </td> + <% - if ("streamrclient".equals(tunnelType)) { - out.write("Host:"); + if ("streamrclient".equals(tunnelType)) { %> + <td> + <b><%=intl._t("Host")%>:</b> + <% String targetHost = editBean.getTargetHost(curTunnel); if (targetHost == null || "".equals(targetHost.trim())) { - out.write(" <font color=\"red\">("); + out.write(" <span class=\"required\"><font color=\"red\">("); out.write(intl._t("required")); - out.write(")</font>"); + out.write(")</font></span>"); } %> - </label> - <input type="text" size="20" id="targetHost" name="targetHost" title="Target Hostname or IP" value="<%=targetHost%>" class="freetext" /> + + <input type="text" size="20" id="targetHost" name="targetHost" title="Target Hostname or IP" value="<%=targetHost%>" class="freetext host" placeholder="required" /> + </td> <% } else { %> - <%=intl._t("Reachable by")%>(<span class="accessKey">R</span>): - </label> + + <td> + <b><%=intl._t("Reachable by")%>:</b> + <select id="reachableBy" name="reachableBy" title="IP for Client Access" class="selectbox"> <% String clientInterface = editBean.getClientInterface(curTunnel); @@ -158,110 +173,152 @@ input.default { width: 1px; height: 1px; visibility: hidden; } } %> </select> + </td> <% } /* streamrclient */ %> - </div> + </tr> + <% if ("client".equals(tunnelType) || "ircclient".equals(tunnelType)) { - %><div id="portField" class="rowItem"> - <label> + %> + <tr> + <th colspan="2"> <%=intl._t("Use SSL?")%> - </label> - <input value="1" type="checkbox" id="startOnLoad" name="useSSL" title="Clients use SSL to connect" <%=(editBean.isSSLEnabled(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + </th> + </tr> + <tr> + <td colspan="2"> + <input value="1" type="checkbox" name="useSSL" title="Clients use SSL to connect" <%=(editBean.isSSLEnabled(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Clients use SSL to connect to tunnel")%> + </td> + </tr> <% } /* tunnel types */ %> - <div class="subdivider"> - <hr /> - </div> - <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { - %><div id="destinationField" class="rowItem"> - <label for="proxyList" accesskey="x"> - <%=intl._t("Outproxies")%>(<span class="accessKey">x</span>): - </label> - <input type="text" size="30" id="proxyList" name="proxyList" title="List of Outproxy I2P destinations" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext" /> - </div> + %> + <tr> + <th colspan="2"> + <%=intl._t("Outproxies")%> + </th> + </tr> + <tr> + <td colspan="2"> + <input type="text" size="30" name="proxyList" title="List of Outproxy I2P destinations" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext proxyList" /> (<%=intl._t("comma separated eg. proxy1.i2p,proxy2.i2p")%>) + </td> + </tr> + <% if ("httpclient".equals(tunnelType)) { - %><div id="destinationField" class="rowItem"> - <label> - <%=intl._t("SSL Outproxies")%>: - </label> - <input type="text" size="30" id="sslProxyList" name="sslProxies" title="List of Outproxy I2P destinations" value="<%=editBean.getSslProxies(curTunnel)%>" class="freetext" /> - </div> + %> + <tr> + <th colspan="2"> + <%=intl._t("SSL Outproxies")%> + </th> + </tr> + <tr> + <td colspan="2"> + <input type="text" size="30" name="sslProxies" title="List of Outproxy I2P destinations" value="<%=editBean.getSslProxies(curTunnel)%>" class="freetext proxyList" /> + </td> + </tr> + <% } // httpclient %> - <div id="startupField" class="rowItem"> - <label> - <%=intl._t("Use Outproxy Plugin")%>: - </label> - <input value="1" type="checkbox" id="shared" name="useOutproxyPlugin" title="Use plugin instead of above-listed proxies if available"<%=(editBean.getUseOutproxyPlugin(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - <span class="comment"><%=intl._t("(Check the Box for 'YES')")%></span> - </div> + <tr> + <th colspan="2"> + <%=intl._t("Use Outproxy Plugin")%> + + </th> + </tr> + <tr> + <td colspan="2"> + + <input value="1" type="checkbox" name="useOutproxyPlugin" <%=(editBean.getUseOutproxyPlugin(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> +<%=intl._t("Use plugin instead of above-listed proxies if available")%> + </td> + </tr> <% } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { - %><div id="destinationField" class="rowItem"> - <label for="targetDestination" accesskey="T"> - <%=intl._t("Tunnel Destination")%>(<span class="accessKey">T</span>): + %> + <tr> + <th colspan="2"> + <%=intl._t("Tunnel Destination")%> + </th> + </tr> + <tr> + <td colspan="2"> <% String value2 = editBean.getClientDestination(curTunnel); if (value2 == null || "".equals(value2.trim())) { - out.write(" <font color=\"red\">("); + out.write(" <span class=\"required\"><font color=\"red\">("); out.write(intl._t("required")); - out.write(")</font>"); + out.write(")</font></span>"); } %> - </label> - <input type="text" size="30" id="targetDestination" name="targetDestination" title="Destination of the Tunnel" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext" /> - <span class="comment">(<%=intl._t("name, name:port, or destination")%> + + <input type="text" size="30" id="targetDestination" name="targetDestination" title="Destination of the Tunnel" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext destination" placeholder="required" /> + (<%=intl._t("name, name:port, or destination")%> <% if ("streamrclient".equals(tunnelType)) { /* deferred resolution unimplemented in streamr client */ %> - <%=intl._t("b32 not recommended")%> <% } %> ) - </span> - </div> + </td> + </tr> + <% } %> + <% if (!"streamrclient".equals(tunnelType)) { %> - <div id="sharedtField" class="rowItem"> - <label for="shared" accesskey="h"> - <%=intl._t("Shared Client")%>(<span class="accessKey">h</span>): - </label> - <input value="true" type="checkbox" id="shared" name="shared" title="Share tunnels with other clients"<%=(editBean.isSharedClient(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - <span class="comment"><%=intl._t("(Share tunnels with other clients and irc/httpclients? Change requires restart of client proxy)")%></span> - </div> + <tr> + <th colspan="2"> + <%=intl._t("Shared Client")%> + </th> + </tr> + <tr> + <td colspan="2"> + <input value="true" type="checkbox" name="shared" title="Share tunnels with other clients"<%=(editBean.isSharedClient(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Share tunnels with other clients and irc/httpclients? (Change requires restart of client proxy tunnel)")%> + </td> + </tr> + <% } // !streamrclient %> - <div id="startupField" class="rowItem"> - <label for="startOnLoad" accesskey="a"> - <%=intl._t("Auto Start")%>(<span class="accessKey">A</span>): - </label> - <input value="1" type="checkbox" id="startOnLoad" name="startOnLoad" title="Start Tunnel Automatically"<%=(editBean.startAutomatically(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - <span class="comment"><%=intl._t("(Check the Box for 'YES')")%></span> - </div> + <% if ("ircclient".equals(tunnelType)) { %> - <div id="startupField" class="rowItem"> - <label for="dcc" accesskey="d"> - <%=intl._t("Enable DCC")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="DCC" title="Enable DCC"<%=(editBean.getDCC(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - <span class="comment"><%=intl._t("(Check the Box for 'YES')")%></span> - </div> + <tr> + <th colspan="2"> + <%=intl._t("Enable DCC")%> + </th> + </tr> + <tr> + <td colspan="2"> + <input value="1" type="checkbox" name="DCC" title="Enable DCC"<%=(editBean.getDCC(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Enable Direct Client-to-Client protocol. Note that this will compromise your anonymity and is <i>not</i> recommended.")%> + </td> + </tr> + <% } // ircclient %> - - <div class="footer"> - </div> - </div> - - <div id="tunnelAdvancedNetworking" class="panel"> - <div class="header"> - <h4><%=intl._t("Advanced networking options")%></h4><br /> - <span class="comment"><%=intl._t("(NOTE: when this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!)")%></span> - </div> - - <div class="separator"> - <hr /> - </div> - - <div id="tunnelOptionsField" class="rowItem"> - <label><%=intl._t("Tunnel Options")%>:</label> - </div> - <div id="depthField" class="rowItem"> - <label for="tunnelDepth" accesskey="t"> - <%=intl._t("Length")%>(<span class="accessKey">t</span>): - </label> + </table> + + <h3><%=intl._t("Advanced Networking Options")%></h3> + + <table class="tunnelConfig"> + + +<% if (!"streamrclient".equals(tunnelType)) { %> <% // no shared client tunnels for streamr %> + <tr> + <td class="infohelp" colspan="2"> + <%=intl._t("Note: When this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!")%> + </td> + </tr> + <% } // !streamrclient %> + <tr> + <th colspan="2"> + <%=intl._t("Tunnel Options")%> + </th> + </tr> + <tr> + <td> + <b><%=intl._t("Length")%></b> + </td> + + <td> + <b><%=intl._t("Variance")%></b> + </td> + </tr> + + <tr> + <td> <select id="tunnelDepth" name="tunnelDepth" title="Length of each Tunnel" class="selectbox"> <% int tunnelDepth = editBean.getTunnelDepth(curTunnel, 3); %><option value="0"<%=(tunnelDepth == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop tunnel (no anonymity)")%></option> @@ -277,11 +334,9 @@ input.default { width: 1px; height: 1px; visibility: hidden; } %> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> <%=intl._t("hop tunnel (very poor performance)")%></option> <% } %></select> - </div> - <div id="varianceField" class="rowItem"> - <label for="tunnelVariance" accesskey="v"> - <%=intl._t("Variance")%>(<span class="accessKey">V</span>): - </label> + </td> + + <td> <select id="tunnelVariance" name="tunnelVariance" title="Level of Randomization for Tunnel Length" class="selectbox"> <% int tunnelVariance = editBean.getTunnelVariance(curTunnel, 0); %><option value="0"<%=(tunnelVariance == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop variance (no randomisation, consistant performance)")%></option> @@ -292,20 +347,27 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if (tunnelVariance > 2 || tunnelVariance < -2) { %> <option value="<%=tunnelVariance%>" selected="selected"><%= (tunnelVariance > 2 ? "+ " : "+/- ") %>0-<%=tunnelVariance%> <%=intl._t("hop variance")%></option> <% } - %></select> - </div> - <div id="countField" class="rowItem"> - <label for="tunnelQuantity" accesskey="C"> - <%=intl._t("Count")%>(<span class="accessKey">C</span>): - </label> + %></select> + </td> + </tr> + <tr> + <td> + <b><%=intl._t("Count")%></b> + </td> + + <td> + <b><%=intl._t("Backup Count")%></b> + </td> + </tr> + + <tr> + <td> <select id="tunnelQuantity" name="tunnelQuantity" title="Number of Tunnels in Group" class="selectbox"> <%=editBean.getQuantityOptions(curTunnel)%> - </select> - </div> - <div id="backupField" class="rowItem"> - <label for="tunnelBackupQuantity" accesskey="b"> - <%=intl._t("Backup Count")%>(<span class="accessKey">B</span>): - </label> + </select> + </td> + + <td> <select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="Number of Reserve Tunnels" class="selectbox"> <% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0); %><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 backup tunnels (0 redundancy, no added resource usage)")%></option> @@ -315,343 +377,356 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if (tunnelBackupQuantity > 3) { %> <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> <%=intl._t("backup tunnels")%></option> <% } - %></select> - </div> + %></select> + </td> + </tr> - <div class="subdivider"> - <hr /> - </div> <% if (!"streamrclient".equals(tunnelType)) { %> - <div id="profileField" class="rowItem"> - <label for="profile" accesskey="f"> - <%=intl._t("Profile")%>(<span class="accessKey">f</span>): - </label> - <select id="profile" name="profile" title="Connection Profile" class="selectbox"> + <tr> + <th> + <%=intl._t("Profile")%> + </th> + + <th> + <%=intl._t("Delay Connect")%> + </th> + + </tr> + + <tr> + <td> + <select id="connectionProfile" name="profile" title="Connection Profile" class="selectbox"> <% boolean interactiveProfile = editBean.isInteractive(curTunnel); %><option <%=(interactiveProfile == true ? "selected=\"selected\" " : "")%>value="interactive"><%=intl._t("interactive connection")%> </option> <option <%=(interactiveProfile == false ? "selected=\"selected\" " : "")%>value="bulk"><%=intl._t("bulk connection (downloads/websites/BT)")%> </option> </select> - </div> - <div id="delayConnectField" class="rowItem"> - <label for="connectDelay" accesskey="y"> - <%=intl._t("Delay Connect")%>(<span class="accessKey">y</span>): - </label> - <input value="1000" type="checkbox" id="connectDelay" name="connectDelay" title="Delay Connection"<%=(editBean.shouldDelay(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - <span class="comment">(<%=intl._t("for request/response connections")%>)</span> - </div> - - <div class="subdivider"> - <hr /> - </div> + </td> + + <td> + <input value="1000" type="checkbox" name="connectDelay" title="Delay Connection"<%=(editBean.shouldDelay(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + (<%=intl._t("for request/response connections")%>) + </td> + </tr> <% } // !streamrclient %> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Router I2CP Address")%>:</label> - </div> - <div id="optionsHostField" class="rowItem"> - <label for="clientHost" accesskey="o"> - <%=intl._t("Host")%>(<span class="accessKey">o</span>): - </label> - <input type="text" id="clientHost" name="clientHost" size="20" title="I2CP Hostname or IP" value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> - </div> - <div id="optionsPortField" class="rowItem"> - <label for="clientPort" accesskey="r"> - <%=intl._t("Port")%>(<span class="accessKey">r</span>): - </label> - <input type="text" id="clientPort" name="clientport" size="20" title="I2CP Port Number" value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> - </div> + <tr> + <th colspan="2"> + <%=intl._t("Router I2CP Address")%> + </th> + </tr> + + <tr> + <td> + <b><%=intl._t("Host")%>:</b> + <input type="text" name="clientHost" size="20" title="I2CP Hostname or IP" value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext host" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> + </td> + + + <td> + <b><%=intl._t("Port")%>:</b> + <input type="text" name="clientport" size="20" title="I2CP Port Number" value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext port" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> + </td> + </tr> <% if (!"streamrclient".equals(tunnelType)) { // streamr client sends pings so it will never be idle %> - <div class="subdivider"> - <hr /> - </div> - - <div id="optionsField" class="rowItem"> - <label for="reduce" accesskey="c"> - <%=intl._t("Delay tunnel open until required")%>(<span class="accessKey">D</span>): - </label> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="c"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="delayOpen" title="Delay Tunnel Open"<%=(editBean.getDelayOpen(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + + <tr> + <th colspan="2"> + <%=intl._t("Delay tunnel open until required")%> + </th> + </tr> + + <tr> + <td colspan="2"> + <input value="1" type="checkbox" name="delayOpen" title="Delay Tunnel Open"<%=(editBean.getDelayOpen(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Delay opening client tunnel until activity is detected on the configured tunnel port")%> + </td> + </tr> + <% } // !streamrclient %> - <div class="subdivider"> - <hr /> - </div> - - <div id="optionsField" class="rowItem"> - <label for="reduce" accesskey="d"> - <%=intl._t("Reduce tunnel quantity when idle")%>(<span class="accessKey">d</span>): - </label> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="d"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="reduce" title="Reduce Tunnels"<%=(editBean.getReduce(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - <div id="portField" class="rowItem"> - <label for="reduceCount" accesskey="d"> - <%=intl._t("Reduced tunnel count")%>: - </label> - <input type="text" id="port" name="reduceCount" size="1" maxlength="1" title="Reduced Tunnel Count" value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <label for="reduceTime" accesskey="d"> - <%=intl._t("Idle minutes")%>: - </label> - <input type="text" id="port" name="reduceTime" size="4" maxlength="4" title="Reduced Tunnel Idle Time" value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext" /> - </div> - - <div class="subdivider"> - <hr /> - </div> - - <div id="optionsField" class="rowItem"> - <label for="reduce" accesskey="c"> - <%=intl._t("Close tunnels when idle")%>(<span class="accessKey">C</span>): - </label> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="c"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="close" title="Close Tunnels"<%=(editBean.getClose(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="c"> - <%=intl._t("New Keys on Reopen")%>: - </label> - <table border="0"><tr><!-- I give up --> - <td><input value="1" type="radio" id="startOnLoad" name="newDest" title="New Destination" - <%=(editBean.getNewDest(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /></td> - <td><%=intl._t("Enable")%></td> - <td><input value="0" type="radio" id="startOnLoad" name="newDest" title="New Destination" - <%=(editBean.getNewDest(curTunnel) || editBean.getPersistentClientKey(curTunnel) ? "" : " checked=\"checked\"")%> class="tickbox" /></td> - <td><%=intl._t("Disable")%></td></tr> - </table> - </div> - <div id="portField" class="rowItem"> - <label for="reduceTime" accesskey="c"> - <%=intl._t("Idle minutes")%>: - </label> - <input type="text" id="port" name="closeTime" size="4" maxlength="4" title="Close Tunnel Idle Time" value="<%=editBean.getCloseTime(curTunnel)%>" class="freetext" /> - </div> - - <div class="subdivider"> - <hr /> - </div> + <tr> + <th colspan="2"> + <%=intl._t("Reduce tunnel quantity when idle")%> + </th> + </tr> + + <tr> + <td colspan="2"> + <input value="1" type="checkbox" name="reduce" title="Reduce Tunnels"<%=(editBean.getReduce(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Reduce tunnel quantity when idle to conserve resources")%> + </td> + </tr> + + <tr> + <td> + <b><%=intl._t("Reduced tunnel count")%>:</b> + <input type="text" id="reducedTunnelCount" name="reduceCount" size="1" maxlength="1" title="Reduced Tunnel Count" value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext quantity" /> + </td> + + <td> + <b><%=intl._t("Idle period")%>:</b> + <input type="text" name="reduceTime" size="4" maxlength="4" title="Reduced Tunnel Idle Time" value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext period" /> + minutes + </td> + </tr> + + <tr> + <th colspan="2"> + <%=intl._t("Close tunnels when idle")%> + </th> + </tr> + + <tr> + <td> + <input value="1" type="checkbox" name="close" title="Close Tunnels"<%=(editBean.getClose(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Close client tunnels after specified idle period")%> + </td> + + <td> + <b><%=intl._t("Idle period")%>:</b> + <input type="text" name="closeTime" size="4" maxlength="4" title="Close Tunnel Idle Time" value="<%=editBean.getCloseTime(curTunnel)%>" class="freetext period" /> + minutes + </td> + </tr> + + <tr> + <td colspan="2"> + <b><%=intl._t("New Keys on Reopen")%>:</b> + <input value="1" type="radio" name="newDest" title="New Destination" + <%=(editBean.getNewDest(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Enable")%> + <input value="0" type="radio" name="newDest" title="New Destination" + <%=(editBean.getNewDest(curTunnel) || editBean.getPersistentClientKey(curTunnel) ? "" : " checked=\"checked\"")%> class="tickbox" /> + <%=intl._t("Disable")%> + </td> + </tr> <% if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "socksirctunnel".equals(tunnelType) || "sockstunnel".equals(tunnelType)) { %> - <div id="optionsField" class="rowItem"> - <label for="privKeyFile" accesskey="k"> - <%=intl._t("Persistent private key")%>(<span class="accessKey">k</span>): - </label> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Enable")%>:</label> - <input value="2" type="radio" id="startOnLoad" name="newDest" title="New Destination" - <%=(editBean.getPersistentClientKey(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - <div id="reachField" class="rowItem"> - <label><%=intl._t("File")%>:</label> - <input type="text" size="30" id="clientHost" name="privKeyFile" title="Path to Private Key File" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" /> - </div> + + <tr> + <th colspan="2"> + <%=intl._t("Persistent private key")%> + </th> + </tr> + <tr> + <td> + <input value="2" type="radio" name="newDest" title="New Destination" + <%=(editBean.getPersistentClientKey(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Generate key to enable persistent client tunnel identity")%> + </td> + <td> + <b><%=intl._t("File")%>:</b> + <input type="text" size="30" id="privKeyFile" name="privKeyFile" title="Path to Private Key File" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" /> + </td> + </tr> <% String destb64 = editBean.getDestinationBase64(curTunnel); if (destb64.length() > 0) { - %> <div id="destinationField" class="rowItem"> - <label for="localDestination" accesskey="L"> - <%=intl._t("Local destination")%>(<span class="accessKey">L</span>): - </label> - <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" wrap="off" spellcheck="false"><%=destb64%></textarea> - </div> - <div id="destinationField" class="rowItem"> - <label><%=intl._t("Local Base 32")%>:</label> - <%=editBean.getDestHashBase32(curTunnel)%> - </div> - <% } // if destb64 %> + %> - <div class="subdivider"> - <hr /> - </div> + <tr> + <td colspan="2"> + <b><%=intl._t("Local destination")%></b> + </td> + </tr> + <tr> + <td colspan="2"> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" wrap="off" spellcheck="false"><%=destb64%></textarea> + </td> + </tr> + + <tr> + <td colspan="2"> + <b><%=intl._t("Local Base 32")%>:</b> + <%=editBean.getDestHashBase32(curTunnel)%> + </td> + </tr> + <% } // if destb64 %> <% } %> <% if ("httpclient".equals(tunnelType)) { %> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Pass User-Agent header through")%>:</label> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Enable")%>:</label> - <input value="1" type="checkbox" id="startOnLoad" name="allowUserAgent" title="Do not spoof user agent string when checked"<%=(editBean.getAllowUserAgent(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div><br /> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Pass Referer header through")%>:</label> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Enable")%>:</label> - <input value="1" type="checkbox" id="startOnLoad" name="allowReferer" title="Do not block referer header when checked"<%=(editBean.getAllowReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div><br /> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Pass Accept headers through")%>:</label> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Enable")%>:</label> - <input value="1" type="checkbox" id="startOnLoad" name="allowAccept" title="Do not block accept headers when checked"<%=(editBean.getAllowAccept(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div><br /> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Allow SSL to I2P addresses")%>:</label> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Enable")%>:</label> - <input value="1" type="checkbox" id="startOnLoad" name="allowInternalSSL" title="Allow SSL to I2P addresses when checked"<%=(editBean.getAllowInternalSSL(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - <div class="subdivider"> - <hr /> - </div> + + <tr> + <th colspan="2"> + <%=intl._t("HTTP Filtering")%> + </th> + </tr> + + <tr> + <td> + <input value="1" type="checkbox" name="allowUserAgent" title="Do not spoof user agent string when checked"<%=(editBean.getAllowUserAgent(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Do not spoof User-Agent header")%> + </td> + <td> + <input value="1" type="checkbox" name="allowReferer" title="Do not block referer header when checked"<%=(editBean.getAllowReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Do not block Referer header")%> + </td> + </tr> + + <tr> + <td> + <input value="1" type="checkbox" name="allowAccept" title="Do not block accept headers when checked"<%=(editBean.getAllowAccept(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> +<%=intl._t("Do not block Accept headers")%> + </td> + + <td> + <input value="1" type="checkbox" name="allowInternalSSL" title="Allow SSL to I2P addresses when checked"<%=(editBean.getAllowInternalSSL(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Allow SSL to I2P addresses")%> + </td> + </tr> <% } // if httpclient %> - + <% if (true /* editBean.isAdvanced() */ ) { int currentSigType = editBean.getSigType(curTunnel, tunnelType); %> - <div id="tunnelOptionsField" class="rowItem"> - <label> - <%=intl._t("Signature type")%> - (<%=intl._t("Experts only!")%>) - </label> - </div> - <div id="hostField" class="rowItem"> - <div id="portField" class="rowItem"> - <label>DSA-SHA1</label> - <input value="0" type="radio" id="startOnLoad" name="sigType" title="Default"<%=(currentSigType==0 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + <tr> + <th colspan="2"> + <%=intl._t("Signature type")%> (<%=intl._t("Experts only!")%>) + </th> + </tr> + + <tr> + <td colspan="2"> + <span class="multiOption"> + <input value="0" type="radio" name="sigType" title="Default"<%=(currentSigType==0 ? " checked=\"checked\"" : "")%> class="tickbox" /> + DSA-SHA1 + </span> + + <% if (editBean.isSigTypeAvailable(1)) { %> - <div id="portField" class="rowItem"> - <label>ECDSA-P256</label> - <input value="1" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==1 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + + <span class="multiOption"> + <input value="1" type="radio" name="sigType" title="Advanced users only"<%=(currentSigType==1 ? " checked=\"checked\"" : "")%> class="tickbox" /> + ECDSA-P256 + </span> + + <% } + if (editBean.isSigTypeAvailable(2)) { %> - <div id="portField" class="rowItem"> - <label>ECDSA-P384</label> - <input value="2" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + + <span class="multiOption"> + <input value="2" type="radio" name="sigType" title="Advanced users only"<%=(currentSigType==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> + ECDSA-P384 + </span> + <% } if (editBean.isSigTypeAvailable(3)) { %> - <div id="portField" class="rowItem"> - <label>ECDSA-P521</label> - <input value="3" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==3 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + + <span class="multiOption"> + <input value="3" type="radio" name="sigType" title="Advanced users only"<%=(currentSigType==3 ? " checked=\"checked\"" : "")%> class="tickbox" /> + ECDSA-P521 + </span> + + <% } if (editBean.isSigTypeAvailable(7)) { %> - <div id="portField" class="rowItem"> - <label>Ed25519-SHA-512</label> - <input value="7" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==7 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + + <span class="multiOption"> + <input value="7" type="radio" name="sigType" title="Advanced users only"<%=(currentSigType==7 ? " checked=\"checked\"" : "")%> class="tickbox" /> + Ed25519-SHA-512 + </span> + </td> + </tr> <% } // isAvailable %> - </div> - - <div class="subdivider"> - <hr /> - </div> + <% } // isAdvanced %> <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %> - <div id="accessField" class="rowItem"> - <label><%=intl._t("Local Authorization")%>:</label> - </div> - <div id="portField" class="rowItem"> - <label> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="proxyAuth" title="Check to require authorization for this service"<%=(editBean.getProxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - <div id="portField" class="rowItem"> - <label> - <%=intl._t("Username")%>: - </label> - <input type="text" id="clientPort" name="proxyUsername" title="Set username for this service" value="" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <label> - <%=intl._t("Password")%>: - </label> - <input type="password" id="clientPort" name="nofilter_proxyPassword" title="Set password for this service" value="" class="freetext" /> - </div> - <div class="subdivider"> - <hr /> - </div> - <div id="accessField" class="rowItem"> - <label><%=intl._t("Outproxy Authorization")%>:</label> - </div> - <div id="portField" class="rowItem"> - <label> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="outproxyAuth" title="Check if the outproxy requires authorization"<%=(editBean.getOutproxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - <div id="portField" class="rowItem"> - <label> - <%=intl._t("Username")%>: - </label> - <input type="text" id="clientPort" name="outproxyUsername" title="Enter username required by outproxy" value="<%=editBean.getOutproxyUsername(curTunnel)%>" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <label> - <%=intl._t("Password")%>: - </label> - <input type="password" id="clientPort" name="nofilter_outproxyPassword" title="Enter password required by outproxy" value="<%=editBean.getOutproxyPassword(curTunnel)%>" class="freetext" /> - </div> - <div class="subdivider"> - <hr /> - </div> + <tr> + <th colspan="2"> + <%=intl._t("Local Authorization")%> + </th> + </tr> + <tr> + <td colspan="2"> + <input value="1" type="checkbox" name="proxyAuth" title="Check to require authorization for this service"<%=(editBean.getProxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Require local authorization for this service")%> + </td> + </tr> + + <tr> + <td> + <b><%=intl._t("Username")%>:</b> + <input type="text" name="proxyUsername" title="Set username for this service" value="" class="freetext username" /> + </td> + <td> + <b><%=intl._t("Password")%>:</b> + <input type="password" name="nofilter_proxyPassword" title="Set password for this service" value="" class="freetext password" /> + </td> + </tr> + + <tr> + <th colspan="2"> + <%=intl._t("Outproxy Authorization")%> + </th> + </tr> + <tr> + <td colspan="2"> + <input value="1" type="checkbox" id="startOnLoad" name="outproxyAuth" title="Check if the outproxy requires authorization"<%=(editBean.getOutproxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Outproxy requires authorization")%> + </td> + </tr> + + <tr> + <td> + <b><%=intl._t("Username")%>:</b> + <input type="text" name="outproxyUsername" title="Enter username required by outproxy" value="<%=editBean.getOutproxyUsername(curTunnel)%>" class="freetext username" /> + </td> + + <td> + <b><%=intl._t("Password")%>:</b> + <input type="password" name="nofilter_outproxyPassword" title="Enter password required by outproxy" value="<%=editBean.getOutproxyPassword(curTunnel)%>" class="freetext password" /> + </td> + </tr> + <% } // httpclient || connect || socks || socksirc %> <% if ("httpclient".equals(tunnelType)) { %> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Jump URL List")%>:</label> - </div> - <div id="hostField" class="rowItem"> - <textarea rows="2" style="height: 8em;" cols="60" id="hostField" name="jumpList" title="List of helper URLs to offer when a host is not found in your addressbook" wrap="off" spellcheck="false"><%=editBean.getJumpList(curTunnel)%></textarea> - </div> - <div class="subdivider"> - <hr /> - </div> + + <tr> + <th colspan="2"> + <%=intl._t("Jump URL List")%> + </th> + </tr> + <tr> + <td colspan="2"> + <textarea rows="2" style="height: 8em;" cols="60" id="hostField" name="jumpList" title="List of helper URLs to offer when a host is not found in your addressbook" wrap="off" spellcheck="false"><%=editBean.getJumpList(curTunnel)%></textarea> + </td> + </tr> + <% } // httpclient %> - <div id="customOptionsField" class="rowItem"> - <label for="customOptions" accesskey="u"> - <%=intl._t("Custom options")%>(<span class="accessKey">u</span>): - </label> - <input type="text" id="customOptions" name="nofilter_customOptions" size="60" title="Custom Options" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" spellcheck="false"/> - </div> - - <div class="footer"> - </div> - </div> - <div id="globalOperationsPanel" class="panel"> - <div class="header"></div> - <div class="footer"> - <div class="toolbox"> + <tr> + <th colspan="2"> + <%=intl._t("Custom options")%> + </th> + </tr> + + <tr> + <td colspan="2"> + <input type="text" id="customOptions" name="nofilter_customOptions" size="60" title="Custom Options" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" spellcheck="false"/> + </td> + </tr> + + <tr> + <td class="buttons" colspan="2"> <input type="hidden" value="true" name="removeConfirm" /> <button id="controlCancel" class="control" type="submit" name="action" value="" title="Cancel"><%=intl._t("Cancel")%></button> - <button id="controlDelete" <%=(editBean.allowJS() ? "onclick=\"if (!confirm('Are you sure you want to delete?')) { return false; }\" " : "")%>accesskey="D" class="control" type="submit" name="action" value="Delete this proxy" title="Delete this Proxy"><%=intl._t("Delete")%>(<span class="accessKey">D</span>)</button> - <button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Save changes" title="Save Changes"><%=intl._t("Save")%>(<span class="accessKey">S</span>)</button> - </div> - </div> - </div> - </form> - <div id="pageFooter"> - </div> + <button id="controlDelete" <%=(editBean.allowJS() ? "onclick=\"if (!confirm('Are you sure you want to delete?')) { return false; }\" " : "")%>accesskey="D" class="control" type="submit" name="action" value="Delete this proxy" title="Delete this Proxy"><%=intl._t("Delete")%></button> + <button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Save changes" title="Save Changes"><%=intl._t("Save")%></button> + </td> + </tr> + </table> +</div> +</form> + <% } else { - %>Tunnels are not initialized yet, please reload in two minutes.<% + %><div id="notReady"><%=intl._t("Tunnels are not initialized yet, please reload in two minutes.")%></div><% } // isInitialized() %> diff --git a/apps/i2ptunnel/jsp/editServer.jsp b/apps/i2ptunnel/jsp/editServer.jsp index fe31926e06..c8153b688d 100644 --- a/apps/i2ptunnel/jsp/editServer.jsp +++ b/apps/i2ptunnel/jsp/editServer.jsp @@ -23,8 +23,7 @@ <% if (editBean.allowCSS()) { %><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" /> - <link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> - <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> + <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> <% } %> <style type='text/css'> @@ -32,8 +31,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; } </style> </head> <body id="tunnelEditPage"> - <div id="pageHeader"> - </div> + <% if (editBean.isInitialized()) { @@ -41,19 +39,19 @@ input.default { width: 1px; height: 1px; visibility: hidden; } %> <form method="post" action="list"> - <div id="tunnelEditPanel" class="panel"> - <div class="header"> +<div class="panel"> + <% String tunnelTypeName; String tunnelType; if (curTunnel >= 0) { tunnelTypeName = editBean.getTunnelType(curTunnel); tunnelType = editBean.getInternalType(curTunnel); - %><h4><%=intl._t("Edit server settings")%></h4><% + %><h2><%=intl._t("Edit Server Settings")%> (<%=editBean.getTunnelName(curTunnel)%>)</h2><% } else { tunnelTypeName = editBean.getTypeName(request.getParameter("type")); tunnelType = net.i2p.data.DataHelper.stripHTML(request.getParameter("type")); - %><h4><%=intl._t("New server settings")%></h4><% + %><h2><%=intl._t("New Server Settings")%></h2><% } %> <input type="hidden" name="tunnel" value="<%=curTunnel%>" /> <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" /> @@ -79,103 +77,115 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <input type="hidden" name="key4" value="<%=key%>" /> <% } %> <input type="submit" class="default" name="action" value="Save changes" /> - </div> - - <div class="separator"> - <hr /> - </div> - <div id="nameField" class="rowItem"> - <label for="name" accesskey="N"> - <%=intl._t("Name")%>(<span class="accessKey">N</span>): - </label> - <input type="text" size="30" maxlength="50" name="name" id="name" title="Tunnel Name" value="<%=editBean.getTunnelName(curTunnel)%>" class="freetext" /> - </div> - <div id="typeField" class="rowItem"> - <label><%=intl._t("Type")%>:</label> - <span class="text"><%=tunnelTypeName%></span> - </div> - <div id="descriptionField" class="rowItem"> - <label for="description" accesskey="e"> - <%=intl._t("Description")%>(<span class="accessKey">e</span>): - </label> - <input type="text" size="60" maxlength="80" name="nofilter_description" id="description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext" /> - </div> - <div id="startupField" class="rowItem"> - <label for="startOnLoad" accesskey="a"> - <%=intl._t("Auto Start")%>(<span class="accessKey">A</span>): - </label> - <input value="1" type="checkbox" id="startOnLoad" name="startOnLoad" title="Start Tunnel Automatically"<%=(editBean.startAutomatically(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - <span class="comment"><%=intl._t("(Check the Box for 'YES')")%></span> - </div> - - <div class="subdivider"> - <hr /> - </div> - - <div id="targetField" class="rowItem"> + <table id="serverTunnelEdit" class="tunnelConfig"> + <tr> + <th> + <%=intl._t("Name")%> + </th> + <th> + <%=intl._t("Type")%> + </th> + </tr> + + <tr> + <td> + <input type="text" size="30" maxlength="50" name="name" title="Tunnel Name" value="<%=editBean.getTunnelName(curTunnel)%>" class="freetext tunnelName" /> + </td> + <td> + <%=tunnelTypeName%> + </td> + </tr> + + <tr> + <th> + <%=intl._t("Description")%> + </th> + + <th> + <%=intl._t("Auto Start Tunnel")%> + </th> + </tr> + + <tr> + <td> + <input type="text" size="60" maxlength="80" name="nofilter_description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext tunnelDescription" /> + </td> + + <td> + <input value="1" type="checkbox" name="startOnLoad" title="Start Tunnel Automatically"<%=(editBean.startAutomatically(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Automatically start tunnel when router starts")%> + </td> + </tr> + + <tr> + <th colspan="2"> <% if ("streamrserver".equals(tunnelType)) { %> - <label><%=intl._t("Access Point")%>:</label> + <%=intl._t("Access Point")%> <% } else { %> - <label><%=intl._t("Target")%>:</label> + <%=intl._t("Target")%> <% } %> - </div> + </th> + </tr> + + <tr> <% if (!"streamrserver".equals(tunnelType)) { %> - <div id="hostField" class="rowItem"> - <label for="targetHost" accesskey="H"> - <%=intl._t("Host")%>(<span class="accessKey">H</span>): - </label> - <input type="text" size="20" id="targetHost" name="targetHost" title="Target Hostname or IP" value="<%=editBean.getTargetHost(curTunnel)%>" class="freetext" /> - </div> + <td> + <b><%=intl._t("Host")%>:</b> + <input type="text" size="20" name="targetHost" title="Target Hostname or IP" value="<%=editBean.getTargetHost(curTunnel)%>" class="freetext host" /> + </td> <% } /* !streamrserver */ %> - <div id="portField" class="rowItem"> - <label for="targetPort" accesskey="P"> - <%=intl._t("Port")%>(<span class="accessKey">P</span>): + + <td> + <b><%=intl._t("Port")%>:</b> <% String value = editBean.getTargetPort(curTunnel); if (value == null || "".equals(value.trim())) { - out.write(" <font color=\"red\">("); + out.write(" <span class=\"required\"><font color=\"red\">("); out.write(intl._t("required")); - out.write(")</font>"); + out.write(")</font></span>"); } %> - </label> - <input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="Target Port Number" value="<%=editBean.getTargetPort(curTunnel)%>" class="freetext" /> - </div> + <input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="Target Port Number" value="<%=editBean.getTargetPort(curTunnel)%>" class="freetext port" placeholder="required" /> + </td> + <% if (!"streamrserver".equals(tunnelType)) { %> - <div id="portField" class="rowItem"> - <label> - <%=intl._t("Use SSL?")%> - </label> - <input value="1" type="checkbox" id="startOnLoad" name="useSSL" title="Use SSL to connect to target" <%=(editBean.isSSLEnabled(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + </tr> + + <tr> + <td colspan="2"> + <input value="1" type="checkbox" name="useSSL" title="Use SSL to connect to target" <%=(editBean.isSSLEnabled(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Use SSL to connect to target")%> <% } /* !streamrserver */ %> - + </td> <% if ("httpbidirserver".equals(tunnelType)) { %> - <div class="subdivider"> - <hr /> - </div> - <div id="accessField" class="rowItem"> - <label><%=intl._t("Access Point")%>:</label> - </div> - <div id="portField" class="rowItem"> - <label for="port" accesskey="P"> - <span class="accessKey">P</span>ort: + </tr> + + <tr> + <th colspan="2"> + <%=intl._t("Access Point")%> + </th> + </tr> + + <tr> + <td> + <b><%=intl._t("Port")%>:</b> + <% String value4 = editBean.getClientPort(curTunnel); if (value4 == null || "".equals(value4.trim())) { - out.write(" <font color=\"red\">("); + out.write(" <span class=\"required\"><font color=\"red\">("); out.write(intl._t("required")); - out.write(")</font>"); + out.write(")</font></span>"); } %> - </label> - <input type="text" size="6" maxlength="5" id="port" name="port" title="Access Port Number" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext" /> - </div> + + <input type="text" size="6" maxlength="5" name="port" title="Access Port Number" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="required" /> + </td> <% } /* httpbidirserver */ %> <% if ("httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %> - <div id="reachField" class="rowItem"> - <label for="reachableBy" accesskey="r"> - <%=intl._t("Reachable by")%>(<span class="accessKey">R</span>): - </label> + + <td> + <b><%=intl._t("Reachable by")%></b>: + <select id="reachableBy" name="reachableBy" title="IP for Client Access" class="selectbox"> <% String clientInterface = editBean.getClientInterface(curTunnel); @@ -190,43 +200,62 @@ input.default { width: 1px; height: 1px; visibility: hidden; } out.write("</option>\n"); } %> - </select> - </div> + </select> + </td> <% } /* httpbidirserver || streamrserver */ %> + </tr> - <div class="subdivider"> - <hr /> - </div> <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %><div id="websiteField" class="rowItem"> - <label for="spoofedHost" accesskey="W"> - <%=intl._t("Website name")%>(<span class="accessKey">W</span>): - </label> - <input type="text" size="20" id="targetHost" name="spoofedHost" title="Website Host Name" value="<%=editBean.getSpoofedHost(curTunnel)%>" class="freetext" /> - <span class="comment"><%=intl._t("(leave blank for outproxies)")%></span> - </div> + %> + + <tr> + <th> + <%=intl._t("Website Hostname")%> + </th> + <th></th> + </tr> + + <tr> + <td> + <input type="text" size="20" id="websiteName" name="spoofedHost" title="Website Hostname" value="<%=editBean.getSpoofedHost(curTunnel)%>" class="freetext" /> + <%=intl._t("(leave blank for outproxies)")%> + </td> + <td></td> + </tr> <% } - %><div id="privKeyField" class="rowItem"> - <label for="privKeyFile" accesskey="k"> - <%=intl._t("Private key file")%>(<span class="accessKey">k</span>): + %> + + <tr> + <th colspan="2"> + <%=intl._t("Private key file")%> + </th> + </tr> + + <tr> + <td colspan="2"> <% String value3 = editBean.getPrivateKeyFile(curTunnel); if (value3 == null || "".equals(value3.trim())) { - out.write(" <font color=\"red\">("); + out.write(" <span class=\"required\"><font color=\"red\">("); out.write(intl._t("required")); - out.write(")</font>"); + out.write(")</font></span>"); } %> - </label> - <input type="text" size="30" id="privKeyFile" name="privKeyFile" title="Path to Private Key File" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" /> - </div> + <input type="text" size="30" id="privKeyFile" name="privKeyFile" title="Path to Private Key File" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" placeholder="required" /> + </td> + </tr> - <div id="destinationField" class="rowItem"> - <label for="localDestination" accesskey="L"> - <%=intl._t("Local destination")%>(<span class="accessKey">L</span>): - </label> - <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" wrap="off" spellcheck="false"><%=editBean.getDestinationBase64(curTunnel)%></textarea> - </div> + <tr> + <th colspan="2"> + <%=intl._t("Local destination")%> + </th> + </tr> + + <tr> + <td colspan="2"> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" wrap="off" spellcheck="false"><%=editBean.getDestinationBase64(curTunnel)%></textarea> + </td> + </tr> <% /****** @@ -248,7 +277,8 @@ input.default { width: 1px; height: 1px; visibility: hidden; } String b64 = editBean.getDestinationBase64(curTunnel); if (!"".equals(b64)) { %> - <div id="destinationField" class="rowItem"> + <tr> + <% b64 = b64.replace("=", "%3d"); String name = editBean.getSpoofedHost(curTunnel); @@ -256,46 +286,50 @@ input.default { width: 1px; height: 1px; visibility: hidden; } name = editBean.getTunnelName(curTunnel); if (name != null && !name.equals("") && !name.contains(" ") && name.endsWith(".i2p")) { %> - <label> + + <td class="buttons" colspan="2"> <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<%=b64%>" target="_top"><%=intl._t("Generate QR Code")%></a> - </label> <a class="control" href="/susidns/addressbook.jsp?book=private&hostname=<%=name%>&destination=<%=b64%>#add"><%=intl._t("Add to local addressbook")%></a> - - <a class="control" href="register?tunnel=<%=curTunnel%>"><%=intl._t("Registration Authentication")%></a> + <a class="control" href="register?tunnel=<%=curTunnel%>"><%=intl._t("Registration Authentication")%></a> + </td> <% } else { %> - <label> </label> - <span class="comment"><%=intl._t("Set name with .i2p suffix to enable QR code generation")%></span> - <span class="comment"><%=intl._t("Set name with .i2p suffix to enable registration authentication")%></span> + <td class="infohelp" colspan="2"> + <%=intl._t("Note: In order to enable QR code generation or registration authentication, configure the Name field above with .i2p suffix eg. mynewserver.i2p")%> + </td> <% } // name %> - </div> + </tr> + <% } // b64 %> - <div class="footer"> - </div> - </div> + </table> - <div id="tunnelAdvancedNetworking" class="panel"> - <div class="header"> - <h4><%=intl._t("Advanced networking options")%></h4> - </div> + <h3><%=intl._t("Advanced Networking Options")%></h3> - <div class="separator"> - <hr /> - </div> - - <div id="tunnelOptionsField" class="rowItem"> - <label><%=intl._t("Tunnel Options")%>:</label> - </div> - <div id="depthField" class="rowItem"> - <label for="tunnelDepth" accesskey="t"> - <%=intl._t("Length")%>(<span class="accessKey">t</span>): - </label> + <table id="#advancedServerTunnelOptions" class="tunnelConfig"> + <tr> + <th colspan="2"> + <%=intl._t("Tunnel Options")%> + </th> + </tr> + + <tr> + <td> + <b><%=intl._t("Length")%></b> + </td> + + <td> + <b><%=intl._t("Variance")%></b> + </td> + </tr> + + <tr> + <td> <select id="tunnelDepth" name="tunnelDepth" title="Length of each Tunnel" class="selectbox"> <% int tunnelDepth = editBean.getTunnelDepth(curTunnel, 3); %><option value="0"<%=(tunnelDepth == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop tunnel (no anonymity)")%></option> @@ -311,11 +345,9 @@ input.default { width: 1px; height: 1px; visibility: hidden; } %> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> <%=intl._t("hop tunnel (very poor performance)")%></option> <% } %></select> - </div> - <div id="varianceField" class="rowItem"> - <label for="tunnelVariance" accesskey="v"> - <%=intl._t("Variance")%>(<span class="accessKey">V</span>): - </label> + </td> + + <td> <select id="tunnelVariance" name="tunnelVariance" title="Level of Randomization for Tunnel Depth" class="selectbox"> <% int tunnelVariance = editBean.getTunnelVariance(curTunnel, 0); %><option value="0"<%=(tunnelVariance == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 hop variance (no randomisation, consistant performance)")%></option> @@ -326,20 +358,28 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if (tunnelVariance > 2 || tunnelVariance < -2) { %> <option value="<%=tunnelVariance%>" selected="selected"><%= (tunnelVariance > 2 ? "+ " : "+/- ") %>0-<%=tunnelVariance%> <%=intl._t("hop variance")%></option> <% } - %></select> - </div> - <div id="countField" class="rowItem"> - <label for="tunnelQuantity" accesskey="C"> - <%=intl._t("Count")%>(<span class="accessKey">C</span>): - </label> + %></select> + </td> + </tr> + + <tr> + <td> + <b><%=intl._t("Count")%></b> + </td> + + <td> + <b><%=intl._t("Backup Count")%></b> + </td> + </tr> + + <tr> + <td> <select id="tunnelQuantity" name="tunnelQuantity" title="Number of Tunnels in Group" class="selectbox"> <%=editBean.getQuantityOptions(curTunnel)%> - </select> - </div> - <div id="backupField" class="rowItem"> - <label for="tunnelBackupQuantity" accesskey="b"> - <%=intl._t("Backup Count")%>(<span class="accessKey">B</span>): - </label> + </select> + </td> + + <td> <select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="Number of Reserve Tunnels" class="selectbox"> <% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0); %><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>><%=intl._t("0 backup tunnels (0 redundancy, no added resource usage)")%></option> @@ -349,279 +389,309 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if (tunnelBackupQuantity > 3) { %> <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> <%=intl._t("backup tunnels")%></option> <% } - %></select> - </div> - - <div class="subdivider"> - <hr /> - </div> - + %></select> + </td> + </tr> + <% if (!"streamrserver".equals(tunnelType)) { %> - <div id="profileField" class="rowItem"> - <label for="profile" accesskey="f"> - <%=intl._t("Profile")%>(<span class="accessKey">f</span>): - </label> + + <tr> + <th colspan="2"> + <%=intl._t("Profile")%> + </th> + </tr> + + <tr> + <td colspan="2"> <select id="profile" name="profile" title="Connection Profile" class="selectbox"> <% boolean interactiveProfile = editBean.isInteractive(curTunnel); %><option <%=(interactiveProfile == true ? "selected=\"selected\" " : "")%>value="interactive"><%=intl._t("interactive connection")%> </option> <option <%=(interactiveProfile == false ? "selected=\"selected\" " : "")%>value="bulk"><%=intl._t("bulk connection (downloads/websites/BT)")%> </option> - </select> - </div> + </select> + </td> + </tr> - <div class="subdivider"> - <hr /> - </div> <% } /* !streamrserver */ %> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Router I2CP Address")%>:</label> - </div> - <div id="optionsHostField" class="rowItem"> - <label for="clientHost" accesskey="o"> - <%=intl._t("Host")%>(<span class="accessKey">o</span>): - </label> - <input type="text" id="clientHost" name="clientHost" size="20" title="I2CP Hostname or IP" value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> - </div> - <div id="optionsPortField" class="rowItem"> - <label for="clientPort" accesskey="r"> - <%=intl._t("Port")%>(<span class="accessKey">r</span>): - </label> - <input type="text" id="clientPort" name="clientport" size="20" title="I2CP Port Number" value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> - </div> - - <div class="subdivider"> - <hr /> - </div> - - <div id="optionsField" class="rowItem"> - <label for="encrypt" accesskey="e"> - <%=intl._t("Encrypt Leaseset")%>(<span class="accessKey">E</span>): - </label> - </div> - <div id="portField" class="rowItem"> - <label for="encrypt" accesskey="e"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="encrypt" title="ONLY clients with the encryption key will be able to connect"<%=(editBean.getEncrypt(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - <div id="portField" class="rowItem"> - <label for="encrypt" accesskey="e"> - <%=intl._t("Encryption Key")%>: - </label> - <textarea rows="1" style="height: 3em;" cols="44" id="portField" name="encryptKey" title="Encrypt Key" wrap="off" spellcheck="false"><%=editBean.getEncryptKey(curTunnel)%></textarea> - </div> - <div id="portField" class="rowItem"> - <label for="force" accesskey="c"> - <%=intl._t("Generate New Key")%>: - </label> - <button accesskey="S" class="control" type="submit" name="action" value="Generate" title="Generate New Key Now"><%=intl._t("Generate")%></button> - <span class="comment"><%=intl._t("(Tunnel must be stopped first)")%></span> - </div> - - <div class="subdivider"> - <hr /> - </div> - - <div id="optionsField" class="rowItem"> - <label for="access" accesskey="s"> - <%=intl._t("Restricted Access List")%>(<span class="accessKey">s</span>): - </label> - </div> - <div id="portField" class="rowItem"> + <tr> + <th colspan="2"> + <%=intl._t("Router I2CP Address")%> + </th> + </tr> + <tr> + <td> + <b><%=intl._t("Host")%>:</b> + <input type="text" id="clientHost" name="clientHost" size="20" title="I2CP Hostname or IP" value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> + </td> + <td> + <b><%=intl._t("Port")%>:</b> + <input type="text" id="clientPort" name="clientport" size="20" title="I2CP Port Number" value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> + </td> + </tr> + + <tr> + <th colspan="2"> + <%=intl._t("Encrypt Leaseset")%> + </th> + </tr> + + <tr> + <td colspan="2"> + <input value="1" type="checkbox" id="startOnLoad" name="encrypt" title="ONLY clients with the encryption key will be able to connect"<%=(editBean.getEncrypt(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Only allow clients with the encryption key to connect to this server")%> + </td> + </tr> + + <tr> + <td> + <b><%=intl._t("Encryption Key")%></b> + </td> + + <td> + <b><%=intl._t("Generate New Key")%></b> (<%=intl._t("Tunnel must be stopped first")%>) + </td> + </tr> + + <tr> + <td> + <textarea rows="1" style="height: 3em;" cols="44" id="leasesetKey" name="encryptKey" title="Encrypt Key" wrap="off" spellcheck="false"><%=editBean.getEncryptKey(curTunnel)%></textarea> + </td> + + <td> + <button class="control" type="submit" name="action" value="Generate" title="Generate New Key Now"><%=intl._t("Generate")%></button> + </td> + </tr> + + <tr> + <th colspan="2"> + <%=intl._t("Restricted Access List")%> + </th> + </tr> + + <tr> + <td colspan="2"> <% /* can't use <label> here */ %> - <p><input value="0" type="radio" id="startOnLoad" name="accessMode" title="Allow all clients"<%=(editBean.getAccessMode(curTunnel).equals("0") ? " checked=\"checked\"" : "")%> class="tickbox" /> - <b><%=intl._t("Disable")%></b></p> - <p><input value="2" type="radio" id="startOnLoad" name="accessMode" title="Reject listed clients"<%=(editBean.getAccessMode(curTunnel).equals("2") ? " checked=\"checked\"" : "")%> class="tickbox" /> - <b><%=intl._t("Blacklist")%></b></p> - <p><input value="1" type="radio" id="startOnLoad" name="accessMode" title="Allow listed clients only"<%=(editBean.getAccessMode(curTunnel).equals("1") ? " checked=\"checked\"" : "")%> class="tickbox" /> - <b><%=intl._t("Whitelist")%></b></p> - </div> - <div id="accessListField" class="rowItem"> - <label for="accessList" accesskey="s"> - <%=intl._t("Access List")%>: - </label> - <textarea rows="2" style="height: 8em;" cols="60" name="accessList" title="Access List" wrap="off" spellcheck="false"><%=editBean.getAccessList(curTunnel)%></textarea> - </div> - + <span class="multiOption"><input value="0" type="radio" name="accessMode" title="<%=intl._t("Allow all clients")%>"<%=(editBean.getAccessMode(curTunnel).equals("0") ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Disable")%></span> + <span class="multiOption"><input value="2" type="radio" name="accessMode" title="<%=intl._t("Reject listed clients")%>"<%=(editBean.getAccessMode(curTunnel).equals("2") ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Blacklist")%></span> + <span class="multiOption"><input value="1" type="radio" name="accessMode" title="<%=intl._t("Allow listed clients only")%>"<%=(editBean.getAccessMode(curTunnel).equals("1") ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Whitelist")%></span> + </td> + </tr> + + <tr> + <td colspan="2"> + <b><%=intl._t("Access List")%></b> (<%=intl._t("Specify clients, 1 per line")%>) + </td> + </tr> + + <tr> + <td colspan="2"> + <textarea rows="2" style="height: 8em;" cols="60" name="accessList" title="Access List" wrap="off" spellcheck="false"><%=editBean.getAccessList(curTunnel)%></textarea> + </td> + </tr> + + <tr> + <th colspan="2"> + <%=intl._t("Server Access Options")%> + </th> + </tr> + <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %><div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label> - <%=intl._t("Block Access via Inproxies")%>: - </label> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="d"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="rejectInproxy" title="Deny inproxy access when enabled"<%=(editBean.isRejectInproxy(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - </div> - <div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label> - <%=intl._t("Block Accesses containing Referers")%>: - </label> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="d"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="rejectReferer" title="Deny accesseses with referers (probably from inproxies)"<%=(editBean.isRejectReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - </div> - <div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label> - <%=intl._t("Block these User-Agents")%>: - </label> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="d"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="rejectUserAgents" title="Deny User-Agents matching these strings (probably from inproxies)"<%=(editBean.isRejectUserAgents(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - <div id="optionsHostField" class="rowItem"> - <input type="text" id="userAgents" name="userAgents" size="20" title="comma separated, e.g. Mozilla,Opera (case-sensitive)" value="<%=editBean.getUserAgents(curTunnel)%>" class="freetext" /> - </div> - </div> + %> + + <tr> + <td> + <input value="1" type="checkbox" name="rejectInproxy" title="<%=intl._t("Deny inproxy access when enabled")%>" <%=(editBean.isRejectInproxy(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Block Access via Inproxies")%> + </td> + + <td> + <input value="1" type="checkbox" name="rejectReferer" title="<%=intl._t("Deny accesseses with referers (probably from inproxies)")%>" <%=(editBean.isRejectReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Block Accesses containing Referers")%> + </td> + </tr> + + <tr> + <td> + <input value="1" type="checkbox" name="rejectUserAgents" title="<%=intl._t("Deny User-Agents matching these strings (probably from inproxies)")%>" <%=(editBean.isRejectUserAgents(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Block these User-Agents")%> + </td> + + <td> + <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" /> + </td> + </tr> <% } // httpserver - %><div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label> - <%=intl._t("Unique Local Address per Client")%>: - </label> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="d"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="uniqueLocal" title="Use unique IP addresses for each connecting client (local non-SSL servers only)"<%=(editBean.getUniqueLocal(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - </div> - <div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label> - <%=intl._t("Optimize for Multihoming")%>: - </label> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="d"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="multihome" title="Only enable if you are hosting this service on multiple routers"<%=(editBean.getMultihome(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - </div> - <div class="subdivider"> - <hr /> - </div> + %> - <div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Inbound connection limits (0=unlimited)")%><br /><%=intl._t("Per client")%>:</label> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Per minute")%>:</label> - <input type="text" id="port" name="limitMinute" value="<%=editBean.getLimitMinute(curTunnel)%>" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Per hour")%>:</label> - <input type="text" id="port" name="limitHour" value="<%=editBean.getLimitHour(curTunnel)%>" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Per day")%>:</label> - <input type="text" id="port" name="limitDay" value="<%=editBean.getLimitDay(curTunnel)%>" class="freetext" /> - </div> - </div> - <div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Total")%>:</label> - </div> - <div id="portField" class="rowItem"> - <input type="text" id="port" name="totalMinute" value="<%=editBean.getTotalMinute(curTunnel)%>" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <input type="text" id="port" name="totalHour" value="<%=editBean.getTotalHour(curTunnel)%>" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <input type="text" id="port" name="totalDay" value="<%=editBean.getTotalDay(curTunnel)%>" class="freetext" /> - </div> - </div> - <div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Max concurrent connections (0=unlimited)")%>:</label> - </div> - <div id="portField" class="rowItem"> - <input type="text" id="port" name="maxStreams" value="<%=editBean.getMaxStreams(curTunnel)%>" class="freetext" /> - </div> - </div> + <tr> + <td> + <input value="1" type="checkbox" name="uniqueLocal" title="<%=intl._t("Use unique IP addresses for each connecting client (local non-SSL servers only)")%>" <%=(editBean.getUniqueLocal(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Unique Local Address per Client")%> + </td> + + <td> + <input value="1" type="checkbox" name="multihome" title="<%=intl._t("Only enable if you are hosting this service on multiple routers")%>" <%=(editBean.getMultihome(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Optimize for Multihoming")%> + </td> + </tr> + + <tr> + <th colspan="2"> + <%=intl._t("Server Throttling")%> + </th> + </tr> + <tr> + <td id="throttle" colspan="4"> + + <table id="throttler"> + <tr> + <th colspan="5"> + <%=intl._t("Inbound connection limits (0=unlimited)")%> + </th> + </tr> + <tr> + <td></td> + <td><b><%=intl._t("Per Minute")%></b></td> + <td><b><%=intl._t("Per Hour")%></b></td> + <td><b><%=intl._t("Per Day")%></b></td> + <td class="blankColumn"></td> + </tr> + <tr> + <td><b><%=intl._t("Per Client")%></b></td> + <td> + <input type="text" name="limitMinute" value="<%=editBean.getLimitMinute(curTunnel)%>" class="freetext" /> + </td> + <td> + <input type="text" name="limitHour" value="<%=editBean.getLimitHour(curTunnel)%>" class="freetext" /> + </td> + <td> + <input type="text" name="limitDay" value="<%=editBean.getLimitDay(curTunnel)%>" class="freetext" /> + </td> + <td class="blankColumn"></td> + </tr> + <tr> + <td><b><%=intl._t("Total")%></b></td> + <td> + <input type="text" name="totalMinute" value="<%=editBean.getTotalMinute(curTunnel)%>" class="freetext" /> + </td> + <td> + <input type="text" name="totalHour" value="<%=editBean.getTotalHour(curTunnel)%>" class="freetext" /> + </td> + <td> + <input type="text" name="totalDay" value="<%=editBean.getTotalDay(curTunnel)%>" class="freetext" /> + </td> + <td class="blankColumn"></td> + </tr> + <tr> + <th colspan="5"><%=intl._t("Max concurrent connections (0=unlimited)")%></th> + </tr> + <tr> + <td></td> + <td> + <input type="text" name="maxStreams" value="<%=editBean.getMaxStreams(curTunnel)%>" class="freetext" /> + </td> + <td></td> + <td></td> + <td class="blankColumn"></td> + </tr> <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %><div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("POST limits (0=unlimited)")%><br /><%=intl._t("Per client")%>:</label> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Per period")%>:</label> - <input type="text" id="port" name="postMax" value="<%=editBean.getPostMax(curTunnel)%>" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <label><%=intl._t("Ban minutes")%>:</label> - <input type="text" id="port" name="postBanTime" value="<%=editBean.getPostBanTime(curTunnel)%>" class="freetext" /> - </div> - </div> - <div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("Total")%>:</label> - </div> - <div id="portField" class="rowItem"> - <input type="text" id="port" name="postTotalMax" value="<%=editBean.getPostTotalMax(curTunnel)%>" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <input type="text" id="port" name="postTotalBanTime" value="<%=editBean.getPostTotalBanTime(curTunnel)%>" class="freetext" /> - </div> - </div> - <div class="rowItem"> - <div id="optionsField" class="rowItem"> - <label><%=intl._t("POST limit period (minutes)")%>:</label> - </div> - <div id="portField" class="rowItem"> - <input type="text" id="port" name="postCheckTime" value="<%=editBean.getPostCheckTime(curTunnel)%>" class="freetext" /> - </div> - </div> + %> + <tr> + <th colspan="5"> + <%=intl._t("POST limits (0=unlimited)")%> + </th> + </tr> + <tr> + <td></td> + <td> + <b><%=intl._t("Per Period")%></b> + </td> + <td> + <b><%=intl._t("Ban Duration")%></b> + </td> + <td></td> + <td class="blankColumn"></td> + </tr> + <tr> + <td> + <b><%=intl._t("Per Client")%> + </b> + </td> + <td> + <input type="text" name="postMax" value="<%=editBean.getPostMax(curTunnel)%>" class="freetext quantity"/> + </td> + <td> + <input type="text" name="postBanTime" value="<%=editBean.getPostBanTime(curTunnel)%>" class="freetext period"/> + <%=intl._t("minutes")%> + </td> + <td></td> + <td class="blankColumn"></td> + </tr> + <tr> + <td> + <b><%=intl._t("Total")%> + </b> + </td> + <td> + <input type="text" name="postTotalMax" value="<%=editBean.getPostTotalMax(curTunnel)%>" class="freetext quantity"/> + </td> + <td> + <input type="text" name="postTotalBanTime" value="<%=editBean.getPostTotalBanTime(curTunnel)%>" class="freetext period"/> + <%=intl._t("minutes")%> + </td> + <td></td> + <td class="blankColumn"></td> + </tr> + <tr> + <td> + <b><%=intl._t("POST limit period")%> + </b> + </td> + <td> + <input type="text" name="postCheckTime" value="<%=editBean.getPostCheckTime(curTunnel)%>" class="freetext period"/> + <%=intl._t("minutes")%> + </td> + <td></td> + <td></td> + <td class="blankColumn"></td> + </tr> + <% } // httpserver - %><div class="subdivider"> - <hr /> - </div> - - <div id="optionsField" class="rowItem"> - <label for="reduce" accesskey="d"> - <%=intl._t("Reduce tunnel quantity when idle")%>(<span class="accessKey">d</span>): - </label> - </div> - <div id="portField" class="rowItem"> - <label for="access" accesskey="d"> - <%=intl._t("Enable")%>: - </label> - <input value="1" type="checkbox" id="startOnLoad" name="reduce" title="Reduce Tunnels"<%=(editBean.getReduce(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> - <div id="portField" class="rowItem"> - <label for="reduceCount" accesskey="d"> - <%=intl._t("Reduced tunnel count")%>: - </label> - <input type="text" id="port" name="reduceCount" size="1" maxlength="1" title="Reduced Tunnel Count" value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext" /> - </div> - <div id="portField" class="rowItem"> - <label for="reduceTime" accesskey="d"> - <%=intl._t("Idle minutes")%>: - </label> - <input type="text" id="port" name="reduceTime" size="4" maxlength="4" title="Reduced Tunnel Idle Time" value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext" /> - </div> + %> - <div class="subdivider"> - <hr /> - </div> + + </table> + </td> + </tr> + + <tr> + <th colspan="2"> + <%=intl._t("Reduce tunnel quantity when idle")%> + </th> + </tr> + + <tr> + <td colspan="2"> + <input value="1" type="checkbox" id="startOnLoad" name="reduce" title="Reduce Tunnels"<%=(editBean.getReduce(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <%=intl._t("Reduce tunnel quantity when idle to conserve resources")%> + </td> + </tr> + <tr> + <td> + <b><%=intl._t("Reduced tunnel count")%>:</b> + <input type="text" id="reduceCount" name="reduceCount" size="1" maxlength="1" title="Reduced Tunnel Count" value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext quantity" /> + </td> + + <td> + <b><%=intl._t("Idle period")%>:</b> + <input type="text" id="reduceTime" name="reduceTime" size="4" maxlength="4" title="Reduced Tunnel Idle Time" value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext period" /> + <%=intl._t("minutes")%> + </td> + </tr> <% /***************** %> <div id="tunnelOptionsField" class="rowItem"> @@ -671,76 +741,74 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if (true /* editBean.isAdvanced() */ ) { int currentSigType = editBean.getSigType(curTunnel, tunnelType); %> - <div id="tunnelOptionsField" class="rowItem"> - <label> - <%=intl._t("Signature type")%> - (<%=intl._t("Experts only! Changes B32!")%>) - </label> - </div> - <div id="hostField" class="rowItem"> - <div id="portField" class="rowItem"> - <label>DSA-SHA1</label> - <input value="0" type="radio" id="startOnLoad" name="sigType" title="Default"<%=(currentSigType==0 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + <tr> + <th colspan="2"> + <%=intl._t("Signature type")%> (<%=intl._t("Experts only! Changes B32!")%>) + </th> + </tr> + <tr> + <td colspan="2"> + <span class="multiOption"> + <input value="0" type="radio" id="startOnLoad" name="sigType" title="Default"<%=(currentSigType==0 ? " checked=\"checked\"" : "")%> class="tickbox" /> + DSA-SHA1 + </span> <% if (editBean.isSigTypeAvailable(1)) { %> - <div id="portField" class="rowItem"> - <label>ECDSA-P256</label> - <input value="1" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==1 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + <span class="multiOption"> + <input value="1" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==1 ? " checked=\"checked\"" : "")%> class="tickbox" /> + ECDSA-P256 + </span> <% } if (editBean.isSigTypeAvailable(2)) { %> - <div id="portField" class="rowItem"> - <label>ECDSA-P384</label> - <input value="2" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + <span class="multiOption"> + <input value="2" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> + ECDSA-P384 + </span> <% } if (editBean.isSigTypeAvailable(3)) { %> - <div id="portField" class="rowItem"> - <label>ECDSA-P521</label> - <input value="3" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==3 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + <span class="multiOption"> + <input value="3" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==3 ? " checked=\"checked\"" : "")%> class="tickbox" /> + ECDSA-P521 + </span> <% } if (editBean.isSigTypeAvailable(7)) { %> - <div id="portField" class="rowItem"> - <label>Ed25519-SHA-512</label> - <input value="7" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==7 ? " checked=\"checked\"" : "")%> class="tickbox" /> - </div> + <span class="multiOption"> + <input value="7" type="radio" id="startOnLoad" name="sigType" title="Advanced users only"<%=(currentSigType==7 ? " checked=\"checked\"" : "")%> class="tickbox" /> + Ed25519-SHA-512 + </span> <% } // isAvailable %> - </div> - - <div class="subdivider"> - <hr /> - </div> + + </td> + </tr> + <% } // isAdvanced %> - - <div id="customOptionsField" class="rowItem"> - <label for="customOptions" accesskey="u"> - <%=intl._t("Custom options")%>(<span class="accessKey">u</span>): - </label> - <input type="text" id="customOptions" name="nofilter_customOptions" size="60" title="Custom Options" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" spellcheck="false"/> - </div> - - <div class="footer"> - </div> - </div> - <div id="globalOperationsPanel" class="panel"> - <div class="header"></div> - <div class="footer"> - <div class="toolbox"> + + <tr> + <th colspan="2"> + <%=intl._t("Custom options")%> + </th> + </tr> + <tr> + <td colspan="2"> + <input type="text" id="customOptions" name="nofilter_customOptions" size="60" title="Custom Options" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" spellcheck="false"/> + </td> + </tr> + + <tr> + <td class="buttons" colspan="2"> <input type="hidden" value="true" name="removeConfirm" /> <button id="controlCancel" class="control" type="submit" name="action" value="" title="Cancel"><%=intl._t("Cancel")%></button> - <button id="controlDelete" <%=(editBean.allowJS() ? "onclick=\"if (!confirm('Are you sure you want to delete?')) { return false; }\" " : "")%>accesskey="D" class="control" type="submit" name="action" value="Delete this proxy" title="Delete this Proxy"><%=intl._t("Delete")%>(<span class="accessKey">D</span>)</button> - <button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Save changes" title="Save Changes"><%=intl._t("Save")%>(<span class="accessKey">S</span>)</button> - </div> - </div> - </div> + <button id="controlDelete" <%=(editBean.allowJS() ? "onclick=\"if (!confirm('Are you sure you want to delete?')) { return false; }\" " : "")%>accesskey="D" class="control" type="submit" name="action" value="Delete this proxy" title="Delete this Proxy"><%=intl._t("Delete")%></button> + <button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Save changes" title="Save Changes"><%=intl._t("Save")%></button> + </td> + </tr> + </table> +</div> </form> - <div id="pageFooter"> - </div> + <% } else { - %>Tunnels are not initialized yet, please reload in two minutes.<% + %><div id="notReady"><%=intl._t("Tunnels are not initialized yet, please reload in two minutes.")%></div><% } // isInitialized() %> diff --git a/apps/i2ptunnel/jsp/index.jsp b/apps/i2ptunnel/jsp/index.jsp index bb099231c5..6863af89ae 100644 --- a/apps/i2ptunnel/jsp/index.jsp +++ b/apps/i2ptunnel/jsp/index.jsp @@ -28,46 +28,42 @@ <% if (indexBean.allowCSS()) { %><link rel="icon" href="<%=indexBean.getTheme()%>images/favicon.ico" /> - <link href="<%=indexBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> - <link href="<%=indexBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> + <link href="<%=indexBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> <% } %> </head> <body id="tunnelListPage"> - <div id="pageHeader"> - </div> - - <div id="statusMessagePanel" class="panel"> - <div class="header"> - <h4><%=intl._t("Status Messages")%></h4> - </div> - - <div class="separator"> - <hr /> - </div> +<div class="panel"> + <h2><%=intl._t("Status Messages")%></h2> + <table id="statusMessagesTable"> + <tr> + <td id="tunnelMessages"> <textarea id="statusMessages" rows="4" cols="60" readonly="readonly"><jsp:getProperty name="indexBean" property="messages" /></textarea> + </td> + </tr> - <div class="separator"> - <hr /> - </div> - <div class="footer"> - <div class="toolbox"> + <tr> + <td class="buttons"> <a class="control" href="list"><%=intl._t("Refresh")%></a> - </div> - </div> - </div> + </td> + </tr> + </table> +</div> + <% if (indexBean.isInitialized()) { String nextNonce = net.i2p.i2ptunnel.web.IndexBean.getNextNonce(); %> - <div id="globalOperationsPanel" class="panel"> - <div class="header"></div> - <div class="footer"> - <div class="toolbox"> + +<div class="panel" id="globalTunnelControl"> + <h2><%=intl._t("Global Tunnel Control")%></h2> + <table> + <tr> + <td class="buttons"> <a class="control" href="wizard"><%=intl._t("Tunnel Wizard")%></a> <a class="control" href="list?nonce=<%=nextNonce%>&action=Stop%20all"><%=intl._t("Stop All")%></a> <a class="control" href="list?nonce=<%=nextNonce%>&action=Start%20all"><%=intl._t("Start All")%></a> @@ -76,52 +72,44 @@ //this is really bad because it stops and restarts all tunnels, which is probably not what you want <a class="control" href="list?nonce=<%=nextNonce%>&action=Reload%20configuration"><%=intl._t("Reload Config")%></a> --%> - </div> - </div> - </div> - - + </td> + </tr> + </table> +</div> - <div id="localServerTunnelList" class="panel"> - <div class="header"> - - <h4><%=intl._t("I2P Hidden Services")%></h4> - </div> +<div class="panel"> + + <h2><%=intl._t("I2P Hidden Services")%></h2> - - <div class="separator"> </div> +<table id="serverTunnels"> + <tr> + <th class="tunnelName"><%=intl._t("Name")%></th> + <th class="tunnelType"><%=intl._t("Type")%></th> + <th class="tunnelLocation"><%=intl._t("Points at")%></th> + <th class="tunnelPreview"><%=intl._t("Preview")%></th> + <th class="tunnelStatus"><%=intl._t("Status")%></th> + <th class="tunnelControl"><%=intl._t("Control")%></th> + </tr> - <div class="nameHeaderField rowItem"> - <label><%=intl._t("Name")%>:</label> - </div> - <div class="previewHeaderField rowItem"> - <label><%=intl._t("Points at")%>:</label> - </div> - <div class="targetHeaderField rowItem"> - <label><%=intl._t("Preview")%>:</label> - </div> - <div class="statusHeaderField rowItem"> - <label><%=intl._t("Status")%>:</label> -<hr /> </div> - <% for (int curServer = 0; curServer < indexBean.getTunnelCount(); curServer++) { if (indexBean.isClient(curServer)) continue; %> - <div class="nameField rowItem"> - <label><%=intl._t("Name")%>:</label> - <span class="text"><a href="edit?tunnel=<%=curServer%>" title="Edit Server Tunnel Settings for <%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%></a></span> - </div> - <div class="previewField rowItem"> - <label><%=intl._t("Points at")%>:</label> - <span class="text"> + + + <tr class="tunnelProperties"> + <td class="tunnelName"> + <a href="edit?tunnel=<%=curServer%>" title="<%=intl._t("Edit Server Tunnel Settings for")%> <%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%></a> + </td> + <td class="tunnelType"><%=indexBean.getTunnelType(curServer)%></td> + <td class="tunnelLocation"> <% if (indexBean.isServerTargetLinkValid(curServer)) { if (indexBean.isSSLEnabled(curServer)) { %> - <a href="https://<%=indexBean.getServerTarget(curServer)%>/" title="Test HTTPS server, bypassing I2P" target="_top"><%=indexBean.getServerTarget(curServer)%> SSL</a> + <a href="https://<%=indexBean.getServerTarget(curServer)%>/" title="<%=intl._t("Test HTTPS server, bypassing I2P")%>" target="_top"><%=indexBean.getServerTarget(curServer)%> SSL</a> <% } else { %> - <a href="http://<%=indexBean.getServerTarget(curServer)%>/" title="Test HTTP server, bypassing I2P" target="_top"><%=indexBean.getServerTarget(curServer)%></a> + <a href="http://<%=indexBean.getServerTarget(curServer)%>/" title="<%=intl._t("Test HTTP server, bypassing I2P")%>" target="_top"><%=indexBean.getServerTarget(curServer)%></a> <% } } else { @@ -132,64 +120,66 @@ <% } } - %></span> - </div> - <div class="targetField rowItem"> + %> + </td> + <td class="tunnelPreview"> <% if (("httpserver".equals(indexBean.getInternalType(curServer)) || ("httpbidirserver".equals(indexBean.getInternalType(curServer)))) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { - %><label><%=intl._t("Preview")%>:</label> - <a class="control" title="Test HTTP server through I2P" href="http://<%=indexBean.getDestHashBase32(curServer)%>" target="_top"><%=intl._t("Preview")%></a> + %> + <a class="control" title="<%=intl._t("Test HTTP server through I2P")%>" href="http://<%=indexBean.getDestHashBase32(curServer)%>" target="_top"><%=intl._t("Preview")%></a> <% } else if (indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { - %><span class="text"><%=intl._t("Base32 Address")%>:<br /><%=indexBean.getDestHashBase32(curServer)%></span> + %><%=intl._t("Base32 Address")%>:<%=indexBean.getDestHashBase32(curServer)%> <% } else { - %><span class="comment"><%=intl._t("No Preview")%></span> + %><%=intl._t("No Preview")%> <% } - %></div> - <div class="statusField rowItem"> - <label><%=intl._t("Status")%>:</label> + %> + </td> + <td class="tunnelStatus"> <% switch (indexBean.getTunnelStatus(curServer)) { case IndexBean.STARTING: - %><div class="statusStarting text"><%=intl._t("Starting...")%></div> - <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curServer%>"><%=intl._t("Stop")%></a> + %><div class="statusStarting text" title="<%=intl._t("Starting...")%>"><%=intl._t("Starting...")%></div> + </td> + <td class="tunnelControl"> + <a class="control" title="<%=intl._t("Stop this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curServer%>"><%=intl._t("Stop")%></a> <% break; case IndexBean.RUNNING: - %><div class="statusRunning text"><%=intl._t("Running")%></div> - <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curServer%>"><%=intl._t("Stop")%></a> + %><div class="statusRunning text" title="<%=intl._t("Running")%>"><%=intl._t("Running")%></div> + </td> + <td class="tunnelControl"> + <a class="control" title="<%=intl._t("Stop this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curServer%>"><%=intl._t("Stop")%></a> <% break; case IndexBean.NOT_RUNNING: - %><div class="statusNotRunning text"><%=intl._t("Stopped")%></div> - <a class="control" title="Start this Tunnel" href="list?nonce=<%=nextNonce%>&action=start&tunnel=<%=curServer%>"><%=intl._t("Start")%></a> + %><div class="statusNotRunning text" title="<%=intl._t("Stopped")%>"><%=intl._t("Stopped")%></div> + </td> + <td class="tunnelControl"> + <a class="control" title="<%=intl._t("Start this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=start&tunnel=<%=curServer%>"><%=intl._t("Start")%></a> <% break; } - %></div> - - <div class="descriptionField rowItem"> - <label><%=intl._t("Description")%>:</label> - <div class="text"><%=indexBean.getTunnelDescription(curServer)%></div> - </div> + %> + </td> + </tr> + <tr> + <td class="tunnelDescription" colspan="6"> + <span class="tunnelDescriptionLabel"><b>Description:</b></span> + <%=indexBean.getTunnelDescription(curServer)%> + </td> + </tr> - <div class="subdivider"> - <hr /> - </div> <% } %> - <div class="separator"> - <hr /> - </div> - - <div class="footer"> - <form id="addNewServerTunnelForm" action="edit"> - <div class="toolbox"> - - <label><%=intl._t("New hidden service")%>:</label> + + <tr> + <td class="newTunnel" colspan="6"> + <form id="addNewServerTunnelForm" action="edit"> + <b><%=intl._t("New hidden service")%>:</b> <select name="type"> <option value="httpserver">HTTP</option> <option value="server"><%=intl._t("Standard")%></option> @@ -198,66 +188,36 @@ <option value="streamrserver">Streamr</option> </select> <input class="control" type="submit" value="<%=intl._t("Create")%>" /> - </div> </form> - </div> - </div> + </td> + </tr> +</table> + + <h2><%=intl._t("I2P Client Tunnels")%></h2> +<table id="clientTunnels"> + <tr> + <th class="tunnelName"><%=intl._t("Name")%></th> + <th class="tunnelType"><%=intl._t("Type")%></th> + <th class="tunnelInterface"><%=intl._t("Interface")%></th> + <th class="tunnelPort"><%=intl._t("Port")%></th> + <th class="tunnelStatus"><%=intl._t("Status")%></th> + <th class="tunnelControl"><%=intl._t("Control")%></th> + </tr> - <div id="localClientTunnelList" class="panel"> - <div class="header"> - - <h4><%=intl._t("I2P Client Tunnels")%></h4> - </div> - - - <div class="separator"> </div> - - <div class="nameHeaderField rowItem"> - <label><%=intl._t("Name")%>:</label> - </div> - <div class="portHeaderField rowItem"> - <label><%=intl._t("Port")%>:</label> - </div> - <div class="typeHeaderField rowItem"> - <label><%=intl._t("Type")%>:</label> - </div> - <div class="interfaceHeaderField rowItem"> - <label><%=intl._t("Interface")%>:</label> - </div> - <div class="statusHeaderField rowItem"> - <label><%=intl._t("Status")%>:</label> - </div> - - <div class="separator"> - <hr /> - </div> <% for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) { if (!indexBean.isClient(curClient)) continue; - %> - <div class="nameField rowItem"> - <label><%=intl._t("Name")%>:</label> - <span class="text"><a href="edit?tunnel=<%=curClient%>" title="Edit Tunnel Settings for <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a></span> - </div> - <div class="portField rowItem"> - <label><%=intl._t("Port")%>:</label> - <span class="text"> - <% - String cPort= indexBean.getClientPort2(curClient); - out.write(cPort); - if (indexBean.isSSLEnabled(curClient)) - out.write(" SSL"); - %> - </span> - </div> - <div class="typeField rowItem"> - <label><%=intl._t("Type")%>:</label> - <span class="text"><%=indexBean.getTunnelType(curClient)%></span> - </div> - <div class="interfaceField rowItem"> - <label><%=intl._t("Interface")%>:</label> - <span class="text"> + %> + + + <tr class="tunnelProperties"> + <td class="tunnelName"> + <a href="edit?tunnel=<%=curClient%>" title="<%=intl._t("Edit Tunnel Settings for")%> <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a> + </td> + + <td class="tunnelType"><%=indexBean.getTunnelType(curClient)%></td> + <td class="tunnelInterface"> <% /* should only happen for streamr client */ String cHost= indexBean.getClientInterface(curClient); @@ -269,45 +229,60 @@ out.write(cHost); } %> - </span> - </div> - <div class="statusField rowItem"> - <label><%=intl._t("Status")%>:</label> + </td> + <td class="tunnelPort"> + <% + String cPort= indexBean.getClientPort2(curClient); + out.write(cPort); + if (indexBean.isSSLEnabled(curClient)) + out.write(" SSL"); + %> + </td> + <td class="tunnelStatus"> <% switch (indexBean.getTunnelStatus(curClient)) { case IndexBean.STARTING: - %><div class="statusStarting text"><%=intl._t("Starting...")%></div> - <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curClient%>"><%=intl._t("Stop")%></a> + %><div class="statusStarting text" title="<%=intl._t("Starting...")%>"><%=intl._t("Starting...")%></div> + </td> + <td class="tunnelControl"> + <a class="control" title="<%=intl._t("Stop this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curClient%>"><%=intl._t("Stop")%></a> <% break; case IndexBean.STANDBY: - %><div class="statusStarting text"><%=intl._t("Standby")%></div> + %><div class="statusStarting text" title="<%=intl._t("Standby")%>"><%=intl._t("Standby")%></div> + </td> + <td class="tunnelControl"> <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curClient%>"><%=intl._t("Stop")%></a> <% break; case IndexBean.RUNNING: - %><div class="statusRunning text"><%=intl._t("Running")%></div> + %><div class="statusRunning text" title="<%=intl._t("Running")%>"><%=intl._t("Running")%></div> + </td> + <td class="tunnelControl"> <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curClient%>"><%=intl._t("Stop")%></a> <% break; case IndexBean.NOT_RUNNING: - %><div class="statusNotRunning text"><%=intl._t("Stopped")%></div> - <a class="control" title="Start this Tunnel" href="list?nonce=<%=nextNonce%>&action=start&tunnel=<%=curClient%>"><%=intl._t("Start")%></a> + %><div class="statusNotRunning text" title="<%=intl._t("Stopped")%>"><%=intl._t("Stopped")%></div> + </td> + <td class="tunnelControl"> + <a class="control" title="<%=intl._t("Start this Tunnel")%>" href="list?nonce=<%=nextNonce%>&action=start&tunnel=<%=curClient%>"><%=intl._t("Start")%></a> <% break; } - %></div> - - <div class="destinationField rowItem"> - <label> + %> + </td> + </tr> + <tr> + <td class="tunnelDestination" colspan="6"> + <span class="tunnelDestinationLabel"> <% if ("httpclient".equals(indexBean.getInternalType(curClient)) || "connectclient".equals(indexBean.getInternalType(curClient)) || "sockstunnel".equals(indexBean.getInternalType(curClient)) || "socksirctunnel".equals(indexBean.getInternalType(curClient))) { %> - <%=intl._t("Outproxy")%>: + <b><%=intl._t("Outproxy")%>:</b> <% } else { %> - <%=intl._t("Destination")%>: + <b><%=intl._t("Destination")%>:</b> <% } %> - </label> - <div class="text"> +</span> <% if (indexBean.getIsUsingOutproxyPlugin(curClient)) { %><%=intl._t("internal plugin")%><% @@ -321,30 +296,22 @@ %><i><%=intl._t("none")%></i><% } } %> - </div> - </div> + </td> + </tr> <% /* TODO SSL outproxy for httpclient if plugin not present */ %> - - <div class="descriptionField rowItem"> - <label><%=intl._t("Description")%>:</label> - <div class="text"><%=indexBean.getTunnelDescription(curClient)%></div> - </div> - - <div class="subdivider"> - <hr /> - </div> + <tr> + <td class="tunnelDescription" colspan="6"> + <span class="tunnelDescriptionLabel"><b><%=intl._t("Description")%>:</b></span> + <%=indexBean.getTunnelDescription(curClient)%> + </td> + </tr> <% } - %> - <div class="separator"> - <hr /> - </div> - - <div class="footer"> + %> + <tr> + <td class="newTunnel" colspan="6"> <form id="addNewClientTunnelForm" action="edit"> - <div class="toolbox"> - - <label><%=intl._t("New client tunnel")%>:</label> + <b><%=intl._t("New client tunnel")%>:</b> <select name="type"> <option value="client"><%=intl._t("Standard")%></option> <option value="httpclient">HTTP/CONNECT</option> @@ -355,16 +322,17 @@ <option value="streamrclient">Streamr</option> </select> <input class="control" type="submit" value="<%=intl._t("Create")%>" /> - </div> </form> - </div> - </div> + </td> + </tr> +</table> +</div> + <% } // isInitialized() %> - <div id="pageFooter"> - </div> + </body> </html> diff --git a/apps/i2ptunnel/jsp/register.jsp b/apps/i2ptunnel/jsp/register.jsp index 0dfb2e1074..f9f15afdc1 100644 --- a/apps/i2ptunnel/jsp/register.jsp +++ b/apps/i2ptunnel/jsp/register.jsp @@ -29,25 +29,22 @@ <% if (editBean.allowCSS()) { %><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" /> - <link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> - <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> + <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> <% } %> <style type='text/css'> input.default { width: 1px; height: 1px; visibility: hidden; } </style> </head> -<body id="tunnelEditPage"> - <div id="pageHeader"> - </div> +<body id="tunnelRegistration"> + <% if (editBean.isInitialized()) { %> <form method="post" enctype="multipart/form-data" action="register" accept-charset="UTF-8"> - <div id="tunnelEditPanel" class="panel"> - <div class="header"> + <div class="panel" id="registration"> <% String tunnelTypeName; String tunnelType; @@ -55,11 +52,11 @@ input.default { width: 1px; height: 1px; visibility: hidden; } if (curTunnel >= 0) { tunnelTypeName = editBean.getTunnelType(curTunnel); tunnelType = editBean.getInternalType(curTunnel); - %><h4><%=intl._t("Registration Helper")%></h4><% + %><h2><%=intl._t("Registration Helper")%> (<%=editBean.getTunnelName(curTunnel)%>)</h2><% } else { tunnelTypeName = "new"; tunnelType = "new"; - %><h4>Fail</h4><p>Tunnel not found</p><% + %><h2>Fail</h2><p>Tunnel not found</p><% } String b64 = editBean.getDestinationBase64(curTunnel); String name = editBean.getSpoofedHost(curTunnel); @@ -70,85 +67,93 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" /> <input type="hidden" name="type" value="<%=tunnelType%>" /> <input type="submit" class="default" name="action" value="Save changes" /> - </div> <% if (!"new".equals(tunnelType)) { %> - <span class="comment"> + +<table> + <tr> + <td class="infohelp"> <%=intl._t("Please be sure to select, copy, and paste the entire contents of the appropriate authentication data into the form of your favorite registration site")%> - </span> - <div class="separator"> - <hr /> - </div> - <div id="nameField" class="rowItem"> - <label for="name" accesskey="N"> - <%=intl._t("Name")%> - </label> - <span class="text"><%=editBean.getTunnelName(curTunnel)%></span> - </div> + </td> + </tr> + <tr> + <td> + <b><%=intl._t("Tunnel Name")%>:</b> <%=editBean.getTunnelName(curTunnel)%> + </td> + </tr> + <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %><div id="websiteField" class="rowItem"> - <label for="spoofedHost" accesskey="W"> - <%=intl._t("Website name")%> - </label> - <span class="text"><%=editBean.getSpoofedHost(curTunnel)%></span> - </div> + %> + <tr><td><b><%=intl._t("Website Name")%>:</b> <%=editBean.getSpoofedHost(curTunnel)%></td></tr> <% } %> - <div id="destinationField" class="rowItem"> - <label for="localDestination" accesskey="L"> - <%=intl._t("Local destination")%> - </label> - <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" wrap="off" spellcheck="false"><%=editBean.getDestinationBase64(curTunnel)%></textarea> - </div> - <div class="subdivider"> - <hr /> - </div> + + <tr> + <th> + <b><%=intl._t("Local Destination")%></b> + </th> + </tr> + <tr> + <td> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" wrap="off" spellcheck="false"><%=editBean.getDestinationBase64(curTunnel)%></textarea> + </td> + </tr> + <% if (b64 == null || b64.length() < 516) { - %><%=intl._t("Local destination is not available. Start the tunnel.")%><% + %><tr><td class="infohelp"><%=intl._t("Local destination is not available. Start the tunnel.")%></td></tr><% } else if (name == null || name.equals("") || name.contains(" ") || !name.endsWith(".i2p")) { if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %><%=intl._t("To enable registration verification, edit tunnel and set name (or website name) to a valid host name ending in '.i2p'")%><% + %><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name (or website name) to a valid host name ending in '.i2p'")%></td></tr><% } else { - %><%=intl._t("To enable registration verification, edit tunnel and set name to a valid host name ending in '.i2p'")%><% + %><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name to a valid host name ending in '.i2p'")%></td></tr><% } } else { SigningPrivateKey spk = editBean.getSigningPrivateKey(curTunnel); if (spk == null) { - %><%=intl._t("Destination signing key is not available. Start the tunnel.")%><% + %><tr><td class="infohelp"><%=intl._t("Destination signing key is not available. Start the tunnel.")%></td></tr><% } else { valid = true; OrderedProperties props = new OrderedProperties(); HostTxtEntry he = new HostTxtEntry(name, b64, props); he.sign(spk); - %><div id="sigField" class="rowItem"> - <label for="signature"> - <%=intl._t("Authentication for adding host")%> - </label> - <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> - </div> - </div> - <div id="tunnelAdvancedNetworking" class="panel"> - <div class="header"> - <h4><%=intl._t("Advanced authentication strings")%></h4> - </div> + %> + + <tr> + <th> + <%=intl._t("Authentication for adding host {0}", name)%> + </th> + </tr> + <tr> + <td> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> + </td> + </tr> +</table> + +<h3><%=intl._t("Advanced authentication strings")%></h3> + <% props.remove(HostTxtEntry.PROP_SIG); props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_REMOVE); he.signRemove(spk); - %><div id="sigField" class="rowItem"> - <label for="signature"> - <%=intl._t("Authentication for removing host")%> - </label> - <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.writeRemove(out); %></textarea> - <span class="comment"><%=intl._t("This will remove the entry for {0}", name)%></span> - </div> - <div class="separator"> - <hr /> - </div> + %> + +<table> + <tr> + <th> + <%=intl._t("Authentication for removing host {0}", name)%> + </th> + </tr> + <tr> + <td> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.writeRemove(out); %></textarea> + </td> + </tr> + <% String oldname = wrequest.getParameter("oldname"); String olddestfile = wrequest.getFilename("olddestfile"); @@ -171,106 +176,154 @@ input.default { width: 1px; height: 1px; visibility: hidden; } } } props.remove(HostTxtEntry.PROP_SIG); - %><div id="sigField" class="rowItem"> - <label for="signature"> + %> + <tr> + <th> <%=intl._t("Authentication for changing name")%> - </label> + </th> + </tr> <% if (oldname != null && oldname.length() > 0 && !oldname.equals(name)) { props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_CHANGENAME); props.setProperty(HostTxtEntry.PROP_OLDNAME, oldname); he.sign(spk); - %><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> - <span class="comment"><%=intl._t("This will change the name from {0} to {1}, using the same destination", oldname, name)%></span> + %> + <tr> + <td> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> + </td> + </tr> + <tr> + <td class="infohelp"> + <%=intl._t("This will change the name from {0} to {1}, using the same destination", oldname, name)%> + </td> + </tr> + <% } else { - %><span class="comment"><%=intl._t("This tunnel must be configured with the new host name.")%></span> - <span class="comment"><%=intl._t("Enter old host name below.")%></span> + %><tr><td class="infohelp"><%=intl._t("This tunnel must be configured with the new host name.")%> + <%=intl._t("Enter old hostname below.")%></td></tr> <% } - %></div> - <div class="separator"> - <hr /> - </div> + %> + <% props.remove(HostTxtEntry.PROP_SIG); - %><div id="sigField" class="rowItem"> - <label for="signature"> + %> + <tr> + <th> <%=intl._t("Authentication for adding alias")%> - </label> + </th> + </tr> <% if (oldname != null && oldname.length() > 0 && !oldname.equals(name)) { props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_ADDNAME); props.setProperty(HostTxtEntry.PROP_OLDNAME, oldname); he.sign(spk); - %><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> - <span class="comment"><%=intl._t("This will add an alias {0} for {1}, using the same destination", name, oldname)%></span> + %> + <tr> + <td> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> + </td> + </tr> + <tr> + <td class="infohelp"> + <%=intl._t("This will add an alias {0} for {1}, using the same destination", name, oldname)%> + </td> + </tr> <% } else { - %><span class="comment"><%=intl._t("This tunnel must be configured with the new host name.")%></span> - <span class="comment"><%=intl._t("Enter old host name below.")%></span> + %><tr> <td class="infohelp"><%=intl._t("This tunnel must be configured with the new host name.")%> + <%=intl._t("Enter old hostname below.")%></td></tr> <% } - %></div> - <div class="separator"> - <hr /> - </div> + %> + <% props.remove(HostTxtEntry.PROP_SIG); - %><div id="sigField" class="rowItem"> - <label for="signature"> + %> + + <tr> + <th> <%=intl._t("Authentication for changing destination")%> - </label> + </th> + </tr> + <% if (spk2 != null) { props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_CHANGEDEST); props.setProperty(HostTxtEntry.PROP_OLDDEST, olddest); he.signInner(spk2); he.sign(spk); - %><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> - <span class="comment"><%=intl._t("This will change the destination for {0}", name)%></span> + %> + + <tr> + <td> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> + </td> + </tr> + <tr> + <td class="infohelp"> + <%=intl._t("This will change the destination for {0}", name)%> + </td> + </tr> + <% } else { - %><span class="comment"><%=intl._t("This tunnel must be configured with the new destination.")%></span> - <span class="comment"><%=intl._t("Enter old destination below.")%></span> + %><tr><td class="infohelp"><%=intl._t("This tunnel must be configured with the new destination.")%> + <%=intl._t("Enter old destination below.")%></td></tr> <% } - %></div> - <div class="separator"> - <hr /> - </div> + %> + <% props.remove(HostTxtEntry.PROP_SIG); props.remove(HostTxtEntry.PROP_OLDSIG); - %><div id="sigField" class="rowItem"> - <label for="signature"> + %> + + <tr> + <th> <%=intl._t("Authentication for adding alternate destination")%> - </label> + </th> + </tr> + <% if (spk2 != null) { props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_ADDDEST); props.setProperty(HostTxtEntry.PROP_OLDDEST, olddest); he.signInner(spk2); he.sign(spk); - %><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> - <span class="comment"><%=intl._t("This will add an alternate destination for {0}", name)%></span> + %> + <tr> + <td> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> + </td> + </tr> + <tr> + <td class="infohelp"> + <%=intl._t("This will add an alternate destination for {0}", name)%> + </td> + </tr> <% } else { - %><span class="comment"><%=intl._t("This tunnel must be configured with the new destination.")%></span> - <span class="comment"><%=intl._t("Enter old destination below.")%></span> + %><tr><td class="infohelp"><%=intl._t("This tunnel must be configured with the new destination.")%> + <%=intl._t("Enter old destination below.")%></td></tr> <% } - %></div> - <div class="separator"> - <hr /> - </div> + %> + <% + + props.remove(HostTxtEntry.PROP_SIG); props.remove(HostTxtEntry.PROP_OLDSIG); - %><div id="sigField" class="rowItem"> - <label for="signature"> + %> + + <tr> + <th> <%=intl._t("Authentication for adding subdomain")%> - </label> + </th> + </tr> <% if (oldname != null && oldname.length() > 0 && !oldname.equals(name) && spk2 != null) { props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_ADDSUBDOMAIN); @@ -278,73 +331,98 @@ input.default { width: 1px; height: 1px; visibility: hidden; } props.setProperty(HostTxtEntry.PROP_OLDDEST, olddest); he.signInner(spk2); he.sign(spk); - %><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> - <span class="comment"><%=intl._t("This will add a subdomain {0} of {1}, with a different destination", name, oldname)%></span> + %> + + <tr> + <td> + <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea> + </td> + </tr> + <tr> + <td class="infohelp"> + <%=intl._t("This will add a subdomain {0} of {1}, with a different destination", name, oldname)%> + </td> + </tr> + <% } else { - %><span class="comment"><%=intl._t("This tunnel must be configured with the new subdomain and destination.")%></span> - <span class="comment"><%=intl._t("Enter higher-level domain and destination below.")%></span> + %> + <tr> + <td class="infohelp"> + <%=intl._t("This tunnel must be configured with the new subdomain and destination.")%> + <%=intl._t("Enter higher-level domain and destination below.")%> + </td> + </tr> + <% } - %></div> + %> - <div class="footer"> - </div> <% } // spk != null } // valid b64 and name } // !"new".equals(tunnelType) if (!valid && curTunnel >= 0) { - %><a href="edit?tunnel=<%=curTunnel%>"><%=intl._t("Go back and edit the tunnel")%></a><% + %> + <tr> + <td> + <a href="edit?tunnel=<%=curTunnel%>"><%=intl._t("Go back and edit the tunnel")%></a> + </td> + </tr> + <% } %> - </div> - <% if (valid) { %> - <div id="globalOperationsPanel" class="panel"> - <div class="header"> - <h4><%=intl._t("Specify old name and destination")%></h4> - </div> - <span class="comment"> - <%=intl._t("This is only required for advanced authentication.")%> - <%=intl._t("See above for required items.")%> - </span> + + <tr> + <th> + <%=intl._t("Specify old name and destination")%> + </th> + </tr> + <tr> + <td class="infohelp"> + <%=intl._t("This is only required for advanced authentication.")%> + <%=intl._t("See above for required items.")%> + </td> + </tr> <% String oldname = wrequest.getParameter("oldname"); if (oldname == null) oldname = ""; - %><div id="sigField" class="rowItem"> - <label for="signature"> - <%=intl._t("Old Host Name")%> - </label> - <input type="text" size="30" maxlength="50" name="oldname" id="name" title="Old Host Name" value="<%=oldname%>" class="freetext" /> - </div> - <div id="sigField" class="rowItem"> - <label for="signature"> - <%=intl._t("Private Key File for old Destination")%> - </label> - <input type="file" size="50%" name="olddestfile" id="name" value="" /> - </div> - <div class="footer"> - <div class="toolbox"> + %> + <tr> + <td> + <b><%=intl._t("Old Hostname")%>:</b> + <input type="text" size="30" maxlength="50" name="oldname" id="oldName" title="Old Hostname" value="<%=oldname%>" class="freetext" /> + </td> + </tr> + <tr> + <td> + <b><%=intl._t("Private Key File for old Destination")%>:</b> + <input type="file" name="olddestfile" id="oldDestFile" value="" /> + </td> + </tr> + <tr> + <td class="buttons"> <input type="hidden" value="true" name="removeConfirm" /> <button id="controlCancel" class="control" type="submit" name="action" value="" title="Cancel"><%=intl._t("Cancel")%></button> <button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="authenticate" title="Generate Authentication"><%=intl._t("Generate")%></button> - </div> - </div> - </div> + </td> + </tr> + <% } // valid %> + +</table> +</div> </form> - <div id="pageFooter"> - </div> <% } else { - %>Tunnels are not initialized yet, please reload in two minutes.<% + %><div id="notReady"><%=intl._t("Tunnels are not initialized yet, please reload in two minutes.")%></div><% } // isInitialized() %> diff --git a/apps/i2ptunnel/jsp/wizard.jsp b/apps/i2ptunnel/jsp/wizard.jsp index 56c6c528a1..cf20e84ded 100644 --- a/apps/i2ptunnel/jsp/wizard.jsp +++ b/apps/i2ptunnel/jsp/wizard.jsp @@ -62,48 +62,45 @@ <% if (editBean.allowCSS()) { %><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" /> - <link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> <% } %> </head> <body id="tunnelWizardPage"> - <div id="pageHeader"> - </div> <form method="post" action="<%=(curPage == 7 ? "list" : "wizard") %>"> <div id="wizardPanel" class="panel"> - <div class="header"> + <% if (curPage == 1) { - %><h4><%=intl._t("Server or client tunnel?")%></h4><% + %><h2><%=intl._t("Server or client tunnel?")%></h2><% } else if (curPage == 2) { - %><h4><%=intl._t("Tunnel type")%></h4><% + %><h2><%=intl._t("Tunnel type")%></h2><% } else if (curPage == 3) { - %><h4><%=intl._t("Tunnel name and description")%></h4><% + %><h2><%=intl._t("Tunnel name and description")%></h2><% } else if (curPage == 4 && tunnelIsClient) { - %><h4><%=intl._t("Tunnel destination")%></h4><% + %><h2><%=intl._t("Tunnel destination")%></h2><% } else if (curPage == 5) { - %><h4><%=intl._t("Binding address and port")%></h4><% + %><h2><%=intl._t("Binding address and port")%></h2><% } else if (curPage == 6) { - %><h4><%=intl._t("Tunnel auto-start")%></h4><% + %><h2><%=intl._t("Tunnel auto-start")%></h2><% } else if (curPage == 7) { - %><h4><%=intl._t("Wizard completed")%></h4><% + %><h2><%=intl._t("Wizard completed")%></h2><% } %> <input type="hidden" name="page" value="<%=curPage%>" /> <input type="hidden" name="tunnel" value="null" /> <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" /> - </div> - <div class="separator"> - <hr /> - </div> +<table> <% /* Page 1 - Whether to make a client or server tunnel */ if (curPage == 1) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("This wizard will take you through the various options available for creating tunnels in I2P.")%> </p> <p> @@ -111,12 +108,22 @@ <%=intl._t("If you need to connect to a remote service, such as an IRC server inside I2P or a code repository, then you will require a CLIENT tunnel.")%> <%=intl._t("On the other hand, if you wish to host a service for others to connect to you'll need to create a SERVER tunnel.")%> </p> - <div id="typeField" class="rowItem"> - <label><%=intl._t("Server Tunnel")%></label> + </td> + </tr> + <tr> + <td class="options"> + <span class="multiOption" id="isServer"> <input value="false" type="radio" id="baseType" name="isClient" class="tickbox" /> - <label><%=intl._t("Client Tunnel")%></label> + <%=intl._t("Server Tunnel")%> + </span> + <span class="multiOption" id="isClient"> <input value="true" type="radio" id="baseType" name="isClient" class="tickbox" checked="checked" /> - </div><% + <%=intl._t("Client Tunnel")%> + </span> + </td> + </tr> + + <% } else { %><input type="hidden" name="isClient" value="<%=tunnelIsClient%>" /><% } /* curPage 1 */ @@ -126,10 +133,18 @@ <% /* Page 2 - Tunnel type */ if (curPage == 2) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("There are several types of tunnels to choose from:")%> </p> - <table><% + </td> + </tr> + <tr> + <td id="wizardTable"> + <table id="wizardTunnelTypes"> + <% if (tunnelIsClient) { %> <tr><td><%=intl._t("Standard")%></td><td> @@ -188,8 +203,12 @@ </td></tr><% } %> - </table> - <div id="typeField" class="rowItem"> + + <tr> + <td> + <%=intl._t("Select tunnel type")%>: + </td> + <td> <% if (tunnelIsClient) { %><select name="type"> @@ -210,7 +229,12 @@ <option value="streamrserver">Streamr</option> </select><% } /* tunnelIsClient */ %> - </div><% + </td> + </tr> + </table> + </td> + </tr> + <% } else { %><input type="hidden" name="type" value="<%=tunnelType%>" /><% } /* curPage 2 */ @@ -220,22 +244,28 @@ <% /* Page 3 - Name and description */ if (curPage == 3) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("Choose a name and description for your tunnel.")%> <%=intl._t("These can be anything you want - they are just for ease of identifying the tunnel in the routerconsole.")%> </p> - <div id="nameField" class="rowItem"> - <label for="name" accesskey="N"> - <%=intl._t("Name")%>:(<span class="accessKey">N</span>) - </label> - <input type="text" size="30" maxlength="50" name="name" id="name" title="Tunnel Name" value="<%=(!"null".equals(request.getParameter("name")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("name")) : "" ) %>" class="freetext" /> - </div> - <div id="descriptionField" class="rowItem"> - <label for="description" accesskey="e"> - <%=intl._t("Description")%>:(<span class="accessKey">E</span>) - </label> + </td> + </tr> + <tr> + <td> + <span class="tag"><%=intl._t("Name")%>:</span> + <input type="text" size="30" maxlength="50" name="name" id="name" placeholder="New Tunnel" title="Tunnel Name" value="<%=(!"null".equals(request.getParameter("name")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("name")) : "" ) %>" class="freetext" /> + </td> + </tr> + <tr> + <td> + <span class="tag"><%=intl._t("Description")%>:</span> <input type="text" size="60" maxlength="80" name="nofilter_description" id="description" title="Tunnel Description" value="<%=(!"null".equals(request.getParameter("nofilter_description")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description")) : "" ) %>" class="freetext" /> - </div><% + </td> + </tr> + <% } else { %><input type="hidden" name="name" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%>" /> <input type="hidden" name="nofilter_description" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%>" /><% @@ -248,36 +278,47 @@ if (tunnelIsClient) { if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { if (curPage == 4) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("If you know of any outproxies for this type of tunnel (either HTTP or SOCKS), fill them in below.")%> <%=intl._t("Separate multiple proxies with commas.")%> </p> - <div id="destinationField" class="rowItem"> - <label for="proxyList" accesskey="x"> - <%=intl._t("Outproxies")%>(<span class="accessKey">x</span>): - </label> + </td> + </tr> + <tr> + <td> + <span class="tag"><%=intl._t("Outproxies")%>:</span> <input type="text" size="30" id="proxyList" name="proxyList" title="List of Outproxy I2P destinations" value="<%=(!"null".equals(request.getParameter("proxyList")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("proxyList")) : "" ) %>" class="freetext" /> - </div><% + </td> + </tr> + <% } else { %><input type="hidden" name="proxyList" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("proxyList"))%>" /><% } /* curPage 4 */ } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { if (curPage == 4) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("Type in the I2P destination of the service that this client tunnel should connect to.")%> <%=intl._t("This could be the full base 64 destination key, or an I2P URL from your address book.")%> </p> - <div id="destinationField" class="rowItem"> - <label for="targetDestination" accesskey="T"> - <%=intl._t("Tunnel Destination")%>(<span class="accessKey">T</span>): - </label> + </td> + </tr> + <tr> + <td> + <span class="tag"><%=intl._t("Tunnel Destination")%>:</span> <input type="text" size="30" id="targetDestination" name="targetDestination" title="Destination of the Tunnel" value="<%=(!"null".equals(request.getParameter("targetDestination")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination")) : "" ) %>" class="freetext" /> - <span class="comment">(<%=intl._t("name, name:port, or destination")%> + (<%=intl._t("name, name:port, or destination")%> <% if ("streamrclient".equals(tunnelType)) { /* deferred resolution unimplemented in streamr client */ %> - <%=intl._t("b32 not recommended")%> <% } %> ) - </span> - </div><% + </td> + </tr> + <% } else { %><input type="hidden" name="targetDestination" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination"))%>" /><% } /* curPage 4 */ @@ -290,16 +331,22 @@ if ((tunnelIsClient && "streamrclient".equals(tunnelType)) || (!tunnelIsClient && !"streamrserver".equals(tunnelType))) { if (curPage == 5) { - %><p> - <%=intl._t("This is the IP that your service is running on, this is usually on the same machine so 127.0.0.1 is autofilled.")%><% - //XXX TODO<%=intl._t("For some reason streamrclient also uses this.")%> + %> + <tr> + <td> + <p> + <%=intl._t("This is the IP that your service is running on, this is usually on the same machine so 127.0.0.1 is autofilled.")%> + <% //TODO For some reason streamrclient also uses this. %> </p> - <div id="hostField" class="rowItem"> - <label for="targetHost" accesskey="H"> - <%=intl._t("Host")%>(<span class="accessKey">H</span>): - </label> - <input type="text" size="20" id="targetHost" name="targetHost" title="Target Hostname or IP" value="<%=(!"null".equals(request.getParameter("targetHost")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost")) : "127.0.0.1" ) %>" class="freetext" /> - </div><% + </td> + </tr> + <tr> + <td> + <span class="tag"><%=intl._t("Host")%>:</span> + <input type="text" size="20" id="targetHost" name="targetHost" title="Target Hostname or IP" placeholder="127.0.0.1" value="<%=(!"null".equals(request.getParameter("targetHost")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost")) : "127.0.0.1" ) %>" class="freetext" /> + </td> + </tr> + <% } else { %><input type="hidden" name="targetHost" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%>" /><% } /* curPage 5 */ @@ -307,15 +354,21 @@ <% if (!tunnelIsClient) { if (curPage == 5) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("This is the port that the service is accepting connections on.")%> </p> - <div id="portField" class="rowItem"> - <label for="targetPort" accesskey="P"> - <%=intl._t("Port")%>(<span class="accessKey">P</span>): - </label> + </td> + </tr> + <tr> + <td> + <span class="tag"><%=intl._t("Port")%>:</span> <input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="Target Port Number" value="<%=(!"null".equals(request.getParameter("targetPort")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort")) : "" ) %>" class="freetext" /> - </div><% + </td> + </tr> + <% } else { %><input type="hidden" name="targetPort" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%>" /><% } /* curPage 5 */ @@ -323,16 +376,22 @@ <% if (tunnelIsClient || "httpbidirserver".equals(tunnelType)) { if (curPage == 5) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("This is the port that the client tunnel will be accessed from locally.")%> <%=intl._t("This is also the client port for the HTTPBidir server tunnel.")%> </p> - <div id="portField" class="rowItem"> - <label for="port" accesskey="P"> - <span class="accessKey">P</span>ort: - </label> + </td> + </tr> + <tr> + <td> + <span class="tag"><%=intl._t("Port")%>:</span> <input type="text" size="6" maxlength="5" id="port" name="port" title="Access Port Number" value="<%=(!"null".equals(request.getParameter("port")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("port")) : "" ) %>" class="freetext" /> - </div><% + </td> + </tr> + <% } else { %><input type="hidden" name="port" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%>" /><% } /* curPage 5 */ @@ -340,16 +399,20 @@ <% if ((tunnelIsClient && !"streamrclient".equals(tunnelType)) || "httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { if (curPage == 5) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("How do you want this tunnel to be accessed? By just this machine, your entire subnet, or external internet?")%> <%=intl._t("You will most likely want to just allow 127.0.0.1")%><% - //XXX TODO<%=intl._t("Note that it is relevant to most Client tunnels, and httpbidirserver and streamrserver tunnels.")%><% - //XXX TODO<%=intl._t("So the wording may need to change slightly for the client vs. server tunnels.")%> + //TODO Note that it is relevant to most Client tunnels, and httpbidirserver and streamrserver tunnels. + //TODO So the wording may need to change slightly for the client vs. server tunnels. %> </p> - <div id="reachField" class="rowItem"> - <label for="reachableBy" accesskey="r"> - <%=intl._t("Reachable by")%>(<span class="accessKey">R</span>): - </label> + </td> + </tr> + <tr> + <td> + <span class="tag"><%=intl._t("Reachable by")%>:</span> <select id="reachableBy" name="reachableBy" title="IP for Client Access" class="selectbox"> <% String clientInterface = request.getParameter("reachableBy"); @@ -368,7 +431,9 @@ } %> </select> - </div><% + </td> + </tr> + <% } else { %><input type="hidden" name="reachableBy" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%>" /><% } /* curPage 5 */ @@ -379,17 +444,22 @@ <% /* Page 6 - Automatic start */ if (curPage == 6) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("The I2P router can automatically start this tunnel for you when the router is started.")%> <%=intl._t("This can be useful for frequently-used tunnels (especially server tunnels), but for tunnels that are only used occassionally it would mean that the I2P router is creating and maintaining unnecessary tunnels.")%> </p> - <div id="startupField" class="rowItem"> - <label for="startOnLoad" accesskey="a"> - <%=intl._t("Auto Start")%>(<span class="accessKey">A</span>): - </label> + </td> + </tr> + <tr> + <td class="options"> <input value="1" type="checkbox" id="startOnLoad" name="startOnLoad" title="Start Tunnel Automatically"<%=("1".equals(request.getParameter("startOnLoad")) ? " checked=\"checked\"" : "")%> class="tickbox" /> - <span class="comment"><%=intl._t("(Check the Box for 'YES')")%></span> - </div><% + <%=intl._t("Automatically start tunnel when router starts")%> + </td> + </tr> + <% } else { if ("1".equals(request.getParameter("startOnLoad"))) { %><input type="hidden" name="startOnLoad" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("startOnLoad"))%>" /><% @@ -401,7 +471,10 @@ <% /* Page 7 - Wizard complete */ if (curPage == 7) { - %><p> + %> + <tr> + <td> + <p> <%=intl._t("The wizard has now collected enough information to create your tunnel.")%> <%=intl._t("Upon clicking the Save button below, the wizard will set up the tunnel, and take you back to the main I2PTunnel page.")%> <% @@ -416,7 +489,11 @@ <p> <%=intl._t("Below is a summary of the options you chose:")%> </p> - <table> + </td> + </tr> + <tr> + <td id="wizardTable"> + <table id="wizardSummary"> <tr><td><%=intl._t("Server or client tunnel?")%></td><td> <%=(tunnelIsClient ? "Client" : "Server")%> </td></tr> @@ -439,10 +516,11 @@ Streamr<% } %> </td></tr> - <tr><td><%=intl._t("Tunnel name and description")%></td><td> - <%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%><br /> - <%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%> - </td></tr><% + <tr><td><%=intl._t("Tunnel name")%></td> + <td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%></td></tr> + <tr><td><%=intl._t("Tunnel description")%></td> + <td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%></td></tr> + <% if (tunnelIsClient) { %> <tr><td><%=intl._t("Tunnel destination")%></td><td><% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %> @@ -452,20 +530,20 @@ } %> </td></tr><% } %> - <tr><td><%=intl._t("Binding address and port")%></td><td><% + <% if ((tunnelIsClient && "streamrclient".equals(tunnelType)) || (!tunnelIsClient && !"streamrserver".equals(tunnelType))) { %> - <%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%><br /><% + <tr><td><%=intl._t("Binding address")%></td><td> + <%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%></td></tr><% } if (!tunnelIsClient) { %> - <%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%><br /><% + <tr><td><%=intl._t("Tunnel port")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%></td></tr><% } if (tunnelIsClient || "httpbidirserver".equals(tunnelType)) { %> - <br /><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%><% + <tr><td><%=intl._t("Port")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%></td></tr><% } if ((tunnelIsClient && !"streamrclient".equals(tunnelType)) || "httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %> - <br /><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%><% + <tr><td><%=intl._t("Reachable by")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%></td></tr><% } %> - </td></tr> <tr><td><%=intl._t("Tunnel auto-start")%></td><td><% if ("1".equals(request.getParameter("startOnLoad"))) { %> Yes<% @@ -474,6 +552,10 @@ } %> </td></tr> </table> + </td> + </tr> + <tr> + <td class="infohelp"> <p> <%=intl._t("Alongside these basic settings, there are a number of advanced options for tunnel configuration.")%> <%=intl._t("The wizard will set reasonably sensible default values for these, but you can view and/or edit these by clicking on the tunnel's name in the main I2PTunnel page.")%> @@ -523,35 +605,33 @@ http://stats.i2p/cgi-bin/jump.cgi?a=" /><% <input type="hidden" name="totalHour" value="0" /> <input type="hidden" name="totalDay" value="0" /> <input type="hidden" name="maxStreams" value="0" /> - <input type="hidden" name="cert" value="0" /><% + <input type="hidden" name="cert" value="0" /> + </td> + </tr> + <% } /* tunnelIsClient */ } /* curPage 7 */ /* End page 7 */ %> - </div> - - <div id="globalOperationsPanel" class="panel"> - <div class="header"></div> - <div class="footer"> - <div class="toolbox"> + <tr> + <td class="buttons"> <a class="control" href="list"><%=intl._t("Cancel")%></a> <% if (curPage != 1 && curPage != 7) { - %><button id="controlPrevious" accesskey="P" class="control" type="submit" name="action" value="Previous page" title="Previous Page"><%=intl._t("Previous")%>(<span class="accessKey">P</span>)</button><% + %><button id="controlPrevious" class="control" type="submit" name="action" value="Previous page" title="Previous Page"><%=intl._t("Previous")%></button><% } %> <% if (curPage == 7) { - %><button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Save changes" title="Save Tunnel"><%=intl._t("Save Tunnel")%>(<span class="accessKey">S</span>)</button><% + %><button id="controlSave" class="control" type="submit" name="action" value="Save changes" title="Save Tunnel"><%=intl._t("Save Tunnel")%></button><% } else if (curPage == 6) { - %><button id="controlFinish" accesskey="F" class="control" type="submit" name="action" value="Next page" title="Finish Wizard"><%=intl._t("Finish")%>(<span class="accessKey">F</span>)</button><% + %><button id="controlFinish" class="control" type="submit" name="action" value="Next page" title="Finish Wizard"><%=intl._t("Finish")%></button><% } else { - %><button id="controlNext" accesskey="N" class="control" type="submit" name="action" value="Next page" title="Next Page"><%=intl._t("Next")%>(<span class="accessKey">N</span>)</button><% + %><button id="controlNext" class="control" type="submit" name="action" value="Next page" title="Next Page"><%=intl._t("Next")%></button><% } %> - </div> - </div> + </td> + </tr> +</table> </div> </form> - <div id="pageFooter"> - </div> </body> </html> -- GitLab