diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java
index 4c9d3f1264..8619c6ceb8 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java
@@ -71,6 +71,7 @@ public class EditBean extends IndexBean {
return _helper.getPrivateKeyFile(tunnel);
}
+/****
public String getNameSignature(int tunnel) {
String spoof = getSpoofedHost(tunnel);
if (spoof.length() <= 0)
@@ -100,6 +101,26 @@ public class EditBean extends IndexBean {
}
return "";
}
+****/
+
+ /**
+ * @since 0.9.26
+ * @return key or null
+ */
+ public SigningPrivateKey getSigningPrivateKey(int tunnel) {
+ TunnelController tun = getController(tunnel);
+ if (tun == null)
+ return null;
+ String keyFile = tun.getPrivKeyFile();
+ if (keyFile != null && keyFile.trim().length() > 0) {
+ File f = new File(keyFile);
+ if (!f.isAbsolute())
+ f = new File(_context.getConfigDir(), keyFile);
+ PrivateKeyFile pkf = new PrivateKeyFile(f);
+ return pkf.getSigningPrivKey();
+ }
+ return null;
+ }
public boolean startAutomatically(int tunnel) {
return _helper.shouldStartAutomatically(tunnel);
diff --git a/apps/i2ptunnel/jsp/editServer.jsp b/apps/i2ptunnel/jsp/editServer.jsp
index 4b51b49795..fe31926e06 100644
--- a/apps/i2ptunnel/jsp/editServer.jsp
+++ b/apps/i2ptunnel/jsp/editServer.jsp
@@ -228,6 +228,9 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
+<%
+ /******
+%>
<% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) {
String sig = editBean.getNameSignature(curTunnel);
if (sig.length() > 0) {
@@ -240,6 +243,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<%
} // sig
} // type
+ ****/
String b64 = editBean.getDestinationBase64(curTunnel);
if (!"".equals(b64)) {
@@ -256,11 +260,14 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
" 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")%>
<%
} 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
%>
diff --git a/apps/i2ptunnel/jsp/register.jsp b/apps/i2ptunnel/jsp/register.jsp
new file mode 100644
index 0000000000..f7f874a447
--- /dev/null
+++ b/apps/i2ptunnel/jsp/register.jsp
@@ -0,0 +1,191 @@
+<%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean,net.i2p.client.naming.HostTxtEntry,net.i2p.data.SigningPrivateKey,net.i2p.util.OrderedProperties"
+%><%@page trimDirectiveWhitespaces="true"
+%>
+
+<%
+ /* right now using EditBean instead of IndexBean for getSpoofedHost() */
+ /* but might want to POST to it anyway ??? */
+%>
+