<% String tunnelTypeName; String tunnelType; if (curTunnel >= 0) { tunnelTypeName = editBean.getTunnelType(curTunnel); tunnelType = editBean.getInternalType(curTunnel); %>

<%=intl._t("Edit proxy settings")%> (<%=editBean.getTunnelName(curTunnel)%>)

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

<%=intl._t("New proxy 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) { %> <% } %> <% boolean isShared = editBean.isSharedClient(curTunnel); String aStopFirst = intl._t("The client tunnel and all other shared client tunnels must be stopped to change this setting"); String bStopFirst = intl._t("The client tunnel must be stopped to change this setting"); String stopFirst = isShared ? aStopFirst : bStopFirst; boolean canChangePort = editBean.canChangePort(curTunnel); String tastopFirst = " title=\"" + aStopFirst + "\" "; String tbstopFirst = " title=\"" + bStopFirst + "\" "; String tstopFirst = isShared ? tastopFirst : tbstopFirst; // we don't actually disable the fields for a new tunnel, but we provide a warning String phdisabled = (canChangePort && isShared) ? "" : tstopFirst; %> <% if ("streamrclient".equals(tunnelType)) { %> <% } else { String ihelp = intl._t("Local interface (ip address) the client tunnel will be reachable from"); String itext = canChangePort ? ihelp : bStopFirst; %> <% } /* streamrclient */ %> <% if ("client".equals(tunnelType) || "ircclient".equals(tunnelType)) { %> <% } /* tunnel types */ if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %> <% if ("sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %> <% if ("httpclient".equals(tunnelType)) { %> <% } // httpclient %> <% } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { %> <% } if (!"streamrclient".equals(tunnelType)) { %> <% } // !streamrclient if ("ircclient".equals(tunnelType)) { %> <% } // ircclient %>
<%=intl._t("Name")%> <%=intl._t("Type")%>
" value="<%=editBean.getTunnelName(curTunnel)%>" class="freetext tunnelName" /> <%=tunnelTypeName%>
<%=intl._t("Description")%> <%=intl._t("Auto Start Tunnel")%>
" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext tunnelDescription" />
> <% if ("streamrclient".equals(tunnelType)) { %> <%=intl._t("Target")%> <% } else { %> <%=intl._t("Access Point")%> <% } /* streamrclient */ %>
<%=intl._t("Port")%>: <% String phelp = intl._t("Specify the local port this service should be accessible from"); String ptext = canChangePort ? phelp : bStopFirst; String pdisabled = canChangePort ? "" : " readonly=\"readonly\" "; %> " required <%=pdisabled%>/> <%=intl._t("Host")%>: <% String targetHost = editBean.getTargetHost(curTunnel); %> " value="<%=targetHost%>" class="freetext host" placeholder="<%=intl._t("required")%>" required /> <%=intl._t("Reachable by")%>:
<%=intl._t("Use SSL?")%>
<%=intl._t("Outproxies")%>
<% } else { %><% } %>  <%=intl._t("For a random selection from a pool, separate with commas e.g. server1.i2p,server2.i2p")%>" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext proxyList" /> <% if ("sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { boolean isHTTPS = editBean.getOutproxyType(curTunnel).equals("connect"); %> <%=intl._t("Outproxy Type")%>: <% } %>
<%=intl._t("SSL Outproxies")%>
 <%=intl._t("For a random selection from a pool, separate with commas e.g. server1.i2p,server2.i2p")%>" value="<%=editBean.getSslProxies(curTunnel)%>" class="freetext proxyList" />
<%=intl._t("Use Outproxy Plugin")%>
<%=intl._t("Tunnel Destination")%>
 <%=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)) { /* deferred resolution unimplemented in streamr client */ %> - <%=intl._t("b32 not recommended")%> <% } %>
> <%=intl._t("Shared Client")%>
<% // we don't actually disable the field for a new tunnel, but we provide a warning String shtitle = (canChangePort && isShared) ? intl._t("Traffic from all clients with this feature enabled will be routed over the same set of tunnels. This will make profiling the tunnels by an adversary more difficult, but will link the clients together.") : (isShared ? bStopFirst : aStopFirst); String shdisabled = canChangePort ? "" : " disabled=\"disabled\" "; %> <% if (isShared && !canChangePort) { // disabled checkbox won't come back in the form, stuff it in here // https://stackoverflow.com/questions/155291/can-html-checkboxes-be-set-to-readonly %><% } %>
<%=intl._t("Enable DCC")%>

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

<% if (!"streamrclient".equals(tunnelType) && (canChangePort || isShared)) { // no shared client tunnels for streamr // If running and not shared, this doesn't apply. %>
<%=intl._t("Note: When this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!")%>
<% } // !streamrclient %>
<%=intl._t("Tunnel Length Options")%>
<%=intl._t("Length")%> <%=intl._t("Variance")%>
<%=intl._t("Tunnel Quantity Options")%>
<%=intl._t("Count")%> <%=intl._t("Backup Count")%>
<% if ("client".equals(tunnelType)) { %> <% } // client %> <% if (!"streamrclient".equals(tunnelType)) { // streamr client sends pings so it will never be idle %> <% } // !streamrclient %> <% boolean canChangeEncType = editBean.canChangeEncType(curTunnel); boolean isPersistent = editBean.getPersistentClientKey(curTunnel); boolean canChangeRadio = canChangeEncType || !isPersistent; String nhdisabled = canChangeRadio ? "" : tstopFirst; String ndisabled = canChangeRadio ? "" : " disabled=\"disabled\" "; String n1help = intl._t("Change tunnel identity (destination) when tunnels reopen"); String n1text = canChangeRadio ? n1help : stopFirst; String n2help = intl._t("Retain tunnel identity (destination) when tunnels reopen"); String n2text = canChangeRadio ? n2help : stopFirst; %> <% String ehdisabled = canChangeEncType ? "" : tstopFirst; String edisabled = canChangeEncType ? "" : " disabled=\"disabled\" "; String destb64 = editBean.getDestinationBase64(curTunnel); if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "socksirctunnel".equals(tunnelType) || "sockstunnel".equals(tunnelType)) { %> <% String p1help = intl._t("Enabling this feature will ensure your tunnel identity (destination) remains static, for services offering features based on destination e.g. IRC user authentication"); String p1text = canChangeEncType ? p1help : stopFirst; String p2help = intl._t("Path to Private Key File"); String p2text = canChangeEncType ? p2help : stopFirst; String p2disabled = canChangeEncType ? "" : " readonly=\"readonly\" "; %> <% if (destb64.length() > 0) { %> <% } // if destb64 } if ("httpclient".equals(tunnelType)) { %>
<%=intl._t("Tunnel Management Options")%>
<%=intl._t("Profile")%> <%=intl._t("Delay Connect")%>
<% // TODO: Convey to users: Where is the (1s) delay introduced? What is the difference between delay connect and delay open? %>
<%=intl._t("Delay tunnel open until required")%>
<%=intl._t("Reduce tunnel quantity when idle")%>
<%=intl._t("Reduced tunnel count")%>: " value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext quantity" /> <%=intl._t("Idle period")%>: " value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext period" /> minutes
<%=intl._t("Close tunnels when idle")%>
<%=intl._t("Idle period")%>: " value="<%=editBean.getCloseTime(curTunnel)%>" class="freetext period" /> minutes
> <%=intl._t("New Keys on Reopen")%>:
> <%=intl._t("Persistent private key")%>
<%=intl._t("File")%>: />
<%=intl._t("Local destination")%>
" tabindex="0"><%=destb64%>
<%=intl._t("Local Base32")%>:  <%=editBean.getDestHashBase32(curTunnel)%>
<% } // if httpclient int currentSigType = editBean.getSigType(curTunnel, tunnelType); boolean isCreated = isPersistent && destb64.length() > 0; boolean canChangeSigType = editBean.canChangeSigType(curTunnel) && !isCreated; String tooLate = "title=\"" + intl._t("Configuration cannot be changed after destination is created") + '"'; String shdisabled = canChangeSigType ? "" : (isCreated ? tooLate : tstopFirst); String disabled = canChangeSigType ? "" : " disabled=\"disabled\" "; %>
<%=intl._t("Tunnel Filtering Options")%>
<%=intl._t("HTTP Filtering")%>
<% boolean has0 = editBean.hasEncType(curTunnel, 0); boolean has4 = editBean.hasEncType(curTunnel, 4); boolean has5 = editBean.hasEncType(curTunnel, 5); boolean has6 = editBean.hasEncType(curTunnel, 6); boolean has7 = editBean.hasEncType(curTunnel, 7); %> <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %>
<%=intl._t("Tunnel Cryptography Options")%>
> <%=intl._t("Signature type")%>
> <%=intl._t("Encryption types")%>
<% } // httpclient || connect || socks || socksirc if ("httpclient".equals(tunnelType)) { %>
<%=intl._t("Tunnel Authentication Options")%>
<%=intl._t("Local Authorization")%>
<%=intl._t("Username")%>: " value="" class="freetext username" /> <%=intl._t("Password")%>: " value="" class="freetext password" />
<%=intl._t("Outproxy Authorization")%>
<%=intl._t("Username")%>: " value="<%=editBean.getOutproxyUsername(curTunnel)%>" class="freetext username" /> <%=intl._t("Password")%>: " value="<%=editBean.getOutproxyPassword(curTunnel)%>" class="freetext password" />
<% } // httpclient %>
<%=intl._t("Tunnel Address Lookup Options")%>
<%=intl._t("Jump URL List")%>
<% if (!editBean.isRouterContext()) { %>
<%=intl._t("Router I2CP Address")%>
<%=intl._t("Host")%>: " value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext host" /> <%=intl._t("Port")%>: " value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext port" />
<% } // !isRouterContext %>
<%=intl._t("Custom options")%>
" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" spellcheck="false"/>
<%=intl._t("Cancel")%> <% if (curTunnel >= 0) { %> <% } %>