forked from I2P_Developers/i2p.i2p
Merge branch 'i2ptunnel-jsp' into 'master'
i2ptunnel: Edit and wizard form improvements See merge request i2p-hackers/i2p.i2p!154
This commit is contained in:
@ -85,17 +85,11 @@
|
||||
<td>
|
||||
<b><%=intl._t("Port")%>:</b>
|
||||
<%
|
||||
String value = editBean.getClientPort(curTunnel);
|
||||
if (value == null || "".equals(value.trim())) {
|
||||
out.write(" <span class=\"required\"><font color=\"red\">(");
|
||||
out.write(intl._t("required"));
|
||||
out.write(")</font></span>");
|
||||
}
|
||||
String phelp = intl._t("Specify the local port this service should be accessible from");
|
||||
String ptext = canChangePort ? phelp : bStopFirst;
|
||||
String pdisabled = canChangePort ? "" : " readonly=\"readonly\" ";
|
||||
%>
|
||||
<input type="text" size="6" maxlength="5" name="port" title="<%=ptext%>" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="required" <%=pdisabled%>/>
|
||||
<input type="text" size="6" maxlength="5" name="port" title="<%=ptext%>" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="<%=intl._t("required")%>" required <%=pdisabled%>/>
|
||||
</td>
|
||||
<%
|
||||
if ("streamrclient".equals(tunnelType)) {
|
||||
@ -104,13 +98,8 @@
|
||||
<b><%=intl._t("Host")%>:</b>
|
||||
<%
|
||||
String targetHost = editBean.getTargetHost(curTunnel);
|
||||
if (targetHost == null || "".equals(targetHost.trim())) {
|
||||
out.write(" <span class=\"required\"><font color=\"red\">(");
|
||||
out.write(intl._t("required"));
|
||||
out.write(")</font></span>");
|
||||
}
|
||||
%>
|
||||
<input type="text" size="20" id="targetHost" name="targetHost" title="<%=intl._t("Hostname or IP address of the target server")%>" value="<%=targetHost%>" class="freetext host" placeholder="required" />
|
||||
<input type="text" size="20" id="targetHost" name="targetHost" title="<%=intl._t("Hostname or IP address of the target server")%>" value="<%=targetHost%>" class="freetext host" placeholder="<%=intl._t("required")%>" required />
|
||||
</td>
|
||||
<%
|
||||
} else {
|
||||
@ -221,14 +210,7 @@
|
||||
</th>
|
||||
</tr><tr>
|
||||
<td colspan="2">
|
||||
<% String value2 = editBean.getClientDestination(curTunnel);
|
||||
if (value2 == null || "".equals(value2.trim())) {
|
||||
out.write(" <span class=\"required\"><font color=\"red\">(");
|
||||
out.write(intl._t("required"));
|
||||
out.write(")</font></span>");
|
||||
}
|
||||
%>
|
||||
<input type="text" size="30" id="targetDestination" name="targetDestination" title="<%=intl._t("Specify the .i2p address or destination (b32 or b64) of the tunnel here.")%> <%=intl._t("For a random selection from a pool, separate with commas e.g. server1.i2p,server2.i2p")%>" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext destination" placeholder="required" />
|
||||
<input type="text" size="30" id="targetDestination" name="targetDestination" title="<%=intl._t("Specify the .i2p address or destination (b32 or b64) of the tunnel here.")%> <%=intl._t("For a random selection from a pool, separate with commas e.g. server1.i2p,server2.i2p")%>" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext destination" placeholder="<%=intl._t("required")%>" required />
|
||||
<%=intl._t("name, name:port, or destination")%>
|
||||
<%
|
||||
if ("streamrclient".equals(tunnelType)) {
|
||||
@ -746,9 +728,15 @@
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td class="buttons" colspan="2">
|
||||
<a id="controlCancel" class="control" href="list"><%=intl._t("Cancel")%></a>
|
||||
<%
|
||||
if (curTunnel >= 0) {
|
||||
%>
|
||||
<input type="hidden" value="true" name="removeConfirm" />
|
||||
<button id="controlCancel" class="control" type="submit" name="action" value=""><%=intl._t("Cancel")%></button>
|
||||
<button id="controlDelete" class="control delete" type="submit" name="action" value="Delete this proxy" title="<%=intl._t("Delete this Proxy (cannot be undone)")%>"><%=intl._t("Delete")%></button>
|
||||
<button id="controlDelete" class="control delete" type="submit" name="action" value="Delete this proxy" title="<%=intl._t("Delete this Proxy (cannot be undone)")%>" formnovalidate><%=intl._t("Delete")%></button>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<button id="controlSave" class="control" type="submit" name="action" value="Save changes"><%=intl._t("Save")%></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -89,18 +89,13 @@
|
||||
<% } /* !streamrserver */ %>
|
||||
<td>
|
||||
<b><%=intl._t("Port")%>:</b>
|
||||
<% String value = editBean.getTargetPort(curTunnel);
|
||||
if (value == null || "".equals(value.trim())) {
|
||||
out.write(" <span class=\"required\"><font color=\"red\">(");
|
||||
out.write(intl._t("required"));
|
||||
out.write(")</font></span>");
|
||||
}
|
||||
<%
|
||||
String asphelp = intl._t("Specify the local port this service should be accessible from");
|
||||
String bsphelp = intl._t("Specify the port the server is running on");
|
||||
String ptext = canChangePort ? (isStreamrServer ? asphelp : bsphelp) : stopFirst;
|
||||
String pdisabled = canChangePort ? "" : " readonly=\"readonly\" ";
|
||||
%>
|
||||
<input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="<%=ptext%>" value="<%=editBean.getTargetPort(curTunnel)%>" class="freetext port" placeholder="required" <%=pdisabled%>/>
|
||||
<input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="<%=ptext%>" value="<%=editBean.getTargetPort(curTunnel)%>" class="freetext port" placeholder="<%=intl._t("required")%>" required <%=pdisabled%> />
|
||||
<% if (!isStreamrServer) { %>
|
||||
<label title="<%=intl._t("To avoid traffic sniffing if connecting to a remote server, you can enable an SSL connection. Note that the target server must be configured to accept SSL connections.")%>"><input value="1" type="checkbox" name="useSSL"<%=(editBean.isSSLEnabled(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
|
||||
<%=intl._t("Use SSL to connect to target")%></label>
|
||||
@ -115,16 +110,11 @@
|
||||
<td>
|
||||
<b><%=intl._t("Port")%>:</b>
|
||||
|
||||
<% String value4 = editBean.getClientPort(curTunnel);
|
||||
if (value4 == null || "".equals(value4.trim())) {
|
||||
out.write(" <span class=\"required\"><font color=\"red\">(");
|
||||
out.write(intl._t("required"));
|
||||
out.write(")</font></span>");
|
||||
}
|
||||
<%
|
||||
String csphelp = intl._t("Port required to access service (this can be a different port to the port the service is hosted on)");
|
||||
String dsphelp = canChangePort ? csphelp : stopFirst;
|
||||
%>
|
||||
<input type="text" size="6" maxlength="5" name="port" title="<%=dsphelp%>" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="required" <%=pdisabled%>/>
|
||||
<input type="text" size="6" maxlength="5" name="port" title="<%=dsphelp%>" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="<%=intl._t("required")%>" required <%=pdisabled%> />
|
||||
</td>
|
||||
<% } /* httpbidirserver */
|
||||
if (isBidirServer || isStreamrServer) {
|
||||
@ -184,17 +174,11 @@
|
||||
<div class="displayText resetScrollLeft" title="<%=intl._t("Read Only: Local Destination (if known)")%>" tabindex="0"><%=editBean.getDestinationBase64(curTunnel)%></div>
|
||||
</td><td>
|
||||
<%
|
||||
String value3 = editBean.getPrivateKeyFile(curTunnel);
|
||||
if (value3 == null || "".equals(value3.trim())) {
|
||||
out.write(" <span class=\"required\"><font color=\"red\">(");
|
||||
out.write(intl._t("required"));
|
||||
out.write(")</font></span>");
|
||||
}
|
||||
String htext = intl._t("Path to Private Key File");
|
||||
String dtext = canChangeDest ? htext : stopFirst;
|
||||
String ddisabled = canChangeDest ? "" : " readonly=\"readonly\" ";
|
||||
%>
|
||||
<input type="text" size="30" id="privKeyFile" name="privKeyFile" title="<%=dtext%>" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" placeholder="required" <%=ddisabled%>/>
|
||||
<input type="text" size="30" id="privKeyFile" name="privKeyFile" title="<%=dtext%>" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" placeholder="<%=intl._t("required")%>" required <%=ddisabled%> />
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
@ -1024,9 +1008,15 @@
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td class="buttons" colspan="2">
|
||||
<a id="controlCancel" class="control" href="list"><%=intl._t("Cancel")%></a>
|
||||
<%
|
||||
if (curTunnel >= 0) {
|
||||
%>
|
||||
<input type="hidden" value="true" name="removeConfirm" />
|
||||
<button id="controlCancel" class="control" type="submit" name="action" value=""><%=intl._t("Cancel")%></button>
|
||||
<button id="controlDelete" class="control delete" type="submit" name="action" value="Delete this proxy" title="<%=intl._t("Delete this Proxy (cannot be undone)")%>"><%=intl._t("Delete")%></button>
|
||||
<button id="controlDelete" class="control delete" type="submit" name="action" value="Delete this proxy" title="<%=intl._t("Delete this Proxy (cannot be undone)")%>" formnovalidate><%=intl._t("Delete")%></button>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<button id="controlSave" class="control" type="submit" name="action" value="Save changes"><%=intl._t("Save")%></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -2,8 +2,7 @@
|
||||
%><%@page pageEncoding="UTF-8"
|
||||
%><%@page contentType="text/html" import="java.io.File,java.io.IOException,net.i2p.crypto.KeyStoreUtil,net.i2p.data.DataHelper,net.i2p.jetty.JettyXmlConfigurationParser"
|
||||
%><%@page
|
||||
%><?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
%><!DOCTYPE html>
|
||||
<%
|
||||
/* right now using EditBean instead of IndexBean for getSpoofedHost() */
|
||||
/* but might want to POST to it anyway ??? */
|
||||
@ -557,14 +556,14 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
|
||||
<%--
|
||||
<tr><th colspan="4"><%=intl._t("Add Port Routing")%></th></tr>
|
||||
<tr><td>
|
||||
<input type="text" size="6" maxlength="5" id="i2pPort" name="i2pPort" title="<%=intl._t("Specify the port the server is running on")%>" value="" class="freetext port" placeholder="required" />
|
||||
<input type="text" size="6" maxlength="5" id="i2pPort" name="i2pPort" title="<%=intl._t("Specify the port the server is running on")%>" value="" class="freetext port" placeholder="<%=intl._t("required")%>" required />
|
||||
</td><td>
|
||||
<input type="text" size="20" id="websiteName" name="spoofedHost" title="<%=intl._t("Website Hostname e.g. mysite.i2p")%>" value="<%=name%>" class="freetext" />
|
||||
</td><td>
|
||||
<input value="1" type="checkbox" name="useSSL" class="tickbox" />
|
||||
</td><td>
|
||||
<input type="text" size="20" name="targetHost" title="<%=intl._t("Hostname or IP address of the target server")%>" value="<%=targetHost%>" class="freetext host" /> :
|
||||
<input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="<%=intl._t("Specify the port the server is running on")%>" value="" class="freetext port" placeholder="required" />
|
||||
<input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="<%=intl._t("Specify the port the server is running on")%>" value="" class="freetext port" placeholder="<%=intl._t("required")%>" required />
|
||||
</td></tr>
|
||||
--%>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
@ -909,30 +909,6 @@ td.blankColumn {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.required:not(old) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
input::-moz-placeholder {
|
||||
color: #f00;
|
||||
font-weight: bold;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
color: #f00;
|
||||
font-weight: bold;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
input:focus::-moz-placeholder {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
:focus::-webkit-input-placeholder {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
input.tunnelName, input.tunnelDescriptionText, #userAgents {
|
||||
width: 80%;
|
||||
min-width: 280px;
|
||||
@ -1051,16 +1027,6 @@ input.tunnelName, input.tunnelDescriptionText, #userAgents {
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
#wizardPanel input::-moz-placeholder {
|
||||
color: #bb7;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#wizardPanel ::-webkit-input-placeholder {
|
||||
color: #bb7;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#wizardPanel .options {
|
||||
padding: 10px;
|
||||
}
|
||||
|
@ -785,28 +785,6 @@ table#statusMessages textarea, table#statusMessages textarea:active {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.required:not(old) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
input::-moz-placeholder {
|
||||
color: #f00;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
input:focus::-moz-placeholder {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
color: #f00;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
:focus::-webkit-input-placeholder {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
input.tunnelName, input.tunnelDescriptionText, #userAgents, .freetext.tunnelDescription {
|
||||
width: 80%;
|
||||
min-width: 280px !important;
|
||||
@ -919,16 +897,6 @@ input.tunnelName, input.tunnelDescriptionText, #userAgents, .freetext.tunnelDesc
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
#wizardPanel input::-moz-placeholder {
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#wizardPanel ::-webkit-input-placeholder {
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#wizardPanel .options {
|
||||
padding: 10px;
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
<%@include file="headers.jsi"
|
||||
%><%@page pageEncoding="UTF-8"
|
||||
%><%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean"
|
||||
%><?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
%><!DOCTYPE html>
|
||||
<jsp:useBean class="net.i2p.i2ptunnel.web.EditBean" id="editBean" scope="request" />
|
||||
<jsp:useBean class="net.i2p.i2ptunnel.ui.Messages" id="intl" scope="request" />
|
||||
<% String pageStr = request.getParameter("page");
|
||||
@ -49,11 +48,8 @@
|
||||
<link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="tunnelWizardPage">
|
||||
|
||||
<form method="post" action="<%=(curPage == 7 ? "list" : "wizard") %>">
|
||||
|
||||
<div id="wizardPanel" class="panel">
|
||||
|
||||
<%
|
||||
if (curPage == 1) {
|
||||
%><h2><%=intl._t("Server or client tunnel?")%></h2><%
|
||||
@ -73,8 +69,60 @@
|
||||
<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()%>" />
|
||||
|
||||
|
||||
<%
|
||||
/* hidden form data from other pages */
|
||||
if (curPage != 1) {
|
||||
%><input type="hidden" name="isClient" value="<%=tunnelIsClient%>" /><%
|
||||
}
|
||||
if (curPage != 2) {
|
||||
%><input type="hidden" name="type" value="<%=tunnelType%>" /><%
|
||||
}
|
||||
if (curPage != 3) {
|
||||
String name = net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_name"));
|
||||
if (name.length() == 0)
|
||||
name = "New tunnel";
|
||||
%><input type="hidden" name="nofilter_name" value="<%=name%>" />
|
||||
<input type="hidden" name="nofilter_description" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%>" /><%
|
||||
}
|
||||
if (curPage != 4 && tunnelIsClient &&
|
||||
("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType))) {
|
||||
%><input type="hidden" name="targetDestination" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination"))%>" />
|
||||
<input type="hidden" name="proxyList" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("proxyList"))%>" /><%
|
||||
}
|
||||
if (curPage != 5) {
|
||||
if (tunnelIsClient) {
|
||||
%><input type="hidden" name="port" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%>" />
|
||||
<input type="hidden" name="reachableBy" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%>" /><%
|
||||
} else {
|
||||
String ip = net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"));
|
||||
if (ip.length() == 0)
|
||||
ip = "127.0.0.1";
|
||||
%><input type="hidden" name="targetHost" value="<%=ip%>" />
|
||||
<input type="hidden" name="targetPort" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%>" /><%
|
||||
}
|
||||
}
|
||||
if (curPage != 6 &&
|
||||
"1".equals(request.getParameter("startOnLoad"))) {
|
||||
%><input type="hidden" name="startOnLoad" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("startOnLoad"))%>" /><%
|
||||
}
|
||||
if (curPage == 7) {
|
||||
/* defaults */
|
||||
%><input type="hidden" name="tunnelDepth" value="3" />
|
||||
<input type="hidden" name="tunnelVariance" value="0" />
|
||||
<input type="hidden" name="tunnelQuantity" value="2" />
|
||||
<input type="hidden" name="tunnelBackupQuantity" value="0" />
|
||||
<input type="hidden" name="clientHost" value="internal" />
|
||||
<input type="hidden" name="clientport" value="internal" />
|
||||
<input type="hidden" name="reduceCount" value="1" />
|
||||
<input type="hidden" name="reduceTime" value="20" /><%
|
||||
if (tunnelIsClient) { /* Client-only defaults */
|
||||
%><input type="hidden" name="newDest" value="0" />
|
||||
<input type="hidden" name="closeTime" value="30" /><%
|
||||
} else { /* Server-only defaults */
|
||||
%><input type="hidden" name="privKeyFile" value="<%=editBean.getPrivateKeyFile(-1)%>" /><%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<table>
|
||||
<% /* Page 1 - Whether to make a client or server tunnel */
|
||||
|
||||
@ -106,8 +154,6 @@
|
||||
</tr>
|
||||
|
||||
<%
|
||||
} else {
|
||||
%><input type="hidden" name="isClient" value="<%=tunnelIsClient%>" /><%
|
||||
} /* curPage 1 */
|
||||
|
||||
/* End page 1 */ %>
|
||||
@ -197,8 +243,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
%><input type="hidden" name="type" value="<%=tunnelType%>" /><%
|
||||
} /* curPage 2 */
|
||||
|
||||
/* End page 2 */ %>
|
||||
@ -218,19 +262,16 @@
|
||||
<tr>
|
||||
<td>
|
||||
<span class="tag"><%=intl._t("Name")%>:</span>
|
||||
<input type="text" size="30" maxlength="50" name="nofilter_name" id="name" placeholder="New Tunnel" title="<%=intl._t("Name of tunnel to be displayed on Tunnel Manager home page and the router console sidebar")%>" value="<%=(!"null".equals(request.getParameter("nofilter_name")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_name")) : "" ) %>" class="freetext" />
|
||||
<input type="text" size="30" maxlength="50" name="nofilter_name" id="name" title="<%=intl._t("Name of tunnel to be displayed on Tunnel Manager home page and the router console sidebar")%>" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_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="<%=intl._t("Description of tunnel to be displayed on Tunnel Manager home page")%>" value="<%=(!"null".equals(request.getParameter("nofilter_description")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description")) : "" ) %>" class="freetext" />
|
||||
<input type="text" size="60" maxlength="80" name="nofilter_description" id="description" title="<%=intl._t("Description of tunnel to be displayed on Tunnel Manager home page")%>" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%>" class="freetext" />
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
%><input type="hidden" name="nofilter_name" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_name"))%>" />
|
||||
<input type="hidden" name="nofilter_description" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%>" /><%
|
||||
} /* curPage 3 */
|
||||
|
||||
/* End page 3 */ %>
|
||||
@ -252,12 +293,10 @@
|
||||
<tr>
|
||||
<td>
|
||||
<span class="tag"><%=intl._t("Outproxies")%>:</span>
|
||||
<input type="text" size="30" id="proxyList" name="proxyList" title="<%=intl._t("List of I2P outproxy destinations, separated with commas (e.g. proxy1.i2p,proxy2.i2p)")%>" value="<%=(!"null".equals(request.getParameter("proxyList")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("proxyList")) : "" ) %>" class="freetext" />
|
||||
<input type="text" size="30" id="proxyList" name="proxyList" title="<%=intl._t("List of I2P outproxy destinations, separated with commas (e.g. proxy1.i2p,proxy2.i2p)")%>" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("proxyList"))%>" class="freetext" />
|
||||
</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)) {
|
||||
if (curPage == 4) {
|
||||
@ -273,14 +312,12 @@
|
||||
<tr>
|
||||
<td>
|
||||
<span class="tag"><%=intl._t("Tunnel Destination")%>:</span>
|
||||
<input type="text" size="30" id="targetDestination" name="targetDestination" title="<%=intl._t("Enter a b64 or .i2p address here")%>" value="<%=(!"null".equals(request.getParameter("targetDestination")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination")) : "" ) %>" class="freetext" />
|
||||
<input type="text" size="30" id="targetDestination" name="targetDestination" title="<%=intl._t("Enter a b64 or .i2p address here")%>" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination")) %>" class="freetext" placeholder="<%=intl._t("required")%>" required />
|
||||
(<%=intl._t("name, name:port, or destination")%>
|
||||
)
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
%><input type="hidden" name="targetDestination" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination"))%>" /><%
|
||||
} /* curPage 4 */
|
||||
}
|
||||
} /* tunnelIsClient */
|
||||
@ -303,18 +340,9 @@
|
||||
<tr>
|
||||
<td>
|
||||
<span class="tag"><%=intl._t("Host")%>:</span>
|
||||
<input type="text" size="20" id="targetHost" name="targetHost" title="<%=intl._t("Hostname or IP address of the target server")%>" 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" />
|
||||
<input type="text" size="20" id="targetHost" name="targetHost" title="<%=intl._t("Hostname or IP address of the target server")%>" placeholder="<%=intl._t("required")%>" required value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%>" class="freetext" />
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
%><input type="hidden" name="targetHost" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%>" /><%
|
||||
} /* curPage 5 */
|
||||
} /* streamrclient or !streamrserver */ %>
|
||||
<%
|
||||
if (!tunnelIsClient) {
|
||||
if (curPage == 5) {
|
||||
%>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
@ -325,12 +353,10 @@
|
||||
<tr>
|
||||
<td>
|
||||
<span class="tag"><%=intl._t("Port")%>:</span>
|
||||
<input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="<%=intl._t("Specify the port the server is running on")%>" value="<%=(!"null".equals(request.getParameter("targetPort")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort")) : "" ) %>" class="freetext" />
|
||||
<input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="<%=intl._t("Specify the port the server is running on")%>" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%>" class="freetext" placeholder="<%=intl._t("required")%>" required />
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
%><input type="hidden" name="targetPort" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%>" /><%
|
||||
} /* curPage 5 */
|
||||
} /* !tunnelIsClient */ %>
|
||||
<%
|
||||
@ -347,18 +373,9 @@
|
||||
<tr>
|
||||
<td>
|
||||
<span class="tag"><%=intl._t("Port")%>:</span>
|
||||
<input type="text" size="6" maxlength="5" id="port" name="port" title="<%=intl._t("Specify the local port this service should be accessible from")%>" value="<%=(!"null".equals(request.getParameter("port")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("port")) : "" ) %>" class="freetext" />
|
||||
<input type="text" size="6" maxlength="5" id="port" name="port" title="<%=intl._t("Specify the local port this service should be accessible from")%>" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%>" class="freetext" placeholder="<%=intl._t("required")%>" required />
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
%><input type="hidden" name="port" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%>" /><%
|
||||
} /* curPage 5 */
|
||||
} /* tunnelIsClient or httpbidirserver */ %>
|
||||
<%
|
||||
if (tunnelIsClient) {
|
||||
if (curPage == 5) {
|
||||
%>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
@ -375,7 +392,7 @@
|
||||
<select id="reachableBy" name="reachableBy" title="<%=intl._t("Listening interface (IP address) for client access (normally 127.0.0.1)")%>" class="selectbox">
|
||||
<%
|
||||
String clientInterface = request.getParameter("reachableBy");
|
||||
if ("null".equals(clientInterface)) {
|
||||
if (null == clientInterface) {
|
||||
clientInterface = "127.0.0.1";
|
||||
}
|
||||
for (String ifc : editBean.interfaceSet()) {
|
||||
@ -393,10 +410,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
%><input type="hidden" name="reachableBy" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%>" /><%
|
||||
} /* curPage 5 */
|
||||
} /* (tunnelIsClient && !streamrclient) || httpbidirserver || streamrserver */
|
||||
} /* tunnelIsClient */
|
||||
|
||||
/* End page 5 */ %>
|
||||
|
||||
@ -419,10 +434,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
if ("1".equals(request.getParameter("startOnLoad"))) {
|
||||
%><input type="hidden" name="startOnLoad" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("startOnLoad"))%>" /><%
|
||||
}
|
||||
} /* curPage 6 */
|
||||
|
||||
/* End page 6 */ %>
|
||||
@ -486,15 +497,11 @@
|
||||
<%
|
||||
if (!tunnelIsClient) { %>
|
||||
<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("targetHost"))%></td></tr>
|
||||
<tr><td><%=intl._t("Tunnel port")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%></td></tr><%
|
||||
}
|
||||
if (tunnelIsClient) { %>
|
||||
<tr><td><%=intl._t("Port")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%></td></tr><%
|
||||
}
|
||||
if (tunnelIsClient) { %>
|
||||
<tr><td><%=intl._t("Port")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%></td></tr>
|
||||
<tr><td><%=intl._t("Reachable by")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%></td></tr><%
|
||||
} %>
|
||||
<tr><td><%=intl._t("Tunnel auto-start")%></td><td><%
|
||||
@ -513,25 +520,9 @@
|
||||
<%=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.")%>
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="tunnelDepth" value="3" />
|
||||
<input type="hidden" name="tunnelVariance" value="0" />
|
||||
<input type="hidden" name="tunnelQuantity" value="2" />
|
||||
<input type="hidden" name="tunnelBackupQuantity" value="0" />
|
||||
<input type="hidden" name="clientHost" value="internal" />
|
||||
<input type="hidden" name="clientport" value="internal" />
|
||||
<input type="hidden" name="reduceCount" value="1" />
|
||||
<input type="hidden" name="reduceTime" value="20" /><%
|
||||
|
||||
if (tunnelIsClient) { /* Client-only defaults */
|
||||
%><input type="hidden" name="newDest" value="0" />
|
||||
<input type="hidden" name="closeTime" value="30" /><%
|
||||
} else { /* Server-only defaults */
|
||||
%><input type="hidden" name="privKeyFile" value="<%=editBean.getPrivateKeyFile(-1)%>" />
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} /* tunnelIsClient */
|
||||
} /* curPage 7 */
|
||||
|
||||
/* End page 7 */ %>
|
||||
@ -539,7 +530,7 @@
|
||||
<td class="buttons">
|
||||
<a class="control" title="<%=intl._t("Cancel the wizard and return to Tunnel Manager home page")%>" href="list"><%=intl._t("Cancel")%></a>
|
||||
<% if (curPage != 1 && curPage != 7) {
|
||||
%><button id="controlPrevious" class="control" type="submit" name="action" value="Previous page" title="<%=intl._t("Return to previous page")%>"><%=intl._t("Previous")%></button><%
|
||||
%><button id="controlPrevious" class="control" type="submit" name="action" value="Previous page" title="<%=intl._t("Return to previous page")%>" formnovalidate><%=intl._t("Previous")%></button><%
|
||||
} %>
|
||||
<% if (curPage == 7) {
|
||||
%><button id="controlSave" class="control" type="submit" name="action" value="Save changes" title="<%=intl._t("Save tunnel configuration")%>"><%=intl._t("Save Tunnel")%></button><%
|
||||
@ -552,8 +543,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user