2012-01-21 05:30:23 +00:00
<%
// NOTE: Do the header carefully so there is no whitespace before the <?xml... line
2012-03-01 05:03:29 +00:00
// http://www.crazysquirrel.com/computing/general/form-encoding.jspx
if (request.getCharacterEncoding() == null)
request.setCharacterEncoding("UTF-8");
2012-05-13 13:05:17 +00:00
response.setHeader("X-Frame-Options", "SAMEORIGIN");
2014-07-26 11:01:16 +00:00
response.setHeader("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'");
2014-07-26 09:32:26 +00:00
response.setHeader("X-XSS-Protection", "1; mode=block");
2012-05-13 13:05:17 +00:00
2012-01-21 05:30:23 +00:00
%><%@page pageEncoding="UTF-8"
2012-02-25 19:37:54 +00:00
%><%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean"
2012-01-21 05:30:23 +00:00
%><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2012-02-25 19:37:54 +00:00
<jsp:useBean class="net.i2p.i2ptunnel.web.EditBean" id="editBean" scope="request" />
2012-01-21 05:30:23 +00:00
<jsp:useBean class="net.i2p.i2ptunnel.web.Messages" id="intl" scope="request" />
<% String pageStr = request.getParameter("page");
2012-02-02 03:43:13 +00:00
/* Get the number of the page we came from */
2012-02-01 23:03:00 +00:00
int lastPage = 0;
2012-01-21 05:30:23 +00:00
if (pageStr != null) {
try {
2012-02-01 23:03:00 +00:00
lastPage = Integer.parseInt(pageStr);
if (lastPage > 7 || lastPage < 0) {
lastPage = 0;
2012-01-21 05:30:23 +00:00
}
} catch (NumberFormatException nfe) {
2012-02-01 23:03:00 +00:00
lastPage = 0;
2012-01-21 05:30:23 +00:00
}
}
2012-02-02 03:43:13 +00:00
/* Determine what page to display now */
2012-02-01 23:03:00 +00:00
int curPage = 1;
2012-02-01 10:47:09 +00:00
if ("Previous page".equals(request.getParameter("action"))) {
2012-02-01 23:03:00 +00:00
curPage = lastPage - 1;
} else {
curPage = lastPage + 1;
}
if (curPage > 7 || curPage <= 0) {
curPage = 1;
2012-02-01 03:48:39 +00:00
}
2012-02-02 03:43:13 +00:00
/* Fetch and format a couple of regularly-used values */
2012-01-27 02:52:39 +00:00
boolean tunnelIsClient = Boolean.valueOf(request.getParameter("isClient"));
2012-01-26 03:18:50 +00:00
String tunnelType = request.getParameter("type");
2014-07-26 09:32:26 +00:00
tunnelType = net.i2p.data.DataHelper.stripHTML(tunnelType);
2012-02-02 03:43:13 +00:00
/* Special case - don't display page 4 for server tunnels */
if (curPage == 4 && !tunnelIsClient) {
if ("Previous page".equals(request.getParameter("action"))) {
curPage = curPage - 1;
} else {
curPage = curPage + 1;
}
}
2012-01-21 05:30:23 +00:00
%>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
2015-09-25 19:55:36 +00:00
<title><%=intl._t("I2P Tunnel Manager - Tunnel Creation Wizard")%></title>
2012-02-16 11:34:36 +00:00
2012-01-21 05:30:23 +00:00
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
2012-02-16 11:34:36 +00:00
2012-02-25 19:37:54 +00:00
<% if (editBean.allowCSS()) {
2012-07-30 13:15:58 +00:00
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
2012-07-10 21:29:49 +00:00
<link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" />
2012-02-25 19:37:54 +00:00
<link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" />
2012-01-21 05:30:23 +00:00
<% }
%>
</head>
<body id="tunnelWizardPage">
<div id="pageHeader">
</div>
2012-02-01 23:03:00 +00:00
<form method="post" action="<%=(curPage == 7 ? "list" : "wizard") %>">
2012-01-21 05:30:23 +00:00
<div id="wizardPanel" class="panel">
<div class="header">
<%
if (curPage == 1) {
2015-09-25 19:55:36 +00:00
%><h4><%=intl._t("Server or client tunnel?")%></h4><%
2012-01-22 00:11:29 +00:00
} else if (curPage == 2) {
2015-09-25 19:55:36 +00:00
%><h4><%=intl._t("Tunnel type")%></h4><%
2012-01-22 00:11:29 +00:00
} else if (curPage == 3) {
2015-09-25 19:55:36 +00:00
%><h4><%=intl._t("Tunnel name and description")%></h4><%
2012-01-22 00:11:29 +00:00
} else if (curPage == 4 && tunnelIsClient) {
2015-09-25 19:55:36 +00:00
%><h4><%=intl._t("Tunnel destination")%></h4><%
2012-01-22 00:11:29 +00:00
} else if (curPage == 5) {
2015-09-25 19:55:36 +00:00
%><h4><%=intl._t("Binding address and port")%></h4><%
2012-01-22 00:11:29 +00:00
} else if (curPage == 6) {
2015-09-25 19:55:36 +00:00
%><h4><%=intl._t("Tunnel auto-start")%></h4><%
2012-01-22 00:11:29 +00:00
} else if (curPage == 7) {
2015-09-25 19:55:36 +00:00
%><h4><%=intl._t("Wizard completed")%></h4><%
2012-01-21 05:30:23 +00:00
} %>
2012-02-01 23:03:00 +00:00
<input type="hidden" name="page" value="<%=curPage%>" />
2012-01-22 00:21:13 +00:00
<input type="hidden" name="tunnel" value="null" />
2012-02-25 19:37:54 +00:00
<input type="hidden" name="nonce" value="<%=editBean.getNextNonce()%>" />
2012-01-21 05:30:23 +00:00
</div>
<div class="separator">
<hr />
</div>
2012-01-25 00:06:18 +00:00
<% /* Page 1 - Whether to make a client or server tunnel */
2012-01-21 05:30:23 +00:00
if (curPage == 1) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=intl._t("This wizard will take you through the various options available for creating tunnels in I2P.")%>
2012-02-11 22:25:16 +00:00
</p>
<p>
2015-09-25 19:55:36 +00:00
<%=intl._t("The first thing to decide is whether you want to create a server or a client tunnel.")%>
<%=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.")%>
2012-02-03 17:07:10 +00:00
</p>
<div id="typeField" class="rowItem">
2015-09-25 19:55:36 +00:00
<label><%=intl._t("Server Tunnel")%></label>
2012-01-27 02:52:39 +00:00
<input value="false" type="radio" id="baseType" name="isClient" class="tickbox" />
2015-09-25 19:55:36 +00:00
<label><%=intl._t("Client Tunnel")%></label>
2012-02-01 23:34:15 +00:00
<input value="true" type="radio" id="baseType" name="isClient" class="tickbox" checked="checked" />
2012-01-21 05:30:23 +00:00
</div><%
} else {
2012-01-22 00:11:29 +00:00
%><input type="hidden" name="isClient" value="<%=tunnelIsClient%>" /><%
2012-01-25 00:06:18 +00:00
} /* curPage 1 */
/* End page 1 */ %>
<% /* Page 2 - Tunnel type */
2012-01-22 00:11:29 +00:00
2012-01-22 02:44:51 +00:00
if (curPage == 2) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=intl._t("There are several types of tunnels to choose from:")%>
2012-02-03 17:07:10 +00:00
</p>
2012-02-11 23:54:38 +00:00
<table><%
2012-02-03 17:07:10 +00:00
if (tunnelIsClient) {
%>
2015-09-25 19:55:36 +00:00
<tr><td><%=intl._t("Standard")%></td><td>
<%=intl._t("Basic tunnel for connecting to a single service inside I2P.")%>
<%=intl._t("Try this if none of the tunnel types below fit your requirements, or you don't know what type of tunnel you need.")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>HTTP</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("Tunnel that acts as an HTTP proxy for reaching eepsites inside I2P.")%>
<%=intl._t("Set your browser to use this tunnel as an http proxy, or set your \"http_proxy\" environment variable for command-line applications in GNU/Linux.")%>
<%=intl._t("Websites outside I2P can also be reached if an HTTP proxy within I2P is known.")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>IRC</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("Customised client tunnel specific for IRC connections.")%>
<%=intl._t("With this tunnel type, your IRC client will be able to connect to an IRC network inside I2P.")%>
<%=intl._t("Each IRC network in I2P that you wish to connect to will require its own tunnel. (See Also, SOCKS IRC)")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>SOCKS 4/4a/5</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("A tunnel that implements the SOCKS protocol.")%>
<%=intl._t("This enables both TCP and UDP connections to be made through a SOCKS outproxy within I2P.")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>SOCKS IRC</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("A client tunnel implementing the SOCKS protocol, which is customised for connecting to IRC networks.")%>
<%=intl._t("With this tunnel type, IRC networks in I2P can be reached by typing the I2P address into your IRC client, and configuring the IRC client to use this SOCKS tunnel.")%>
<%=intl._t("This means that only one I2P tunnel is required rather than a separate tunnel per IRC network.")%>
<%=intl._t("IRC networks outside I2P can also be reached if a SOCKS outproxy within I2P is known, though it depends on whether or not the outproxy has been blocked by the IRC network.")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>CONNECT</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("A client tunnel that implements the HTTP CONNECT command.")%>
<%=intl._t("This enables TCP connections to be made through an HTTP outproxy, assuming the proxy supports the CONNECT command.")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>Streamr</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("A customised client tunnel for Streamr.")%><%
//XXX TODO<%=intl._t("I have no idea what this is.")%>
2012-02-11 23:54:38 +00:00
</td></tr><%
2012-02-03 17:07:10 +00:00
} else {
%>
2015-09-25 19:55:36 +00:00
<tr><td><%=intl._t("Standard")%></td><td>
<%=intl._t("A basic server tunnel for hosting a generic service inside I2P.")%>
<%=intl._t("Try this if none of the tunnel types below fit your requirements, or you don't know what type of tunnel you need.")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>HTTP</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("A server tunnel that is customised for HTTP connections.")%>
<%=intl._t("Use this tunnel type if you want to host an eepsite.")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>HTTP bidir</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("A customised server tunnel that can both serve HTTP data and connect to other server tunnels.")%>
<%=intl._t("This tunnel type is predominantly used when running a Seedless server.")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>IRC</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("A customised server tunnel for hosting IRC networks inside I2P.")%>
<%=intl._t("Usually, a separate tunnel needs to be created for each IRC server that is to be accessible inside I2P.")%>
2012-02-11 23:54:38 +00:00
</td></tr>
<tr><td>Streamr</td><td>
2015-09-25 19:55:36 +00:00
<%=intl._t("A customised server tunnel for Streamr.")%><%
//XXX TODO<%=intl._t("I have no idea what this is.")%>
2012-02-11 23:54:38 +00:00
</td></tr><%
2012-02-03 17:07:10 +00:00
}
%>
2012-02-11 23:54:38 +00:00
</table>
2012-02-03 17:07:10 +00:00
<div id="typeField" class="rowItem">
2012-01-22 02:44:51 +00:00
<%
if (tunnelIsClient) {
2012-01-22 00:11:29 +00:00
%><select name="type">
2015-09-25 19:55:36 +00:00
<option value="client"><%=intl._t("Standard")%></option>
2014-01-25 17:56:35 +00:00
<option value="httpclient">HTTP/CONNECT</option>
2012-01-22 00:11:29 +00:00
<option value="ircclient">IRC</option>
<option value="sockstunnel">SOCKS 4/4a/5</option>
<option value="socksirctunnel">SOCKS IRC</option>
<option value="connectclient">CONNECT</option>
<option value="streamrclient">Streamr</option>
</select><%
} else {
%><select name="type">
2015-09-25 19:55:36 +00:00
<option value="server"><%=intl._t("Standard")%></option>
2012-01-22 00:11:29 +00:00
<option value="httpserver">HTTP</option>
<option value="httpbidirserver">HTTP bidir</option>
<option value="ircserver">IRC</option>
<option value="streamrserver">Streamr</option>
</select><%
2012-01-22 02:44:51 +00:00
} /* tunnelIsClient */ %>
2012-01-22 00:11:29 +00:00
</div><%
} else {
2012-01-22 04:23:45 +00:00
%><input type="hidden" name="type" value="<%=tunnelType%>" /><%
2012-01-25 00:06:18 +00:00
} /* curPage 2 */
/* End page 2 */ %>
<% /* Page 3 - Name and description */
2012-01-22 02:37:39 +00:00
2012-01-22 02:44:51 +00:00
if (curPage == 3) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=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.")%>
2012-02-03 17:07:10 +00:00
</p>
<div id="nameField" class="rowItem">
2012-01-22 02:37:39 +00:00
<label for="name" accesskey="N">
2015-09-25 19:55:36 +00:00
<%=intl._t("Name")%>:(<span class="accessKey">N</span>)
2012-01-22 02:37:39 +00:00
</label>
2014-07-26 09:32:26 +00:00
<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" />
2012-01-22 02:37:39 +00:00
</div>
<div id="descriptionField" class="rowItem">
<label for="description" accesskey="e">
2015-09-25 19:55:36 +00:00
<%=intl._t("Description")%>:(<span class="accessKey">E</span>)
2012-01-22 02:37:39 +00:00
</label>
2014-10-24 14:25:33 +00:00
<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" />
2012-01-22 02:37:39 +00:00
</div><%
} else {
2014-07-26 09:32:26 +00:00
%><input type="hidden" name="name" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%>" />
2014-10-24 14:25:33 +00:00
<input type="hidden" name="nofilter_description" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%>" /><%
2012-01-25 00:06:18 +00:00
} /* curPage 3 */
/* End page 3 */ %>
<% /* Page 4 - Target destination or proxy list */
2012-01-21 05:30:23 +00:00
2012-01-22 04:23:45 +00:00
if (tunnelIsClient) {
2012-01-22 22:03:26 +00:00
if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) {
if (curPage == 4) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=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.")%>
2012-02-03 17:07:10 +00:00
</p>
<div id="destinationField" class="rowItem">
2012-01-22 04:23:45 +00:00
<label for="proxyList" accesskey="x">
2015-09-25 19:55:36 +00:00
<%=intl._t("Outproxies")%>(<span class="accessKey">x</span>):
2012-01-22 04:23:45 +00:00
</label>
2014-07-26 09:32:26 +00:00
<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" />
2012-01-22 04:23:45 +00:00
</div><%
2012-01-22 22:03:26 +00:00
} else {
2014-07-26 09:32:26 +00:00
%><input type="hidden" name="proxyList" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("proxyList"))%>" /><%
2012-01-22 22:03:26 +00:00
} /* curPage 4 */
} else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) {
if (curPage == 4) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=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.")%>
2012-02-03 17:07:10 +00:00
</p>
<div id="destinationField" class="rowItem">
2012-01-22 04:23:45 +00:00
<label for="targetDestination" accesskey="T">
2015-09-25 19:55:36 +00:00
<%=intl._t("Tunnel Destination")%>(<span class="accessKey">T</span>):
2012-01-22 04:23:45 +00:00
</label>
2014-07-26 09:32:26 +00:00
<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" />
2015-09-25 19:55:36 +00:00
<span class="comment">(<%=intl._t("name, name:port, or destination")%>
2013-10-23 20:20:54 +00:00
<% if ("streamrclient".equals(tunnelType)) { /* deferred resolution unimplemented in streamr client */ %>
2015-09-25 19:55:36 +00:00
- <%=intl._t("b32 not recommended")%>
2013-10-23 20:20:54 +00:00
<% } %> )
</span>
2012-01-22 04:23:45 +00:00
</div><%
2012-01-22 22:03:26 +00:00
} else {
2014-07-26 09:32:26 +00:00
%><input type="hidden" name="targetDestination" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination"))%>" /><%
2012-01-22 22:03:26 +00:00
} /* curPage 4 */
}
2012-01-25 00:06:18 +00:00
} /* tunnelIsClient */
/* End page 4 */ %>
2012-01-23 01:09:17 +00:00
<% /* Page 5 - Binding ports and addresses*/
2012-01-27 04:10:01 +00:00
if ((tunnelIsClient && "streamrclient".equals(tunnelType)) || (!tunnelIsClient && !"streamrserver".equals(tunnelType))) {
2012-01-23 01:09:17 +00:00
if (curPage == 5) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=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.")%>
2012-02-03 17:07:10 +00:00
</p>
<div id="hostField" class="rowItem">
2012-01-23 01:09:17 +00:00
<label for="targetHost" accesskey="H">
2015-09-25 19:55:36 +00:00
<%=intl._t("Host")%>(<span class="accessKey">H</span>):
2012-01-23 01:09:17 +00:00
</label>
2014-07-26 09:32:26 +00:00
<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" />
2012-01-23 01:09:17 +00:00
</div><%
} else {
2014-07-26 09:32:26 +00:00
%><input type="hidden" name="targetHost" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%>" /><%
2012-01-23 01:09:17 +00:00
} /* curPage 5 */
} /* streamrclient or !streamrserver */ %>
<%
if (!tunnelIsClient) {
if (curPage == 5) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=intl._t("This is the port that the service is accepting connections on.")%>
2012-02-03 17:07:10 +00:00
</p>
<div id="portField" class="rowItem">
2012-01-23 01:09:17 +00:00
<label for="targetPort" accesskey="P">
2015-09-25 19:55:36 +00:00
<%=intl._t("Port")%>(<span class="accessKey">P</span>):
2012-01-23 01:09:17 +00:00
</label>
2014-07-26 09:32:26 +00:00
<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" />
2012-01-23 01:09:17 +00:00
</div><%
} else {
2014-07-26 09:32:26 +00:00
%><input type="hidden" name="targetPort" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%>" /><%
2012-01-23 01:09:17 +00:00
} /* curPage 5 */
} /* !tunnelIsClient */ %>
<%
if (tunnelIsClient || "httpbidirserver".equals(tunnelType)) {
if (curPage == 5) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=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.")%>
2012-02-03 17:07:10 +00:00
</p>
<div id="portField" class="rowItem">
2012-01-23 01:09:17 +00:00
<label for="port" accesskey="P">
<span class="accessKey">P</span>ort:
</label>
2014-07-26 09:32:26 +00:00
<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" />
2012-01-23 01:09:17 +00:00
</div><%
} else {
2014-07-26 09:32:26 +00:00
%><input type="hidden" name="port" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%>" /><%
2012-01-23 01:09:17 +00:00
} /* curPage 5 */
} /* tunnelIsClient or httpbidirserver */ %>
<%
if ((tunnelIsClient && !"streamrclient".equals(tunnelType)) || "httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) {
if (curPage == 5) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=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.")%>
2012-02-03 17:07:10 +00:00
</p>
<div id="reachField" class="rowItem">
2012-01-23 01:09:17 +00:00
<label for="reachableBy" accesskey="r">
2015-09-25 19:55:36 +00:00
<%=intl._t("Reachable by")%>(<span class="accessKey">R</span>):
2012-01-23 01:09:17 +00:00
</label>
<select id="reachableBy" name="reachableBy" title="IP for Client Access" class="selectbox">
<%
2012-02-02 03:06:34 +00:00
String clientInterface = request.getParameter("reachableBy");
if ("null".equals(clientInterface)) {
clientInterface = "127.0.0.1";
}
2012-02-25 19:37:54 +00:00
for (String ifc : editBean.interfaceSet()) {
2012-01-23 01:09:17 +00:00
out.write("<option value=\"");
out.write(ifc);
out.write('\"');
2012-02-02 03:06:34 +00:00
if (ifc.equals(clientInterface))
2012-01-23 01:09:17 +00:00
out.write(" selected=\"selected\"");
out.write('>');
out.write(ifc);
out.write("</option>\n");
}
%>
2012-02-16 11:34:36 +00:00
</select>
2012-01-23 01:09:17 +00:00
</div><%
} else {
2014-07-26 09:32:26 +00:00
%><input type="hidden" name="reachableBy" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%>" /><%
2012-01-23 01:09:17 +00:00
} /* curPage 5 */
2012-01-25 00:06:18 +00:00
} /* (tunnelIsClient && !streamrclient) || httpbidirserver || streamrserver */
/* End page 5 */ %>
2012-01-25 01:12:17 +00:00
<% /* Page 6 - Automatic start */
if (curPage == 6) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=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.")%>
2012-02-03 17:07:10 +00:00
</p>
<div id="startupField" class="rowItem">
2012-01-25 01:12:17 +00:00
<label for="startOnLoad" accesskey="a">
2015-09-25 19:55:36 +00:00
<%=intl._t("Auto Start")%>(<span class="accessKey">A</span>):
2012-01-25 01:12:17 +00:00
</label>
2012-02-02 03:19:23 +00:00
<input value="1" type="checkbox" id="startOnLoad" name="startOnLoad" title="Start Tunnel Automatically"<%=("1".equals(request.getParameter("startOnLoad")) ? " checked=\"checked\"" : "")%> class="tickbox" />
2015-09-25 19:55:36 +00:00
<span class="comment"><%=intl._t("(Check the Box for 'YES')")%></span>
2012-01-25 01:12:17 +00:00
</div><%
} else {
2012-01-27 04:06:04 +00:00
if ("1".equals(request.getParameter("startOnLoad"))) {
2014-07-26 09:32:26 +00:00
%><input type="hidden" name="startOnLoad" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("startOnLoad"))%>" /><%
2012-01-27 04:06:04 +00:00
}
2012-01-25 01:12:17 +00:00
} /* curPage 6 */
/* End page 6 */ %>
2012-02-01 02:51:05 +00:00
<% /* Page 7 - Wizard complete */
if (curPage == 7) {
2012-02-03 17:07:10 +00:00
%><p>
2015-09-25 19:55:36 +00:00
<%=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.")%>
2012-02-12 04:26:22 +00:00
<%
if ("1".equals(request.getParameter("startOnLoad"))) {
2015-09-25 19:55:36 +00:00
%><%=intl._t("Because you chose to automatically start the tunnel when the router starts, you don't have to do anything further.")%>
<%=intl._t("The router will start the tunnel once it has been set up.")%><%
2012-02-12 04:26:22 +00:00
} else {
2015-09-25 19:55:36 +00:00
%><%=intl._t("Because you chose not to automatically start the tunnel, you will have to manually start it.")%>
<%=intl._t("You can do this by clicking the Start button on the main page which corresponds to the new tunnel.")%><%
2012-02-12 04:26:22 +00:00
} %>
2012-02-17 06:32:49 +00:00
</p>
2012-02-16 11:34:36 +00:00
<p>
2015-09-25 19:55:36 +00:00
<%=intl._t("Below is a summary of the options you chose:")%>
2012-02-16 11:34:36 +00:00
</p>
2012-02-17 06:32:49 +00:00
<table>
2015-09-25 19:55:36 +00:00
<tr><td><%=intl._t("Server or client tunnel?")%></td><td>
2012-02-17 06:32:49 +00:00
<%=(tunnelIsClient ? "Client" : "Server")%>
</td></tr>
2015-09-25 19:55:36 +00:00
<tr><td><%=intl._t("Tunnel type")%></td><td><%
2012-02-17 06:32:49 +00:00
if ("client".equals(tunnelType) || "server".equals(tunnelType)) { %>
2015-09-25 19:55:36 +00:00
<%=intl._t("Standard")%><%
2012-02-17 06:32:49 +00:00
} else if ("httpclient".equals(tunnelType) || "httpserver".equals(tunnelType)) { %>
HTTP<%
} else if ("httpbidirserver".equals(tunnelType)) { %>
HTTP bidir<%
} else if ("ircclient".equals(tunnelType) || "ircserver".equals(tunnelType)) { %>
IRC<%
} else if ("sockstunnel".equals(tunnelType)) { %>
SOCKS 4/4a/5<%
} else if ("socksirctunnel".equals(tunnelType)) { %>
SOCKS IRC<%
} else if ("connectclient".equals(tunnelType)) { %>
CONNECT<%
} else if ("streamrclient".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %>
Streamr<%
} %>
</td></tr>
2015-09-25 19:55:36 +00:00
<tr><td><%=intl._t("Tunnel name and description")%></td><td>
2014-07-26 09:32:26 +00:00
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%><br />
2014-10-24 14:25:33 +00:00
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%>
2012-02-17 06:32:49 +00:00
</td></tr><%
if (tunnelIsClient) { %>
2015-09-25 19:55:36 +00:00
<tr><td><%=intl._t("Tunnel destination")%></td><td><%
2012-02-17 06:32:49 +00:00
if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %>
2014-07-26 09:32:26 +00:00
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("proxyList"))%><%
2012-02-17 06:32:49 +00:00
} else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { %>
2014-07-26 09:32:26 +00:00
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination"))%><%
2012-02-17 06:32:49 +00:00
} %>
</td></tr><%
} %>
2015-09-25 19:55:36 +00:00
<tr><td><%=intl._t("Binding address and port")%></td><td><%
2012-02-17 06:32:49 +00:00
if ((tunnelIsClient && "streamrclient".equals(tunnelType)) || (!tunnelIsClient && !"streamrserver".equals(tunnelType))) { %>
2014-07-26 09:32:26 +00:00
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%><br /><%
2012-02-17 06:32:49 +00:00
}
if (!tunnelIsClient) { %>
2014-07-26 09:32:26 +00:00
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%><br /><%
2012-02-17 06:32:49 +00:00
}
if (tunnelIsClient || "httpbidirserver".equals(tunnelType)) { %>
2014-07-26 09:32:26 +00:00
<br /><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%><%
2012-02-17 06:32:49 +00:00
}
if ((tunnelIsClient && !"streamrclient".equals(tunnelType)) || "httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %>
2014-07-26 09:32:26 +00:00
<br /><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%><%
2012-02-17 06:32:49 +00:00
} %>
</td></tr>
2015-09-25 19:55:36 +00:00
<tr><td><%=intl._t("Tunnel auto-start")%></td><td><%
2012-02-17 06:32:49 +00:00
if ("1".equals(request.getParameter("startOnLoad"))) { %>
Yes<%
} else { %>
No<%
} %>
</td></tr>
</table>
2012-02-12 04:26:22 +00:00
<p>
2015-09-25 19:55:36 +00:00
<%=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.")%>
2012-02-03 17:07:10 +00:00
</p>
2012-02-01 02:51:05 +00:00
2013-05-31 22:16:15 +00:00
<input type="hidden" name="tunnelDepth" value="3" />
2012-02-01 02:51:05 +00:00
<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" />
2014-09-02 14:08:41 +00:00
<input type="hidden" name="nofilter_customOptions" value="" />
2012-02-01 02:51:05 +00:00
<%
if (!"streamrclient".equals(tunnelType)) {
%><input type="hidden" name="profile" value="bulk" />
<input type="hidden" name="reduceCount" value="1" />
<input type="hidden" name="reduceTime" value="20" /><%
} /* !streamrclient */ %>
<%
if (tunnelIsClient) { /* Client-only defaults */
if (!"streamrclient".equals(tunnelType)) {
%><input type="hidden" name="newDest" value="0" />
<input type="hidden" name="closeTime" value="30" /><%
}
if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) {
%><input type="hidden" name="proxyUsername" value="" />
2014-09-02 14:08:41 +00:00
<input type="hidden" name="nofilter_proxyPassword" value="" />
2012-02-01 02:51:05 +00:00
<input type="hidden" name="outproxyUsername" value="" />
2014-09-02 14:08:41 +00:00
<input type="hidden" name="nofilter_outproxyPassword" value="" /><%
2012-02-01 02:51:05 +00:00
}
if ("httpclient".equals(tunnelType)) {
%><input type="hidden" name="jumpList" value="http://i2host.i2p/cgi-bin/i2hostjump?
2012-09-01 15:02:38 +00:00
http://stats.i2p/cgi-bin/jump.cgi?a=" /><%
2012-02-01 02:51:05 +00:00
} /* httpclient */
} else { /* Server-only defaults */
2012-04-26 23:01:12 +00:00
%><input type="hidden" name="privKeyFile" value="<%=editBean.getPrivateKeyFile(-1)%>" />
<input type="hidden" name="encrypt" value="" />
2012-02-01 02:51:05 +00:00
<input type="hidden" name="encryptKey" value="" />
<input type="hidden" name="accessMode" value="0" />
<input type="hidden" name="accessList" value="" />
<input type="hidden" name="limitMinute" value="0" />
<input type="hidden" name="limitHour" value="0" />
<input type="hidden" name="limitDay" value="0" />
<input type="hidden" name="totalMinute" value="0" />
<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" /><%
} /* tunnelIsClient */
} /* curPage 7 */
/* End page 7 */ %>
2012-01-22 04:23:45 +00:00
</div>
2012-01-21 05:30:23 +00:00
<div id="globalOperationsPanel" class="panel">
<div class="header"></div>
<div class="footer">
2012-02-20 08:36:03 +00:00
<div class="toolbox">
2015-09-25 19:55:36 +00:00
<a class="control" href="list"><%=intl._t("Cancel")%></a>
2012-02-07 01:47:52 +00:00
<% if (curPage != 1 && curPage != 7) {
2015-09-25 19:55:36 +00:00
%><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><%
2012-02-01 03:48:39 +00:00
} %>
2012-01-22 00:11:29 +00:00
<% if (curPage == 7) {
2015-09-25 19:55:36 +00:00
%><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><%
2012-02-07 01:47:52 +00:00
} else if (curPage == 6) {
2015-09-25 19:55:36 +00:00
%><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><%
2012-01-26 03:35:25 +00:00
} else {
2015-09-25 19:55:36 +00:00
%><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><%
2012-01-22 00:11:29 +00:00
} %>
2012-01-21 05:30:23 +00:00
</div>
</div>
</div>
</form>
<div id="pageFooter">
</div>
</body>
</html>