<%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean" %><%@page trimDirectiveWhitespaces="true" %> <% String tun = request.getParameter("tunnel"); int curTunnel = -1; if (tun != null) { try { curTunnel = Integer.parseInt(tun); } catch (NumberFormatException nfe) { curTunnel = -1; } } %> <%=intl._t("Hidden Services Manager")%> - <%=intl._t("Edit Hidden Service")%> <% if (editBean.allowCSS()) { %> <% } %> <% if (editBean.isInitialized()) { %>
<% String tunnelTypeName; String tunnelType; if (curTunnel >= 0) { tunnelTypeName = editBean.getTunnelType(curTunnel); tunnelType = editBean.getInternalType(curTunnel); %>

<%=intl._t("Edit Server Settings")%> (<%=editBean.getTunnelName(curTunnel)%>)

<% } else { tunnelTypeName = editBean.getTypeName(request.getParameter("type")); tunnelType = net.i2p.data.DataHelper.stripHTML(request.getParameter("type")); %>

<%=intl._t("New Server Settings")%>

<% } %> <% // these are four keys that are generated automatically on first save, // and we want to persist in i2ptunnel.config, but don't want to // show clogging up the custom options form. String key = editBean.getKey1(curTunnel); if (key != null && key.length() > 0) { %> <% } key = editBean.getKey2(curTunnel); if (key != null && key.length() > 0) { %> <% } key = editBean.getKey3(curTunnel); if (key != null && key.length() > 0) { %> <% } key = editBean.getKey4(curTunnel); if (key != null && key.length() > 0) { %> <% } %> <% if (!"streamrserver".equals(tunnelType)) { %> <% } /* !streamrserver */ %> <% if (!"streamrserver".equals(tunnelType)) { %> <% if ("httpbidirserver".equals(tunnelType)) { %> <% } /* httpbidirserver */ %> <% if ("httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %> <% } /* httpbidirserver || streamrserver */ %> <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { %> <% } %> <% /****** %> <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { String sig = editBean.getNameSignature(curTunnel); if (sig.length() > 0) { %>
<% } // sig } // type ****/ String b64 = editBean.getDestinationBase64(curTunnel); if (!"".equals(b64)) { %> <% b64 = b64.replace("=", "%3d"); String name = editBean.getSpoofedHost(curTunnel); if (name == null || name.equals("")) name = editBean.getTunnelName(curTunnel); // mysite.i2p is set in the installed i2ptunnel.config if (name != null && !name.equals("") && !name.equals("mysite.i2p") && !name.contains(" ") && name.endsWith(".i2p")) { %> <% } else { %> <% } // name %> <% } // b64 %>
<%=intl._t("Name")%> <%=intl._t("Type")%>
<%=tunnelTypeName%>
<%=intl._t("Description")%> <%=intl._t("Auto Start Tunnel")%>
class="tickbox" /> <%=intl._t("Automatically start tunnel when router starts")%>
<% if ("streamrserver".equals(tunnelType)) { %> <%=intl._t("Access Point")%> <% } else { %> <%=intl._t("Target")%> <% } %>
<%=intl._t("Host")%>: <%=intl._t("Port")%>: <% String value = editBean.getTargetPort(curTunnel); if (value == null || "".equals(value.trim())) { out.write(" ("); out.write(intl._t("required")); out.write(")"); } %>
class="tickbox" /> <%=intl._t("Use SSL to connect to target")%> <% } /* !streamrserver */ %>
<%=intl._t("Access Point")%>
<%=intl._t("Port")%>: <% String value4 = editBean.getClientPort(curTunnel); if (value4 == null || "".equals(value4.trim())) { out.write(" ("); out.write(intl._t("required")); out.write(")"); } %> <%=intl._t("Reachable by")%>:
<%=intl._t("Website Hostname")%>
<%=intl._t("(leave blank for outproxies)")%>
<%=intl._t("Private key file")%>
<% String value3 = editBean.getPrivateKeyFile(curTunnel); if (value3 == null || "".equals(value3.trim())) { out.write(" ("); out.write(intl._t("required")); out.write(")"); } %>
<%=intl._t("Local destination")%>
" href="/imagegen/qr?s=320&t=<%=name%>&c=http%3a%2f%2f<%=name%>%2f%3fi2paddresshelper%3d<%=b64%>" target="_top"><%=intl._t("Generate QR Code")%> <%=intl._t("Add to local addressbook")%> <%=intl._t("Registration Authentication")%> <%=intl._t("Note: In order to enable QR code generation or registration authentication, configure the Name field above with .i2p suffix eg. mynewserver.i2p")%>

<%=intl._t("Advanced Networking Options")%>

<% if (!"streamrserver".equals(tunnelType)) { %> <% } /* !streamrserver */ %> <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { %> <% } // httpserver %> <% /***************** %>
class="tickbox" />
class="tickbox" />
class="tickbox" />
class="tickbox" />
<%=intl._t("(Tunnel must be stopped first)")%>
<% **********************/ %> <% int currentSigType = editBean.getSigType(curTunnel, tunnelType); if (true /* editBean.isAdvanced() */ ) { %> <% } // isAdvanced %> <% /* alternate dest, only if current dest is set and is DSA_SHA1 */ if (currentSigType == 0 && !"".equals(b64) && !"streamrserver".equals(tunnelType)) { %>
<% String ab64 = editBean.getAltDestinationBase64(curTunnel); if (!"".equals(ab64)) { %>
<%=editBean.getAltDestHashBase32(curTunnel)%>
<% ab64 = ab64.replace("=", "%3d"); String name = editBean.getSpoofedHost(curTunnel); if (name == null || name.equals("")) name = editBean.getTunnelName(curTunnel); // mysite.i2p is set in the installed i2ptunnel.config if (name != null && !name.equals("") && !name.equals("mysite.i2p") && !name.contains(" ") && name.endsWith(".i2p")) { %> <%=intl._t("Add to local addressbook")%> <% } else { %> <%=intl._t("Set name with .i2p suffix to enable QR code generation")%> <% } // name %>
<% } // ab64 %>

<% } // currentSigType %>
<%=intl._t("Tunnel Options")%>
<%=intl._t("Length")%> <%=intl._t("Variance")%>
<%=intl._t("Count")%> <%=intl._t("Backup Count")%>
<%=intl._t("Profile")%>
<%=intl._t("Router I2CP Address")%>
<%=intl._t("Host")%>: readonly="readonly" <% } %> /> <%=intl._t("Port")%>: readonly="readonly" <% } %> />
<%=intl._t("Encrypt Leaseset")%>
class="tickbox" /> <%=intl._t("Only allow clients with the encryption key to connect to this server")%>
<%=intl._t("Encryption Key")%> <%=intl._t("Generate New Key")%> (<%=intl._t("Tunnel must be stopped first")%>)
<%=intl._t("Restricted Access List")%>
<% /* can't use
<%=intl._t("Access List")%> (<%=intl._t("Specify clients, 1 per line")%>)
<%=intl._t("Server Access Options")%>
" <%=(editBean.isRejectInproxy(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> <%=intl._t("Block Access via Inproxies")%> " <%=(editBean.isRejectReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> <%=intl._t("Block Accesses containing Referers")%>
" <%=(editBean.isRejectUserAgents(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> <%=intl._t("Block these User-Agents")%> " value="<%=editBean.getUserAgents(curTunnel)%>" class="freetext" />
" <%=(editBean.getUniqueLocal(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> <%=intl._t("Unique Local Address per Client")%> " <%=(editBean.getMultihome(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> <%=intl._t("Optimize for Multihoming")%>
<%=intl._t("Server Throttling")%>
<% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { %> <% } // httpserver %>
<%=intl._t("Inbound connection limits (0=unlimited)")%>
<%=intl._t("Per Minute")%> <%=intl._t("Per Hour")%> <%=intl._t("Per Day")%>
<%=intl._t("Per Client")%>
<%=intl._t("Total")%>
<%=intl._t("Max concurrent connections (0=unlimited)")%>
<%=intl._t("POST limits (0=unlimited)")%>
<%=intl._t("Per Period")%> <%=intl._t("Ban Duration")%>
<%=intl._t("Per Client")%> <%=intl._t("minutes")%>
<%=intl._t("Total")%> <%=intl._t("minutes")%>
<%=intl._t("POST limit period")%> <%=intl._t("minutes")%>
<%=intl._t("Reduce tunnel quantity when idle")%>
class="tickbox" /> <%=intl._t("Reduce tunnel quantity when idle to conserve resources")%>
<%=intl._t("Reduced tunnel count")%>: <%=intl._t("Idle period")%>: <%=intl._t("minutes")%>
<%=intl._t("Signature type")%> (<%=intl._t("Experts only! Changes B32!")%>)
class="tickbox" /> DSA-SHA1 <% if (editBean.isSigTypeAvailable(1)) { %> class="tickbox" /> ECDSA-P256 <% } if (editBean.isSigTypeAvailable(2)) { %> class="tickbox" /> ECDSA-P384 <% } if (editBean.isSigTypeAvailable(3)) { %> class="tickbox" /> ECDSA-P521 <% } if (editBean.isSigTypeAvailable(7)) { %> class="tickbox" /> Ed25519-SHA-512 <% } // isAvailable %>
<%=intl._t("Custom options")%>
<% } else { %>
<%=intl._t("Tunnels are not initialized yet, please reload in two minutes.")%>
<% } // isInitialized() %>