<%@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")%>

<% } 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) { %> <% } %>

<%=tunnelTypeName%>
class="tickbox" /> <%=intl._t("(Check the Box for 'YES')")%>

<% if ("streamrserver".equals(tunnelType)) { %> <% } else { %> <% } %>
<% if (!"streamrserver".equals(tunnelType)) { %>
<% } /* !streamrserver */ %>
<% if (!"streamrserver".equals(tunnelType)) { %>
class="tickbox" />
<% } /* !streamrserver */ %> <% if ("httpbidirserver".equals(tunnelType)) { %>

<% } /* httpbidirserver */ %> <% if ("httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %>
<% } /* httpbidirserver || streamrserver */ %>

<% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { %>
<%=intl._t("(leave blank for outproxies)")%>
<% } %>
<% /****** %> <% 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")) { %> <%=intl._t("Add to local addressbook")%>      <%=intl._t("Registration Authentication")%> <% } else { %> <%=intl._t("Set name with .i2p suffix to enable QR code generation")%> <%=intl._t("Set name with .i2p suffix to enable registration authentication")%> <% } // name %>
<% } // b64 %>

<%=intl._t("Advanced networking options")%>



<% if (!"streamrserver".equals(tunnelType)) { %>

<% } /* !streamrserver */ %>
readonly="readonly" <% } %> />
readonly="readonly" <% } %> />

class="tickbox" />
<%=intl._t("(Tunnel must be stopped first)")%>

<% /* can't use
<% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { %>
class="tickbox" />
class="tickbox" />
class="tickbox" />
<% } // httpserver %>
class="tickbox" />
class="tickbox" />

<% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { %>
<% } // httpserver %>

class="tickbox" />

<% /***************** %>
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() */ ) { %>
class="tickbox" />
<% if (editBean.isSigTypeAvailable(1)) { %>
class="tickbox" />
<% } if (editBean.isSigTypeAvailable(2)) { %>
class="tickbox" />
<% } if (editBean.isSigTypeAvailable(3)) { %>
class="tickbox" />
<% } if (editBean.isSigTypeAvailable(7)) { %>
class="tickbox" />
<% } // isAvailable %>

<% } // 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 %>
<% } else { %>Tunnels are not initialized yet, please reload in two minutes.<% } // isInitialized() %>