diff --git a/apps/i2ptunnel/jsp/editClient.jsi b/apps/i2ptunnel/jsp/editClient.jsi index 1122b062c..74e89e028 100644 --- a/apps/i2ptunnel/jsp/editClient.jsi +++ b/apps/i2ptunnel/jsp/editClient.jsi @@ -1,4 +1,4 @@ - <% +<% String tunnelTypeName; String tunnelType; if (curTunnel >= 0) { @@ -13,111 +13,97 @@ - <% +<% // 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 ("streamrclient".equals(tunnelType)) { %> +<% + if ("streamrclient".equals(tunnelType)) { +%> - <% } else { %> - +<% + } else { +%> <% } /* streamrclient */ %> - - <% if ("client".equals(tunnelType) || "ircclient".equals(tunnelType)) { - %> +<% + if ("client".equals(tunnelType) || "ircclient".equals(tunnelType)) { +%> - - + - <% } /* tunnel types */ %> +<% + } /* tunnel types */ - <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { - %> + if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { +%> - - + - - <% if ("httpclient".equals(tunnelType)) { - %> +<% + if ("httpclient".equals(tunnelType)) { +%> - - + - - <% } // httpclient %> +<% + } // httpclient +%> - - + - <% } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { - %> +<% + } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { +%> - - + +<% + } - <% } %> - - <% if (!"streamrclient".equals(tunnelType)) { %> + if (!"streamrclient".equals(tunnelType)) { +%> - - + +<% + } // !streamrclient - <% } // !streamrclient %> - - <% if ("ircclient".equals(tunnelType)) { %> + if ("ircclient".equals(tunnelType)) { +%> - - + - - <% } // ircclient %> +<% + } // 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)) { %> +<% if ("streamrclient".equals(tunnelType)) { %> <%=intl._t("Target")%> - <% } else { %> +<% } else { %> <%=intl._t("Access Point")%> - <% } /* streamrclient */ %> +<% } /* streamrclient */ %>
<%=intl._t("Port")%>: - <% String value = editBean.getClientPort(curTunnel); +<% + String value = editBean.getClientPort(curTunnel); if (value == null || "".equals(value.trim())) { out.write(" ("); out.write(intl._t("required")); out.write(")"); } - %> +%> " value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="required" /> <%=intl._t("Host")%>: - <% +<% String targetHost = editBean.getTargetHost(curTunnel); if (targetHost == null || "".equals(targetHost.trim())) { out.write(" ("); out.write(intl._t("required")); out.write(")"); } - %> - +%> " value="<%=targetHost%>" class="freetext host" placeholder="required" /> <%=intl._t("Reachable by")%>: -
<%=intl._t("Use SSL?")%>
<%=intl._t("Outproxies")%>
 <%=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" />
<%=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")%>
<% String value2 = editBean.getClientDestination(curTunnel); if (value2 == null || "".equals(value2.trim())) { @@ -205,96 +187,98 @@ out.write(intl._t("required")); out.write(")"); } - %> - +%>  <%=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" /> (<%=intl._t("name, name:port, or destination")%> - <% if ("streamrclient".equals(tunnelType)) { /* deferred resolution unimplemented in streamr client */ %> +<% + if ("streamrclient".equals(tunnelType)) { + /* deferred resolution unimplemented in streamr client */ +%> - <%=intl._t("b32 not recommended")%> - <% } %> ) +<% + } +%> )
<%=intl._t("Shared Client")%>
<%=intl._t("Enable DCC")%>
-

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

- - - -<% if (!"streamrclient".equals(tunnelType)) { %> <% // no shared client tunnels for streamr %> +<% + if (!"streamrclient".equals(tunnelType)) { + // no shared client tunnels for streamr +%> - <% } // !streamrclient %> +<% + } // !streamrclient +%> - - + - - - - - + - - - - + - - - - - + - - - - - <% if (!"streamrclient".equals(tunnelType)) { %> +<% + if (!"streamrclient".equals(tunnelType)) { +%> - - - - - - + - - - <% } // !streamrclient %> - +<% + } // !streamrclient +%> - - - + - - - - - <% if (!"streamrclient".equals(tunnelType)) { // streamr client sends pings so it will never be idle %> - +<% + if (!"streamrclient".equals(tunnelType)) { + // streamr client sends pings so it will never be idle +%> - - - + - - <% } // !streamrclient %> - +<% + } // !streamrclient +%> - - - + - - - + - - - - - + - - - + - - - - - + - - <% if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "socksirctunnel".equals(tunnelType) || "sockstunnel".equals(tunnelType)) { %> - +<% + if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "socksirctunnel".equals(tunnelType) || "sockstunnel".equals(tunnelType)) { +%> - - + - - <% +<% String destb64 = editBean.getDestinationBase64(curTunnel); if (destb64.length() > 0) { - %> - +%> - - - + - - - + +<% + } // if destb64 + } - <% } // if destb64 %> - <% } %> - - <% if ("httpclient".equals(tunnelType)) { %> - + if ("httpclient".equals(tunnelType)) { +%> - - - + - - - - + - - - <% } // if httpclient %> +<% + } // if httpclient - <% if (true /* editBean.isAdvanced() */ ) { + if (true /* editBean.isAdvanced() */ ) { int currentSigType = editBean.getSigType(curTunnel, tunnelType); String disabled = editBean.canChangeSigType(curTunnel) ? "" : " disabled=\"disabled\" "; - %> +%> - - - + - <% } // isAvailable %> +<% + } // isAvailable - <% } // isAdvanced %> + } // isAdvanced - <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %> + if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { +%> - - + - - - + - - - + - - + - - - + +<% + } // httpclient || connect || socks || socksirc - <% } // httpclient || connect || socks || socksirc %> - - <% if ("httpclient".equals(tunnelType)) { %> - + if ("httpclient".equals(tunnelType)) { +%> - - + - - <% } // httpclient %> - +<% + } // httpclient +%> - - - + - - - + -
<%=intl._t("Note: When this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!")%>
<%=intl._t("Tunnel Options")%>
<%=intl._t("Length")%> - + <%=intl._t("Variance")%>
- +
<%=intl._t("Count")%> - + <%=intl._t("Backup Count")%>
- +
<%=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("Router I2CP Address")%>
<%=intl._t("Host")%>: " value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext host" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> - + <%=intl._t("Port")%>: " value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext port" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> />
<%=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")%>: @@ -464,152 +418,135 @@
<%=intl._t("Persistent private key")%>
- + <%=intl._t("File")%>: " value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" />
<%=intl._t("Local destination")%>
" tabindex="0" onblur="resetScrollLeft(this)"><%=destb64%>
<%=intl._t("Local Base 32")%>:  <%=editBean.getDestHashBase32(curTunnel)%>
<%=intl._t("HTTP Filtering")%>
- +
- +
<%=intl._t("Signature type")%> <%-- (<%=intl._t("Experts only!")%>) --%>
- - <% if (editBean.isSigTypeAvailable(1)) { %> - +<% + if (editBean.isSigTypeAvailable(1)) { +%> - - <% } - - if (editBean.isSigTypeAvailable(2)) { %> - +<% + } + if (editBean.isSigTypeAvailable(2)) { +%> - - <% } - if (editBean.isSigTypeAvailable(3)) { %> - +<% + } + if (editBean.isSigTypeAvailable(3)) { +%> - - <% } - if (editBean.isSigTypeAvailable(7)) { %> - +<% + } + if (editBean.isSigTypeAvailable(7)) { +%>
<%=intl._t("Local Authorization")%>
<%=intl._t("Username")%>: " value="" class="freetext username" /> @@ -618,21 +555,16 @@ <%=intl._t("Password")%>: " value="" class="freetext password" />
<%=intl._t("Outproxy Authorization")%>
<%=intl._t("Username")%>: " value="<%=editBean.getOutproxyUsername(curTunnel)%>" class="freetext username" /> @@ -643,37 +575,32 @@ " value="<%=editBean.getOutproxyPassword(curTunnel)%>" class="freetext password" />
<%=intl._t("Jump URL List")%>
<%=intl._t("Custom options")%>
" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" spellcheck="false"/>
@@ -681,4 +608,4 @@
+ diff --git a/apps/i2ptunnel/jsp/editServer.jsi b/apps/i2ptunnel/jsp/editServer.jsi index 5fcecaf6f..2aa3dceaf 100644 --- a/apps/i2ptunnel/jsp/editServer.jsi +++ b/apps/i2ptunnel/jsp/editServer.jsi @@ -1,4 +1,4 @@ - <% +<% String tunnelTypeName; String tunnelType; if (curTunnel >= 0) { @@ -13,69 +13,54 @@ - <% +<% // 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 */ %> - +<% } /* !streamrserver */ %> - <% if ("httpbidirserver".equals(tunnelType)) { %> - - - +<% if ("httpbidirserver".equals(tunnelType)) { %> + - - - + - <% } /* httpbidirserver */ %> - <% if ("httpbidirserver".equals(tunnelType) || "streamrserver".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))) { +%> - - - + <% } %> - - - - - + - - <% /****** -%> - <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { + if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { String sig = editBean.getNameSignature(curTunnel); if (sig.length() > 0) { %>
@@ -221,55 +186,53 @@ boolean hasImagegen = pm.getPort(net.i2p.util.PortMapper.SVC_IMAGEGEN) > 0; boolean hasSusiDNS = pm.getPort(net.i2p.util.PortMapper.SVC_SUSIDNS) > 0; 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")%>
" value="<%=editBean.getTunnelName(curTunnel)%>" class="freetext tunnelName" /> - + <%=tunnelTypeName%>
<%=intl._t("Description")%> - + <%=intl._t("Auto Start Tunnel")%>
" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext tunnelDescriptionText" /> - +
<% if ("streamrserver".equals(tunnelType)) { %> <%=intl._t("Access Point")%> @@ -83,16 +68,13 @@ <%=intl._t("Target")%> <% } %>
<%=intl._t("Host")%>: " value="<%=editBean.getTargetHost(curTunnel)%>" class="freetext host" /> <%=intl._t("Port")%>: <% String value = editBean.getTargetPort(curTunnel); @@ -101,44 +83,39 @@ out.write(intl._t("required")); out.write(")"); } - %> +%> " value="<%=editBean.getTargetPort(curTunnel)%>" class="freetext port" placeholder="required" /> - <% if (!"streamrserver".equals(tunnelType)) { %> +<% if (!"streamrserver".equals(tunnelType)) { %> - <% } /* !streamrserver */ %> +<% } /* !streamrserver */ %>
<%=intl._t("Access Point")%>
<%=intl._t("Port")%>: - <% String value4 = editBean.getClientPort(curTunnel); +<% String value4 = editBean.getClientPort(curTunnel); if (value4 == null || "".equals(value4.trim())) { out.write(" ("); out.write(intl._t("required")); out.write(")"); } - %> - +%> " value="<%=editBean.getClientPort(curTunnel)%>" class="freetext port" placeholder="required" /> <%=intl._t("Reachable by")%>:
<%=intl._t("Website Hostname")%>
" value="<%=editBean.getSpoofedHost(curTunnel)%>" class="freetext" /> <%=intl._t("(leave blank for outproxies)")%> @@ -175,21 +147,16 @@
<%=intl._t("Local destination")%> - + <%=intl._t("Private key file")%>
" tabindex="0" onblur="resetScrollLeft(this)"><%=editBean.getDestinationBase64(curTunnel)%>
-
+ <% String value3 = editBean.getPrivateKeyFile(curTunnel); if (value3 == null || "".equals(value3.trim())) { out.write(" ("); @@ -200,11 +167,9 @@ " value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" placeholder="required" />
- <% +<% if (hasImagegen) { - %> +%> " href="/imagegen/qr?s=320&t=<%=name%>&c=http%3a%2f%2f<%=name%>%2f%3fi2paddresshelper%3d<%=b64%>" target="_top"><%=intl._t("Generate QR Code")%> - <% +<% } if (hasSusiDNS) { - %> +%> " href="/susidns/addressbook.jsp?book=private&hostname=<%=name%>&destination=<%=b64%>#add"><%=intl._t("Add to local addressbook")%> - <% +<% } - %> +%> " href="register?tunnel=<%=curTunnel%>"><%=intl._t("Registration Authentication")%> - <% +<% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %> +%> " href="ssl?tunnel=<%=curTunnel%>"><%=intl._t("SSL Wizard")%> - <% +<% } - %> +%> <%=intl._t("Note: In order to enable QR code generation or registration authentication, configure the Website Hostname field (for websites) or the Name field (everything else) above with an .i2p suffixed hostname e.g. mynewserver.i2p")%>

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

@@ -281,26 +244,22 @@ - <% if (editBean.isAdvanced()) { +<% if (editBean.isAdvanced()) { %> <%=intl._t("Inbound")%> <% } // isAdvanced() - %> +%> <%=intl._t("Length")%> - - - + <%=intl._t("Variance")%> - - - + - - - + - - - + <%=intl._t("Count")%> - - - + <%=intl._t("Backup Count")%> - - - + - - - + - <% if (editBean.isAdvanced()) { +<% if (editBean.isAdvanced()) { // repeat four options above for outbound %> <%=intl._t("Outbound")%> - - + <%=intl._t("Length")%> - - + <%=intl._t("Variance")%> - - + - - + - - + <%=intl._t("Count")%> - - - + <%=intl._t("Backup Count")%> - - + - - + - <% +<% } // isAdvanced() End outbound config section - %> - - <% if (!"streamrserver".equals(tunnelType)) { %> + if (!"streamrserver".equals(tunnelType)) { +%> <%=intl._t("Profile")%> - - - + - - <% } /* !streamrserver */ %> - +<% } /* !streamrserver */ %> <%=intl._t("Router I2CP Address")%> - - + <%=intl._t("Host")%>: " value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> - - + <%=intl._t("Port")%>: " value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext" <% if (editBean.isRouterContext()) { %> readonly="readonly" <% } %> /> - - - + <%=intl._t("Encrypt Leaseset")%> - - - + - <% +<% String curEncryptMode = editBean.getEncryptMode(curTunnel); - %> +%> - <% +<% int curSigType = editBean.getSigType(curTunnel, tunnelType); if (curSigType == 7 || curSigType == 11) { - %> +%> - <% +<% if (editBean.isAdvanced()) { // TODO, unimplemented - %> +%> - <% +<% } // isAdvanced() } // curSigType - %> +%> - - - + <%=intl._t("Encryption Key")%> - - - + <%=intl._t("Generate New Key")%> (<%=intl._t("Tunnel must be stopped first")%>) - - - + - - - + - - <% +<% if (curSigType == 7 || curSigType == 11) { - %> +%> <%=intl._t("Optional lookup password")%>: " value="<%=editBean.getBlindedPassword(curTunnel)%>" class="freetext password" /> - <% +<% } // curSigType - %> - +%> <%=intl._t("Restricted Access List")%> - - - + @@ -576,224 +493,160 @@ - - - + <%=intl._t("Access List Description")%> (<%=intl._t("Specify clients, 1 per line")%>) - - - + - - - + <%=intl._t("Filter Definition File")%> - - - + <%=intl._t("You can define an advanced filter for this tunnel.")%> (<%=intl._t("Format Specification")%>) - - - + - - - + <%=intl._t("Server Access Options")%> - - <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %> - +<% + if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { +%> - - - + - - - + - - - + " value="<%=editBean.getUserAgents(curTunnel)%>" class="freetext" /> - <% } // httpserver - %> - +<% } // httpserver +%> - - - + - - - + <%=intl._t("Server Throttling")%> - - + - - - + - - + - - - - - + + - - - - - + + - - - - + - - - + - - <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %> +<% + if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { +%> - - - - + - - - - - + + - - - - - + + - - - - - + + - - - + - - <% } // httpserver - %> +<% } // httpserver +%>
<%=intl._t("Inbound connection limits (0=unlimited)")%>
<%=intl._t("Per Minute")%> <%=intl._t("Per Hour")%> <%=intl._t("Per Day")%>
<%=intl._t("Per Client")%> " value="<%=editBean.getLimitMinute(curTunnel)%>" class="freetext" /> - + " value="<%=editBean.getLimitHour(curTunnel)%>" class="freetext" /> - + " value="<%=editBean.getLimitDay(curTunnel)%>" class="freetext" /> -
<%=intl._t("Total")%> " value="<%=editBean.getTotalMinute(curTunnel)%>" class="freetext" /> - + " value="<%=editBean.getTotalHour(curTunnel)%>" class="freetext" /> - + " value="<%=editBean.getTotalDay(curTunnel)%>" class="freetext" /> -
<%=intl._t("Max concurrent connections (0=unlimited)")%>
+
" value="<%=editBean.getMaxStreams(curTunnel)%>" class="freetext" /> -
<%=intl._t("POST limits (0=unlimited)")%>
+
<%=intl._t("Per Period")%> - + <%=intl._t("Ban Duration")%> -
<%=intl._t("Per Client")%> - + " value="<%=editBean.getPostMax(curTunnel)%>" class="freetext quantity"/> - + " value="<%=editBean.getPostBanTime(curTunnel)%>" class="freetext period"/> <%=intl._t("minutes")%> -
<%=intl._t("Total")%> - + " value="<%=editBean.getPostTotalMax(curTunnel)%>" class="freetext quantity"/> - + " value="<%=editBean.getPostTotalBanTime(curTunnel)%>" class="freetext period"/> <%=intl._t("minutes")%> -
<%=intl._t("POST limit period")%> - + " value="<%=editBean.getPostCheckTime(curTunnel)%>" class="freetext period"/> <%=intl._t("minutes")%> -
- - - + <%=intl._t("Reduce tunnel quantity when idle")%> - - - + - - + <%=intl._t("Reduced tunnel count")%>: " value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext quantity" /> @@ -805,16 +658,12 @@ <%=intl._t("minutes")%> - <% /***************** %> - <%=intl._t("New Certificate type")%> - - - + @@ -822,192 +671,154 @@ class="tickbox" /> " value="<%=editBean.getEffort(curTunnel)%>" class="freetext" /> - - - + <%=intl._t("Hashcash Calc Time")%> - - + <%=intl._t("Hidden")%> - - - + - - + "<%=(editBean.getCert(curTunnel)==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> - - - + <%=intl._t("Signed Certificate")%> - - - + " value="<%=editBean.getSigner(curTunnel)%>" class="freetext" /> - - - + <%=intl._t("Modify Certificate")%> <%=intl._t("(Tunnel must be stopped first)")%> - - - + - -<% **********************/ %> - - <% +<% + **********************/ int currentSigType = editBean.getSigType(curTunnel, tunnelType); if (true /* editBean.isAdvanced() */ ) { String disabled = editBean.canChangeSigType(curTunnel) ? "" : " disabled=\"disabled\" "; - %> +%> <%=intl._t("Signature type")%> <%-- (<%=intl._t("Experts only! Changes B32!")%>) --%> - - + - <% if (editBean.isSigTypeAvailable(1)) { %> +<% if (editBean.isSigTypeAvailable(1)) { %> - <% } +<% } if (editBean.isSigTypeAvailable(2)) { %> - <% } +<% } if (editBean.isSigTypeAvailable(3)) { %> - <% } +<% } if (editBean.isSigTypeAvailable(7)) { %> - <% } // isAvailable %> - +<% } // isAvailable +%> +<% } // isAdvanced - <% } // isAdvanced %> - - <% /* alternate dest, only if current dest is set and is DSA_SHA1 */ if (currentSigType == 0 && !"".equals(b64) && !"streamrserver".equals(tunnelType)) { - %> - +%> <%=intl._t("Alternate private key file")%> (Ed25519-SHA-512) - - - + " value="<%=editBean.getAltPrivateKeyFile(curTunnel)%>" /> - - <% +<% String ab64 = editBean.getAltDestinationBase64(curTunnel); if (!"".equals(ab64)) { - %> - +%> <%=intl._t("Alternate local destination")%> - - - +
" onblur="resetScrollLeft(this)"><%=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")) { - %> - +%> - <% +<% if (hasImagegen) { - %> +%> " href="/imagegen/qr?s=320&t=<%=name%>&c=http%3a%2f%2f<%=name%>%2f%3fi2paddresshelper%3d<%=ab64%>" target="_top"><%=intl._t("Generate QR Code")%> - <% +<% } if (hasSusiDNS) { - %> +%> " href="/susidns/addressbook.jsp?book=private&hostname=<%=name%>&destination=<%=ab64%>#add"><%=intl._t("Add to local addressbook")%> - <% +<% } } else { - %> - +%> <%=intl._t("Note: In order to enable QR code generation or registration authentication, configure the Website Hostname field (for websites) or the Name field (everything else) above with an .i2p suffixed hostname e.g. mynewserver.i2p")%> - - <% +<% } // name - %> - <% } // ab64 - %> - <% } // currentSigType %> - + } // currentSigType +%> <%=intl._t("Custom options")%> - - + " value="<%=editBean.getCustomOptions(curTunnel)%>" /> - - - + @@ -1015,4 +826,4 @@ - + diff --git a/apps/i2ptunnel/jsp/index.jsp b/apps/i2ptunnel/jsp/index.jsp index 48f31c8de..7b9004233 100644 --- a/apps/i2ptunnel/jsp/index.jsp +++ b/apps/i2ptunnel/jsp/index.jsp @@ -32,9 +32,7 @@ <% } %> - - - + <% boolean isInitialized = indexBean.isInitialized(); String nextNonce = isInitialized ? net.i2p.i2ptunnel.web.IndexBean.getNextNonce() : null; @@ -51,8 +49,7 @@ - - + <%=intl._t("Refresh")%> <% @@ -87,11 +84,8 @@ -
-

<%=intl._t("I2P Hidden Services")%>

- @@ -101,85 +95,74 @@ - - <% +<% for (int curServer = 0; curServer < indexBean.getTunnelCount(); curServer++) { if (indexBean.isClient(curServer)) continue; - %> - - +%> - - - - - - - - - - + - - <% +<% String encName = indexBean.getEncryptedBase32(curServer); if (encName != null && encName.length() > 0) { - %> +%> - <% +<% } // encName - %> - +%> - - <% +<% } // for loop - %> - +%>
<%=intl._t("Name")%><%=intl._t("Status")%> <%=intl._t("Control")%>
 <%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%> - <%=indexBean.getTunnelType(curServer)%> - <% + <%=indexBean.getTunnelType(curServer)%> + +<% if (indexBean.isServerTargetLinkValid(curServer)) { if (indexBean.isSSLEnabled(curServer)) { %> " target="_top"><%=indexBean.getServerTarget(curServer)%> SSL - <% } else { %> +<% } else { %> " target="_top"><%=indexBean.getServerTarget(curServer)%> - <% +<% } } else { %><%=indexBean.getServerTarget(curServer)%> - <% +<% if (indexBean.isSSLEnabled(curServer)) { %> SSL - <% +<% } } - %> - - <% +%> + +<% if (("httpserver".equals(indexBean.getInternalType(curServer)) || ("httpbidirserver".equals(indexBean.getInternalType(curServer)))) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { - %> +%> " href="http://<%=indexBean.getDestHashBase32(curServer)%>" target="_top"><%=intl._t("Preview")%> - <% +<% } else if (indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { %><%=intl._t("Base32 Address")%>:<%=indexBean.getDestHashBase32(curServer)%> - <% +<% } else { %><%=intl._t("No Preview")%> - <% +<% } - %> - - <% +%> + +<% switch (indexBean.getTunnelStatus(curServer)) { case IndexBean.STARTING: %>
"><%=intl._t("Starting...")%>
-
+ " href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curServer%>"><%=intl._t("Stop")%> - <% +<% break; case IndexBean.RUNNING: %>
"><%=intl._t("Running")%>
-
+ " href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curServer%>"><%=intl._t("Stop")%> - <% +<% break; case IndexBean.NOT_RUNNING: %>
"><%=intl._t("Stopped")%>
-
+ " href="list?nonce=<%=nextNonce%>&action=start&tunnel=<%=curServer%>"><%=intl._t("Start")%> - <% +<% break; } - %> +%>
- <% +<% String name = indexBean.getSpoofedHost(curServer); if (name == null || name.equals("")) { name = indexBean.getTunnelName(curServer); @@ -193,35 +176,31 @@ out.write(": "); out.write(name); } - %> +%>
<%=intl._t("Encrypted")%>: <%=encName%>
<%=intl._t("Description")%>: <%=indexBean.getTunnelDescription(curServer)%>
@@ -239,10 +218,8 @@
-

<%=intl._t("I2P Client Tunnels")%>

- @@ -252,21 +229,16 @@ - - <% +<% for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) { if (!indexBean.isClient(curClient)) continue; - %> - - +%> - - - - - - - - - - - + - <% /* TODO SSL outproxy for httpclient if plugin not present */ %> +<% /* TODO SSL outproxy for httpclient if plugin not present */ %> - <% +<% } - %> +%>
<%=intl._t("Name")%><%=intl._t("Status")%> <%=intl._t("Control")%>
 <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%> - <%=indexBean.getTunnelType(curClient)%> - <% + <%=indexBean.getTunnelType(curClient)%> + +<% /* should only happen for streamr client */ String cHost= indexBean.getClientInterface(curClient); if (cHost == null || "".equals(cHost)) { @@ -276,62 +248,55 @@ } else { out.write(cHost); } - %> - - <% +%> + +<% String cPort= indexBean.getClientPort2(curClient); out.write(cPort); if (indexBean.isSSLEnabled(curClient)) out.write(" SSL"); - %> - - <% +%> + +<% switch (indexBean.getTunnelStatus(curClient)) { case IndexBean.STARTING: %>
"><%=intl._t("Starting...")%>
-
+ " href="list?nonce=<%=nextNonce%>&action=stop&tunnel=<%=curClient%>"><%=intl._t("Stop")%> - <% +<% break; case IndexBean.STANDBY: %>
"><%=intl._t("Standby")%>
-
+ <%=intl._t("Stop")%> - <% +<% break; case IndexBean.RUNNING: %>
"><%=intl._t("Running")%>
-
+ <%=intl._t("Stop")%> - <% +<% break; case IndexBean.NOT_RUNNING: %>
"><%=intl._t("Stopped")%>
-
+ " href="list?nonce=<%=nextNonce%>&action=start&tunnel=<%=curClient%>"><%=intl._t("Start")%> - <% +<% break; } - %> +%>
- <% if ("httpclient".equals(indexBean.getInternalType(curClient)) || "connectclient".equals(indexBean.getInternalType(curClient)) || +<% if ("httpclient".equals(indexBean.getInternalType(curClient)) || "connectclient".equals(indexBean.getInternalType(curClient)) || "sockstunnel".equals(indexBean.getInternalType(curClient)) || "socksirctunnel".equals(indexBean.getInternalType(curClient))) { %> <%=intl._t("Outproxy")%>: - <% } else { %> +<% } else { %> <%=intl._t("Destination")%>: - <% } %> + <% } %> - <% +<% if (indexBean.getIsUsingOutproxyPlugin(curClient)) { %><%=intl._t("internal plugin")%><% } else { @@ -346,16 +311,16 @@ } %>
<%=intl._t("Description")%>: <%=indexBean.getTunnelDescription(curClient)%>
@@ -375,12 +340,9 @@
- <% } // isInitialized() %> - - - +