2005-11-11 cervantes

* Initial pass of the routerconsole revamp, starting with I2PTunnel and
	  being progressively rolled out to other sections at later dates.
	  Featuring abstracted W3C strict XHTML1.0 markup, with CSS providing
	  layout and styling.
	* Implemented console themes. Users can create their own themes by
	  creating css files in: {i2pdir}/docs/themes/console/{themename}/
	  and activating it using the routerconsole.theme={themename} advanced
	  config property. Look at the example incomplete "defCon1" theme.
	  Note: This is very much a work in progress. Folks might want to hold-off
	  creating their own skins until the markup has solidified.
	* Added "routerconsole.javascript.disabled=true" to disable console
	  client-side scripting and "routerconsole.css.disabled=true" to remove
	  css styling (only rolled out in the i2ptunnel interface currently)
	* Fixed long standing bug with i2ptunnel client and server edit screens
	  where tunnel count and depth properties would fail to save. Added
	  backup quantity and variance configuration options.
	* Added basic accessibility support (key shortcuts, linear markup, alt and
	  title information and form labels).
	* So far only tested on IE6, Firefox 1.0.6, Opera 8 and lynx.
This commit is contained in:
cervantes
2005-11-12 02:38:55 +00:00
committed by zzz
parent 7f6aa327f2
commit b222cd43f4
8 changed files with 927 additions and 717 deletions

View File

@ -139,23 +139,63 @@ public class EditBean extends IndexBean {
} }
} }
public int getTunnelCount(int tunnel, int defaultCount) { public int getTunnelQuantity(int tunnel, int defaultQuantity) {
TunnelController tun = getController(tunnel); TunnelController tun = getController(tunnel);
if (tun != null) { if (tun != null) {
Properties opts = getOptions(tun); Properties opts = getOptions(tun);
if (opts != null) { if (opts != null) {
String len = opts.getProperty("inbound.quantity"); String len = opts.getProperty("inbound.quantity");
if (len == null) return defaultCount; if (len == null) return defaultQuantity;
try { try {
return Integer.parseInt(len); return Integer.parseInt(len);
} catch (NumberFormatException nfe) { } catch (NumberFormatException nfe) {
return defaultCount; return defaultQuantity;
} }
} else { } else {
return defaultCount; return defaultQuantity;
} }
} else { } else {
return defaultCount; return defaultQuantity;
}
}
public int getTunnelBackupQuantity(int tunnel, int defaultBackupQuantity) {
TunnelController tun = getController(tunnel);
if (tun != null) {
Properties opts = getOptions(tun);
if (opts != null) {
String len = opts.getProperty("inbound.backupQuantity");
if (len == null) return defaultBackupQuantity;
try {
return Integer.parseInt(len);
} catch (NumberFormatException nfe) {
return defaultBackupQuantity;
}
} else {
return defaultBackupQuantity;
}
} else {
return defaultBackupQuantity;
}
}
public int getTunnelVariance(int tunnel, int defaultVariance) {
TunnelController tun = getController(tunnel);
if (tun != null) {
Properties opts = getOptions(tun);
if (opts != null) {
String len = opts.getProperty("inbound.lengthVariance");
if (len == null) return defaultVariance;
try {
return Integer.parseInt(len);
} catch (NumberFormatException nfe) {
return defaultVariance;
}
} else {
return defaultVariance;
}
} else {
return defaultVariance;
} }
} }
@ -187,6 +227,10 @@ public class EditBean extends IndexBean {
String val = opts.getProperty(key); String val = opts.getProperty(key);
if ("inbound.length".equals(key)) continue; if ("inbound.length".equals(key)) continue;
if ("outbound.length".equals(key)) continue; if ("outbound.length".equals(key)) continue;
if ("inbound.lengthVariance".equals(key)) continue;
if ("outbound.lengthVariance".equals(key)) continue;
if ("inbound.backupQuantity".equals(key)) continue;
if ("outbound.backupQuantity".equals(key)) continue;
if ("inbound.quantity".equals(key)) continue; if ("inbound.quantity".equals(key)) continue;
if ("outbound.quantity".equals(key)) continue; if ("outbound.quantity".equals(key)) continue;
if ("inbound.nickname".equals(key)) continue; if ("inbound.nickname".equals(key)) continue;
@ -224,4 +268,4 @@ public class EditBean extends IndexBean {
} }
return props; return props;
} }
} }

View File

@ -38,7 +38,9 @@ public class IndexBean {
private String _i2cpHost; private String _i2cpHost;
private String _i2cpPort; private String _i2cpPort;
private String _tunnelDepth; private String _tunnelDepth;
private String _tunnelCount; private String _tunnelQuantity;
private String _tunnelVariance;
private String _tunnelBackupQuantity;
private boolean _connectDelay; private boolean _connectDelay;
private String _customOptions; private String _customOptions;
private String _proxyList; private String _proxyList;
@ -64,6 +66,10 @@ public class IndexBean {
static final String PROP_NONCE = IndexBean.class.getName() + ".nonce"; static final String PROP_NONCE = IndexBean.class.getName() + ".nonce";
static final String CLIENT_NICKNAME = "shared clients"; static final String CLIENT_NICKNAME = "shared clients";
public static final String PROP_THEME_NAME = "routerconsole.theme";
public static final String PROP_CSS_DISABLED = "routerconsole.css.disabled";
public static final String PROP_JS_DISABLED = "routerconsole.javascript.disabled";
public IndexBean() { public IndexBean() {
_context = I2PAppContext.getGlobalContext(); _context = I2PAppContext.getGlobalContext();
_log = _context.logManager().getLog(IndexBean.class); _log = _context.logManager().getLog(IndexBean.class);
@ -121,13 +127,13 @@ public class IndexBean {
return ""; return "";
if ( (_prevNonce != _curNonce) && (!validPassphrase(_passphrase)) ) if ( (_prevNonce != _curNonce) && (!validPassphrase(_passphrase)) )
return "Invalid nonce, are you being spoofed?"; return "Invalid nonce, are you being spoofed?";
if ("Stop all tunnels".equals(_action)) if ("Stop all".equals(_action))
return stopAll(); return stopAll();
else if ("Start all tunnels".equals(_action)) else if ("Start all".equals(_action))
return startAll(); return startAll();
else if ("Restart all".equals(_action)) else if ("Restart all".equals(_action))
return restartAll(); return restartAll();
else if ("Reload config".equals(_action)) else if ("Reload configuration".equals(_action))
return reloadConfig(); return reloadConfig();
else if ("stop".equals(_action)) else if ("stop".equals(_action))
return stop(); return stop();
@ -213,14 +219,22 @@ public class IndexBean {
"client".equals(c.getType()) "client".equals(c.getType())
) && "true".equalsIgnoreCase(c.getSharedClient())) { ) && "true".equalsIgnoreCase(c.getSharedClient())) {
Properties cOpt = c.getConfig(""); Properties cOpt = c.getConfig("");
if (_tunnelCount != null) { if (_tunnelQuantity != null) {
cOpt.setProperty("option.inbound.quantity", _tunnelCount); cOpt.setProperty("option.inbound.quantity", _tunnelQuantity);
cOpt.setProperty("option.outbound.quantity", _tunnelCount); cOpt.setProperty("option.outbound.quantity", _tunnelQuantity);
} }
if (_tunnelDepth != null) { if (_tunnelDepth != null) {
cOpt.setProperty("option.inbound.length", _tunnelDepth); cOpt.setProperty("option.inbound.length", _tunnelDepth);
cOpt.setProperty("option.outbound.length", _tunnelDepth); cOpt.setProperty("option.outbound.length", _tunnelDepth);
} }
if (_tunnelVariance != null) {
cOpt.setProperty("option.inbound.lengthVariance", _tunnelVariance);
cOpt.setProperty("option.outbound.lengthVariance", _tunnelVariance);
}
if (_tunnelBackupQuantity != null) {
cOpt.setProperty("option.inbound.backupQuantity", _tunnelBackupQuantity);
cOpt.setProperty("option.outbound.backupQuantity", _tunnelBackupQuantity);
}
cOpt.setProperty("option.inbound.nickname", CLIENT_NICKNAME); cOpt.setProperty("option.inbound.nickname", CLIENT_NICKNAME);
cOpt.setProperty("option.outbound.nickname", CLIENT_NICKNAME); cOpt.setProperty("option.outbound.nickname", CLIENT_NICKNAME);
@ -275,6 +289,24 @@ public class IndexBean {
// The remaining methods are simple bean props for the jsp to query // The remaining methods are simple bean props for the jsp to query
//// ////
public String getTheme() {
String theme = _context.getProperty(PROP_THEME_NAME);
if (theme != null)
return "/themes/console/" + theme + "/";
else
return "/themes/console/";
}
public boolean allowCSS() {
String css = _context.getProperty(PROP_CSS_DISABLED);
return (css == null);
}
public boolean allowJS() {
String js = _context.getProperty(PROP_JS_DISABLED);
return (js == null);
}
public int getTunnelCount() { public int getTunnelCount() {
if (_group == null) return 0; if (_group == null) return 0;
return _group.getControllers().size(); return _group.getControllers().size();
@ -313,10 +345,10 @@ public class IndexBean {
} }
public String getTypeName(String internalType) { public String getTypeName(String internalType) {
if ("client".equals(internalType)) return "Client proxy"; if ("client".equals(internalType)) return "Standard client";
else if ("httpclient".equals(internalType)) return "HTTP proxy"; else if ("httpclient".equals(internalType)) return "HTTP client";
else if ("ircclient".equals(internalType)) return "IRC proxy"; else if ("ircclient".equals(internalType)) return "IRC client";
else if ("server".equals(internalType)) return "Server"; else if ("server".equals(internalType)) return "Standard server";
else if ("httpserver".equals(internalType)) return "HTTP server"; else if ("httpserver".equals(internalType)) return "HTTP server";
else return internalType; else return internalType;
} }
@ -424,8 +456,16 @@ public class IndexBean {
_tunnelDepth = (tunnelDepth != null ? tunnelDepth.trim() : null); _tunnelDepth = (tunnelDepth != null ? tunnelDepth.trim() : null);
} }
/** how many parallel inbound tunnels to use */ /** how many parallel inbound tunnels to use */
public void setTunnelCount(String tunnelCount) { public void setTunnelQuantity(String tunnelQuantity) {
_tunnelCount = (tunnelCount != null ? tunnelCount.trim() : null); _tunnelQuantity = (tunnelQuantity != null ? tunnelQuantity.trim() : null);
}
/** how much randomisation to apply to the depth of tunnels */
public void setTunnelVariance(String tunnelVariance) {
_tunnelVariance = (tunnelVariance != null ? tunnelVariance.trim() : null);
}
/** how many tunnels to hold in reserve to guard against failures */
public void setTunnelBackupQuantity(String tunnelBackupQuantity) {
_tunnelBackupQuantity = (tunnelBackupQuantity != null ? tunnelBackupQuantity.trim() : null);
} }
/** what I2P session overrides should be used */ /** what I2P session overrides should be used */
public void setCustomOptions(String customOptions) { public void setCustomOptions(String customOptions) {
@ -582,6 +622,7 @@ public class IndexBean {
} else { } else {
return null; return null;
} }
return config; return config;
} }
@ -611,6 +652,10 @@ public class IndexBean {
if ("outbound.length".equals(key)) continue; if ("outbound.length".equals(key)) continue;
if ("inbound.quantity".equals(key)) continue; if ("inbound.quantity".equals(key)) continue;
if ("outbound.quantity".equals(key)) continue; if ("outbound.quantity".equals(key)) continue;
if ("inbound.lengthVariance".equals(key)) continue;
if ("outbound.lengthVariance".equals(key)) continue;
if ("inbound.backupQuantity".equals(key)) continue;
if ("outbound.backupQuantity".equals(key)) continue;
if ("inbound.nickname".equals(key)) continue; if ("inbound.nickname".equals(key)) continue;
if ("outbound.nickname".equals(key)) continue; if ("outbound.nickname".equals(key)) continue;
if ("i2p.streaming.connectDelay".equals(key)) continue; if ("i2p.streaming.connectDelay".equals(key)) continue;
@ -621,14 +666,22 @@ public class IndexBean {
config.setProperty("startOnLoad", _startOnLoad + ""); config.setProperty("startOnLoad", _startOnLoad + "");
if (_tunnelCount != null) { if (_tunnelQuantity != null) {
config.setProperty("option.inbound.quantity", _tunnelCount); config.setProperty("option.inbound.quantity", _tunnelQuantity);
config.setProperty("option.outbound.quantity", _tunnelCount); config.setProperty("option.outbound.quantity", _tunnelQuantity);
} }
if (_tunnelDepth != null) { if (_tunnelDepth != null) {
config.setProperty("option.inbound.length", _tunnelDepth); config.setProperty("option.inbound.length", _tunnelDepth);
config.setProperty("option.outbound.length", _tunnelDepth); config.setProperty("option.outbound.length", _tunnelDepth);
} }
if (_tunnelVariance != null) {
config.setProperty("option.inbound.lengthVariance", _tunnelVariance);
config.setProperty("option.outbound.lengthVariance", _tunnelVariance);
}
if (_tunnelBackupQuantity != null) {
config.setProperty("option.inbound.backupQuantity", _tunnelBackupQuantity);
config.setProperty("option.outbound.backupQuantity", _tunnelBackupQuantity);
}
if (_connectDelay) if (_connectDelay)
config.setProperty("option.i2p.streaming.connectDelay", "1000"); config.setProperty("option.i2p.streaming.connectDelay", "1000");
else else
@ -673,4 +726,4 @@ public class IndexBean {
buf.append((String)msgs.get(i)).append("\n"); buf.append((String)msgs.get(i)).append("\n");
} }
} }
} }

View File

@ -1,26 +1,25 @@
<%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean" %> <%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean" %><%
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> String tun = request.getParameter("tunnel");
<% String tun = request.getParameter("tunnel"); if (tun != null) {
if (tun != null) { try {
try { int curTunnel = Integer.parseInt(tun);
int curTunnel = Integer.parseInt(tun); if (EditBean.staticIsClient(curTunnel)) {
if (EditBean.staticIsClient(curTunnel)) { %><jsp:include page="editClient.jsp" /><%
%><jsp:include page="editClient.jsp" /><%
} else {
%><jsp:include page="editServer.jsp" /><%
}
} catch (NumberFormatException nfe) {
%>Invalid tunnel parameter<%
}
} else {
String type = request.getParameter("type");
int curTunnel = -1;
if ("client".equals(type) || "httpclient".equals(type) || "ircclient".equals(type)) {
%><jsp:include page="editClient.jsp" /><%
} else if ("server".equals(type) || "httpserver".equals(type)) {
%><jsp:include page="editServer.jsp" /><%
} else { } else {
%>Invalid tunnel type<% %><jsp:include page="editServer.jsp" /><%
} }
} catch (NumberFormatException nfe) {
%>Invalid tunnel parameter<%
} }
} else {
String type = request.getParameter("type");
int curTunnel = -1;
if ("client".equals(type) || "httpclient".equals(type) || "ircclient".equals(type)) {
%><jsp:include page="editClient.jsp" /><%
} else if ("server".equals(type) || "httpserver".equals(type)) {
%><jsp:include page="editServer.jsp" /><%
} else {
%>Invalid tunnel type<%
}
}
%> %>

View File

@ -1,4 +1,5 @@
<%@page contentType="text/html" %> <%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean"%><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<jsp:useBean class="net.i2p.i2ptunnel.web.EditBean" id="editBean" scope="request" /> <jsp:useBean class="net.i2p.i2ptunnel.web.EditBean" id="editBean" scope="request" />
<% String tun = request.getParameter("tunnel"); <% String tun = request.getParameter("tunnel");
int curTunnel = -1; int curTunnel = -1;
@ -10,284 +11,277 @@
} }
} }
%> %>
<html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<title>I2PTunnel Webmanager</title> <title>I2PTunnel Webmanager - Edit</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<% if (editBean.allowCSS()) {
%><link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" />
<link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" />
<% }
%>
</head> </head>
<body> <body id="tunnelEditPage">
<form action="index.jsp"> <div id="pageHeader">
<input type="hidden" name="tunnel" value="<%=request.getParameter("tunnel")%>" /> </div>
<input type="hidden" name="nonce" value="<%=editBean.getNextNonce()%>" />
<table width="80%" align="center" border="0" cellpadding="1" cellspacing="1">
<tr>
<td style="background-color:#000">
<div style="background-color:#ffffed">
<table width="100%" align="center" border="0" cellpadding="4" cellspacing="1">
<tr>
<td colspan="2" align="center">
<% if (curTunnel >= 0) { %>
<b>Edit proxy settings</b>
<% } else { %>
<b>New proxy settings</b>
<% } %>
</td>
</tr>
<tr>
<td><b>Name: </b>
</td>
<td>
<input type="text" size="30" maxlength="50" name="name" value="<%=editBean.getTunnelName(curTunnel)%>" />
</td>
</tr>
<tr>
<td><b>Type: </b>
<td><%
if (curTunnel >= 0) {
%><%=editBean.getTunnelType(curTunnel)%>
<input type="hidden" name="type" value="<%=editBean.getInternalType(curTunnel)%>" />
<%
} else {
%><%=editBean.getTypeName(request.getParameter("type"))%>
<input type="hidden" name="type" value="<%=request.getParameter("type")%>" />
<%
}
%></td>
</tr>
<tr>
<td><b>Description: </b>
</td>
<td>
<input type="text" size="60" maxlength="80" name="description" value="<%=editBean.getTunnelDescription(curTunnel)%>" />
</td>
</tr>
<tr>
<td><b>Start automatically?:</b>
</td>
<td>
<% if (editBean.startAutomatically(curTunnel)) { %>
<input value="1" type="checkbox" name="startOnLoad" checked="true" />
<% } else { %>
<input value="1" type="checkbox" name="startOnLoad" />
<% } %>
<i>(Check the Box for 'YES')</i>
</td>
</tr>
<tr>
<td> <b>Listening Port:</b>
</td>
<td>
<input type="text" size="6" maxlength="5" name="port" value="<%=editBean.getClientPort(curTunnel)%>" />
</td>
</tr>
<tr>
<td><b> Accessable by:</b>
</td>
<td>
<select name="reachableBy">
<% String clientInterface = editBean.getClientInterface(curTunnel); %>
<% if (("127.0.0.1".equals(clientInterface)) || (clientInterface == null) || (clientInterface.trim().length() <= 0)) { %>
<option value="127.0.0.1" selected="true">Locally (127.0.0.1)</option>
<option value="0.0.0.0">Everyone (0.0.0.0)</option>
<option value="other">LAN Hosts (Please specify your LAN address)</option>
</select> <form method="post" action="index.jsp">
&nbsp;&nbsp;
<b>others:</b>
<input type="text" name="reachableByOther" size="20" />
<% } else if ("0.0.0.0".equals(clientInterface)) { %>
<option value="127.0.0.1">Locally (127.0.0.1)</option>
<option value="0.0.0.0" selected="true">Everyone (0.0.0.0)</option>
<option value="other">LAN Hosts (Please specify your LAN address)</option>
</select> <div id="tunnelEditPanel" class="panel">
&nbsp;&nbsp; <div class="header">
<b>others:</b> <%
<input type="text" name="reachableByOther" size="20" /> String tunnelTypeName = "";
<% } else { %> String tunnelType = "";
<option value="127.0.0.1">Locally (127.0.0.1)</option> if (curTunnel >= 0) {
<option value="0.0.0.0">Everyone (0.0.0.0)</option> tunnelTypeName = editBean.getTunnelType(curTunnel);
<option value="other" selected="true">LAN Hosts (Please specify your LAN address)</option> tunnelType = editBean.getInternalType(curTunnel);
%><h4>Edit proxy settings</h4><%
} else {
tunnelTypeName = editBean.getTypeName(request.getParameter("type"));
tunnelType = request.getParameter("type");
%><h4>New proxy settings</h4><%
} %>
<input type="hidden" name="tunnel" value="<%=request.getParameter("tunnel")%>" />
<input type="hidden" name="nonce" value="<%=editBean.getNextNonce()%>" />
<input type="hidden" name="type" value="<%=tunnelType%>" />
</div>
<div class="separator">
<hr />
</div>
</select> <div id="nameField" class="rowItem">
&nbsp;&nbsp; <label for="name" accesskey="N">
<b>others:</b> <span class="accessKey">N</span>ame:
<input type="text" name="reachableByOther" size="20" value="<%=clientInterface%>" /> </label>
<% } %> <input type="text" size="30" maxlength="50" name="name" id="name" title="Tunnel Name" value="<%=editBean.getTunnelName(curTunnel)%>" class="freetext" />
</div>
<div id="typeField" class="rowItem">
<label>Type:</label>
<span class="text"><%=tunnelTypeName%></span>
</div>
<div id="descriptionField" class="rowItem">
<label for="description" accesskey="e">
D<span class="accessKey">e</span>scription:
</label>
<input type="text" size="60" maxlength="80" name="description" id="description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext" />
</div>
<div class="subdivider">
<hr />
</div>
<div id="accessField" class="rowItem">
<label>Access Point:</label>
</div>
<div id="portField" class="rowItem">
<label for="port" accesskey="P">
<span class="accessKey">P</span>ort:
</label>
<input type="text" size="6" maxlength="5" id="port" name="port" title="Access Port Number" value="<%=editBean.getClientPort(curTunnel)%>" class="freetext" />
</div>
<div id="reachField" class="rowItem">
<label for="reachableBy" accesskey="r">
<span class="accessKey">R</span>eachable by:
</label>
<select id="reachableBy" name="reachableBy" title="Valid IP for Client Access" class="selectbox">
<% String clientInterface = editBean.getClientInterface(curTunnel);
String otherInterface = "";
if (!("127.0.0.1".equals(clientInterface)) &&
!("0.0.0.0".equals(clientInterface)) &&
(clientInterface != null) &&
(clientInterface.trim().length() > 0)) {
otherInterface = clientInterface;
}
%><option value="127.0.0.1"<%=("127.0.0.1".equals(clientInterface) ? " selected=\"selected\"" : "")%>>Locally (127.0.0.1)</option>
<option value="0.0.0.0"<%=("0.0.0.0".equals(clientInterface) ? " selected=\"selected\"" : "")%>>Everyone (0.0.0.0)</option>
<option value="other"<%=(!("".equals(otherInterface)) ? " selected=\"selected\"" : "")%>>LAN Hosts (Please specify your LAN address)</option>
</select>
</div>
<div id="otherField" class="rowItem">
<label for="reachableByOther" accesskey="O">
<span class="accessKey">O</span>ther:
</label>
<input type="text" size="20" id="reachableByOther" name="reachableByOther" title="Alternative IP for Client Access" value="<%=otherInterface%>" class="freetext" />
</div>
<div class="subdivider">
<hr />
</div>
<% if ("httpclient".equals(editBean.getInternalType(curTunnel))) {
%><div id="destinationField" class="rowItem">
<label for="proxyList" accesskey="x">
Outpro<span class="accessKey">x</span>ies:
</label>
<input type="text" size="30" id="proxyList" name="proxyList" title="List of Outproxy I2P destinations" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext" />
</div>
<% } else {
%><div id="destinationField" class="rowItem">
<label for="targetDestination" accesskey="T">
<span class="accessKey">T</span>unnel Destination:
</label>
<input type="text" size="30" id="targetDestination" name="targetDestination" title="Destination of the Tunnel" value="<%=editBean.getClientDestination(curTunnel)%>" class="freetext" />
<span class="comment">(name or destination)</span>
</div>
<% }
%><div id="profileField" class="rowItem">
<label for="profile" accesskey="f">
Pro<span class="accessKey">f</span>ile:
</label>
<select id="profile" name="profile" title="Connection Profile" class="selectbox">
<% boolean interactiveProfile = editBean.isInteractive(curTunnel);
%><option <%=(interactiveProfile == true ? "selected=\"selected\" " : "")%>value="interactive">interactive connection </option>
<option <%=(interactiveProfile == false ? "selected=\"selected\" " : "")%>value="bulk">bulk connection (downloads/websites/BT) </option>
</select>
</div>
<div id="delayConnectField" class="rowItem">
<label for="connectDelay" accesskey="y">
Dela<span class="accessKey">y</span> Connect:
</label>
<input value="1000" type="checkbox" id="connectDelay" name="connectDelay" title="Delay Connection"<%=(editBean.shouldDelay(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
<span class="comment">(for request/response connections)</span>
</div>
<div id="sharedtField" class="rowItem">
<label for="shared" accesskey="h">
S<span class="accessKey">h</span>ared Client:
</label>
<input value="true" type="checkbox" id="shared" name="shared" title="Share tunnels with other clients"<%=(editBean.isSharedClient(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
<span class="comment">(Share tunnels with other clients and irc/httpclients? Change requires restart of client proxy)</span>
</div>
<div id="startupField" class="rowItem">
<label for="startOnLoad" accesskey="a">
<span class="accessKey">A</span>uto Start:
</label>
<input value="1" type="checkbox" id="startOnLoad" name="startOnLoad" title="Start Tunnel Automatically"<%=(editBean.startAutomatically(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
<span class="comment">(Check the Box for 'YES')</span>
</div>
<div class="footer">
</div>
</div>
</td> <div id="tunnelAdvancedNetworking" class="panel">
</tr> <div class="header">
<tr> <h4>Advanced networking options</h4>
<% if ("httpclient".equals(editBean.getInternalType(curTunnel))) { %> <span class="comment">(NOTE: when this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!)</span>
<td><b>Outproxies:</b> </div>
<% } else { %>
<td><b>Target:</b> <div class="separator">
<% } %> <hr />
</td> </div>
<td>
<% if ("httpclient".equals(editBean.getInternalType(curTunnel))) { %> <div id="tunnelOptionsField" class="rowItem">
<input type="text" name="proxyList" value="<%=editBean.getClientDestination(curTunnel)%>" /> <label>Tunnel Options:</label>
<% } else { %> </div>
<input type="text" name="targetDestination" value="<%=editBean.getClientDestination(curTunnel)%>" /> <div id="depthField" class="rowItem">
<% } %> <label for="tunnelDepth" accesskey="t">
<i>(name or destination)</i> Dep<span class="accessKey">t</span>h:
</td> </label>
</tr> <select id="tunnelDepth" name="tunnelDepth" title="Depth of each Tunnel" class="selectbox">
<tr> <% int tunnelDepth = editBean.getTunnelDepth(curTunnel, 2);
<td> %><option value="0"<%=(tunnelDepth == 0 ? " selected=\"selected\"" : "") %>>0 hop tunnel (low anonymity, low latency)</option>
<b>Delayed connect?</b> <option value="1"<%=(tunnelDepth == 1 ? " selected=\"selected\"" : "") %>>1 hop tunnel (medium anonymity, medium latency)</option>
</td> <option value="2"<%=(tunnelDepth == 2 ? " selected=\"selected\"" : "") %>>2 hop tunnel (high anonymity, high latency)</option>
<td> <% if (tunnelDepth > 2) {
<% if (editBean.shouldDelay(curTunnel)) { %> %> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> hop tunnel</option>
<input type="checkbox" value="1000" name="connectDelay" checked="true" /> <% }
<% } else { %> %></select>
<input type="checkbox" value="1000" name="connectDelay" /> </div>
<% } %> <div id="varianceField" class="rowItem">
<i>(for request/response connections)</i> <label for="tunnelVariance" accesskey="v">
</td> <span class="accessKey">V</span>ariance:
</tr> </label>
<tr> <select id="tunnelVariance" name="tunnelVariance" title="Level of Randomization for Tunnel Depth" class="selectbox">
<td><b>Profile:</b> <% int tunnelVariance = editBean.getTunnelVariance(curTunnel, -1);
</td> %><option value="0"<%=(tunnelVariance == 0 ? " selected=\"selected\"" : "") %>>0 hop variance (no randomisation, consistant performance)</option>
<td> <option value="-1"<%=(tunnelVariance == -1 ? " selected=\"selected\"" : "") %>>+/- 0-1 hop variance (standard randomisation, standard performance)</option>
<select name="profile"> <option value="-2"<%=(tunnelVariance == -2 ? " selected=\"selected\"" : "") %>>+/- 0-2 hop variance (high randomisation, variable performance)</option>
<% if (editBean.isInteractive(curTunnel)) { %> <option value="1"<%=(tunnelVariance == 1 ? " selected=\"selected\"" : "") %>>+ 0-1 hop variance (medium additive randomisation, subtractive performance)</option>
<option value="interactive" selected="true">interactive connection </option> <option value="2"<%=(tunnelVariance == 2 ? " selected=\"selected\"" : "") %>>+ 0-2 hop variance (high additive randomisation, subtractive performance)</option>
<option value="bulk">bulk connection (downloads/websites/BT) </option> <% if (tunnelVariance > 2 || tunnelVariance < -2) {
<% } else { %> %> <option value="<%=tunnelVariance%>" selected="selected"><%= (tunnelVariance > 2 ? "+ " : "+/- ") %>0-<%=tunnelVariance%> hop variance</option>
<option value="interactive">interactive connection </option> <% }
<option value="bulk" selected="true">bulk connection (downloads/websites/BT) </option> %></select>
<% } %> </div>
</select> <div id="countField" class="rowItem">
</td> <label for="tunnelQuantity" accesskey="C">
</tr> <span class="accessKey">C</span>ount:
<tr> </label>
<td> <select id="tunnelQuantity" name="tunnelQuantity" title="Number of Tunnels in Group" class="selectbox">
<b>Shared Client</b> <% int tunnelQuantity = editBean.getTunnelQuantity(curTunnel, 2);
</td> %><option value="1"<%=(tunnelQuantity == 1 ? " selected=\"selected\"" : "") %>>1 inbound tunnel (low bandwidth usage, less reliability)</option>
<td> <option value="2"<%=(tunnelQuantity == 2 ? " selected=\"selected\"" : "") %>>2 inbound tunnels (standard bandwidth usage, standard reliability)</option>
<% if (editBean.isSharedClient(curTunnel)) { %> <option value="3"<%=(tunnelQuantity == 3 ? " selected=\"selected\"" : "") %>>3 inbound tunnels (higher bandwidth usage, higher reliability)</option>
<input type="checkbox" value="true" name="shared" checked="true" /> <% if (tunnelQuantity > 3) {
<% } else { %> %> <option value="<%=tunnelQuantity%>" selected="selected"><%=tunnelQuantity%> inbound tunnels</option>
<input type="checkbox" value="true" name="shared" /> <% }
<% } %> %></select>
<i>(Share tunnels with other clients and irc/httpclients? Change requires restart of client proxy)</i> </div>
</td> <div id="backupField" class="rowItem">
</tr> <label for="tunnelBackupQuantity" accesskey="b">
<tr> <span class="accessKey">B</span>ackup Count:
<td colspan="2" align="center"> </label>
<b><hr size="1"> <select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="Number of Reserve Tunnels" class="selectbox">
Advanced networking options<br /> <% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0);
<span style="color:#dd0000;">(NOTE: when this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!)</span></b> %><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>>0 backup tunnels (0 redundancy, no added resource usage)</option>
</td> <option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>>1 backup tunnel (low redundancy, low resource usage)</option>
</tr> <option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>>2 backup tunnels (medium redundancy, medium resource usage)</option>
<tr> <option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>>3 backup tunnels (high redundancy, high resource usage)</option>
<td> <% if (tunnelBackupQuantity > 3) {
<b>Tunnel depth:</b> %> <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> backup tunnels</option>
</td> <% }
<td><select name="tunnelDepth"> %></select>
<% int tunnelDepth = editBean.getTunnelDepth(curTunnel, 2); </div>
switch (tunnelDepth) {
case 0: %> <div class="subdivider">
<option value="0" selected="true">0 hop tunnel (low anonymity, low latency)</option> <hr />
<option value="1" >1 hop tunnel (medium anonymity, medium latency)</option> </div>
<option value="2" >2 hop tunnel (high anonymity, high latency)</option>
<% break; <div id="optionsField" class="rowItem">
case 1: %> <label>I2CP Options:</label>
<option value="0" >0 hop tunnel (low anonymity, low latency)</option> </div>
<option value="1" selected="true">1 hop tunnel (medium anonymity, medium latency)</option> <div id="optionsHostField" class="rowItem">
<option value="2" >2 hop tunnel (high anonymity, high latency)</option> <label for="clientHost" accesskey="o">
<% break; H<span class="accessKey">o</span>st:
case 2: %> </label>
<option value="0" >0 hop tunnel (low anonymity, low latency)</option> <input type="text" id="clientHost" name="clientHost" size="20" title="I2CP Hostname or IP" value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext" />
<option value="1" >1 hop tunnel (medium anonymity, medium latency)</option> </div>
<option value="2" selected="true">2 hop tunnel (high anonymity, high latency)</option> <div id="optionsPortField" class="rowItem">
<% break; <label for="clientPort" accesskey="r">
default: %> Po<span class="accessKey">r</span>t:
<option value="0" >0 hop tunnel (low anonymity, low latency)</option> </label>
<option value="1" >1 hop tunnel (medium anonymity, medium latency)</option> <input type="text" id="clientPort" name="clientPort" size="20" title="I2CP Port Number" value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext" />
<option value="2" >2 hop tunnel (high anonymity, high latency)</option> </div>
<option value="<%=tunnelDepth%>" ><%=tunnelDepth%> hop tunnel</option>
<% } %> <div class="subdivider">
</select> <hr />
</td> </div>
</tr>
<tr> <div id="customOptionsField" class="rowItem">
<td><b>Tunnel count:</b> <label for="customOptions" accesskey="u">
</td> C<span class="accessKey">u</span>stom options:
<td> </label>
<select name="tunnelCount"> <input type="text" id="customOptions" name="customOptions" size="60" title="Custom Options" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" />
<% int tunnelCount = editBean.getTunnelCount(curTunnel, 2); </div>
switch (tunnelCount) {
case 1: %> <div class="footer">
<option value="1" selected="true" >1 inbound tunnel (low bandwidth usage, less reliability)</option> </div>
<option value="2" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option> </div>
<option value="3" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option> <div id="globalOperationsPanel" class="panel">
<% break; <div class="header"></div>
case 2: %> <div class="footer">
<option value="1" >1 inbound tunnel (low bandwidth usage, less reliability)</option> <div class="toolbox">
<option value="2" selected="true" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option> <input type="hidden" value="true" name="removeConfirm" />
<option value="3" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option> <button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Save changes" title="Save Changes"><span class="accessKey">S</span>ave</button><button id="controlDelete" <%=(editBean.allowJS() ? "onclick=\"if (!confirm('Are you sure you want to delete?')) { return false; }\" " : "")%>accesskey="D" class="control" type="submit" name="action" value="Delete this proxy" title="Delete this Proxy"><span class="accessKey">D</span>elete</button>
<% break; </div>
case 3: %> </div>
<option value="1" >1 inbound tunnel (low bandwidth usage, less reliability)</option> </div>
<option value="2" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option> </form>
<option value="3" selected="true" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option> <div id="pageFooter">
<% break; </div>
default: %> </body>
<option value="1" >1 inbound tunnel (low bandwidth usage, less reliability)</option> </html>
<option value="2" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option>
<option value="3" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option>
<option value="<%=tunnelDepth%>" ><%=tunnelDepth%> inbound tunnels</option>
<% } %>
</select>
</td>
<tr>
<td><b>I2CP host:</b>
</td>
<td>
<input type="text" name="clientHost" size="20" value="<%=editBean.getI2CPHost(curTunnel)%>" />
</td>
</tr>
<tr>
<td><b>I2CP port:</b>
</td>
<td>
<input type="text" name="clientPort" size="20" value="<%=editBean.getI2CPPort(curTunnel)%>" /><br />
</td>
</tr>
<tr>
<td><b>Custom options:</b>
</td>
<td>
<input type="text" name="customOptions" size="60" value="<%=editBean.getCustomOptions(curTunnel)%>" />
</td>
</tr>
<tr>
<td colspan="2">
<hr size="1">
</td>
</tr>
<tr>
<td>
<b>Save:</b>
</td>
<td>
<input type="submit" name="action" value="Save changes" />
</td>
</tr>
<tr>
<td><b>Delete?</b>
</td>
<td>
<input type="submit" name="action" value="Delete this proxy" /> &nbsp;&nbsp;
<b><span style="color:#dd0000;">confirm delete:</span></b>
<input type="checkbox" value="true" name="removeConfirm" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>

View File

@ -1,4 +1,5 @@
<%@page contentType="text/html" %> <%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean"%><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<jsp:useBean class="net.i2p.i2ptunnel.web.EditBean" id="editBean" scope="request" /> <jsp:useBean class="net.i2p.i2ptunnel.web.EditBean" id="editBean" scope="request" />
<% String tun = request.getParameter("tunnel"); <% String tun = request.getParameter("tunnel");
int curTunnel = -1; int curTunnel = -1;
@ -10,224 +11,249 @@
} }
} }
%> %>
<html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<title>I2PTunnel Webmanager</title> <title>I2PTunnel Webmanager - Edit</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<% if (editBean.allowCSS()) {
%><link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" />
<link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" />
<% }
%>
</head> </head>
<body> <body id="tunnelEditPage">
<form action="index.jsp"> <div id="pageHeader">
<input type="hidden" name="tunnel" value="<%=request.getParameter("tunnel")%>" /> </div>
<input type="hidden" name="nonce" value="<%=editBean.getNextNonce()%>" />
<table width="80%" align="center" border="0" cellpadding="1" cellspacing="1"> <form method="post" action="index.jsp">
<tr>
<td style="background-color:#000"> <div id="tunnelEditPanel" class="panel">
<div style="background-color:#ffffed"> <div class="header">
<table width="100%" align="center" border="0" cellpadding="4" cellspacing="1"> <%
<tr> String tunnelTypeName = "";
<td colspan="2" align="center"> String tunnelType = "";
<% if (curTunnel >= 0) { %> if (curTunnel >= 0) {
<b>Edit server settings</b> tunnelTypeName = editBean.getTunnelType(curTunnel);
<% } else { %> tunnelType = editBean.getInternalType(curTunnel);
<b>New server settings</b> %><h4>Edit server settings</h4><%
<% } %> } else {
</td> tunnelTypeName = editBean.getTypeName(request.getParameter("type"));
</tr> tunnelType = request.getParameter("type");
<tr> %><h4>New server settings</h4><%
<td><b>Name: </b> } %>
</td> <input type="hidden" name="tunnel" value="<%=request.getParameter("tunnel")%>" />
<td> <input type="hidden" name="nonce" value="<%=editBean.getNextNonce()%>" />
<input type="text" size="30" maxlength="50" name="name" value="<%=editBean.getTunnelName(curTunnel)%>" /> <input type="hidden" name="type" value="<%=tunnelType%>" />
</td> </div>
</tr>
<tr> <div class="separator">
<td><b>Type: </b> <hr />
<td><% </div>
if (curTunnel >= 0) {
%><%=editBean.getTunnelType(curTunnel)%> <div id="nameField" class="rowItem">
<input type="hidden" name="type" value="<%=editBean.getInternalType(curTunnel)%>" /> <label for="name" accesskey="N">
<% <span class="accessKey">N</span>ame:
} else { </label>
%><%=editBean.getTypeName(request.getParameter("type"))%> <input type="text" size="30" maxlength="50" name="name" id="name" title="Tunnel Name" value="<%=editBean.getTunnelName(curTunnel)%>" class="freetext" />
<input type="hidden" name="type" value="<%=request.getParameter("type")%>" /> </div>
<% <div id="typeField" class="rowItem">
} <label>Type:</label>
%></td> <span class="text"><%=tunnelTypeName%></span>
</tr> </div>
<tr> <div id="descriptionField" class="rowItem">
<td><b>Description: </b> <label for="description" accesskey="e">
</td> D<span class="accessKey">e</span>scription:
<td> </label>
<input type="text" size="60" maxlength="80" name="description" value="<%=editBean.getTunnelDescription(curTunnel)%>" /> <input type="text" size="60" maxlength="80" name="description" id="description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext" />
</td> </div>
</tr> <div id="startupField" class="rowItem">
<tr> <label for="startOnLoad" accesskey="a">
<td><b>Start automatically?:</b> <span class="accessKey">A</span>uto Start:
</td> </label>
<td> <input value="1" type="checkbox" id="startOnLoad" name="startOnLoad" title="Start Tunnel Automatically"<%=(editBean.startAutomatically(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
<% if (editBean.startAutomatically(curTunnel)) { %> <span class="comment">(Check the Box for 'YES')</span>
<input value="1" type="checkbox" name="startOnLoad" checked="true" /> </div>
<% } else { %>
<input value="1" type="checkbox" name="startOnLoad" /> <div class="subdivider">
<% } %> <hr />
<i>(Check the Box for 'YES')</i> </div>
</td>
</tr> <div id="targetField" class="rowItem">
<tr> <label>Target:</label>
<td> <b>Target:</b> </div>
</td> <div id="hostField" class="rowItem">
<td> <label for="targetHost" accesskey="H">
Host: <input type="text" size="20" name="targetHost" value="<%=editBean.getTargetHost(curTunnel)%>" /> <span class="accessKey">H</span>ost:
Port: <input type="text" size="6" maxlength="5" name="targetPort" value="<%=editBean.getTargetPort(curTunnel)%>" /> </label>
</td> <input type="text" size="20" id="targetHost" name="targetHost" title="Target Hostname or IP" value="<%=editBean.getTargetHost(curTunnel)%>" class="freetext" />
</tr> </div>
<% String curType = editBean.getInternalType(curTunnel); <div id="portField" class="rowItem">
if ( (curType == null) || (curType.trim().length() <= 0) ) <label for="targetPort" accesskey="P">
curType = request.getParameter("type"); <span class="accessKey">P</span>ort:
if ("httpserver".equals(curType)) { %> </label>
<tr> <input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="Target Port Number" value="<%=editBean.getTargetPort(curTunnel)%>" class="freetext" />
<td><b>Website name:</b></td> </div>
<td><input type="text" size="20" name="spoofedHost" value="<%=editBean.getSpoofedHost(curTunnel)%>" />
</td></tr> <div class="subdivider">
<% } %> <hr />
<tr> </div>
<td><b>Private key file:</b>
</td> <% if ("httpserver".equals(tunnelType)) {
<td><input type="text" size="30" name="privKeyFile" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" /></td> %><div id="websiteField" class="rowItem">
</tr> <label for="spoofedHost" accesskey="W">
<tr> <span class="accessKey">W</span>ebsite name:
<td><b>Profile:</b> </label>
</td> <input type="text" size="20" id="spoofedHost" name="spoofedHost" title="Website Host Name" value="<%=editBean.getSpoofedHost(curTunnel)%>" class="freetext" />
<td> </div>
<select name="profile"> <% }
<% if (editBean.isInteractive(curTunnel)) { %> %><div id="privKeyField" class="rowItem">
<option value="interactive" selected="true">interactive connection </option> <label for="privKeyFile" accesskey="k">
<option value="bulk">bulk connection (downloads/websites/BT) </option> Private <span class="accessKey">k</span>ey file:
<% } else { %> </label>
<option value="interactive">interactive connection </option> <input type="text" size="30" id="privKeyFile" name="privKeyFile" title="Path to Private Key File" value="<%=editBean.getPrivateKeyFile(curTunnel)%>" class="freetext" />
<option value="bulk" selected="true">bulk connection (downloads/websites/BT) </option> </div>
<% } %> <div id="profileField" class="rowItem">
</select> <label for="profile" accesskey="f">
</td> Pro<span class="accessKey">f</span>ile:
</tr> </label>
<tr> <select id="profile" name="profile" title="Connection Profile" class="selectbox">
<td valign="top" align="left"><b>Local destination:</b><br /><i>(if known)</i></td> <% boolean interactiveProfile = editBean.isInteractive(curTunnel);
<td valign="top" align="left"><input type="text" size="60" value="<%=editBean.getDestinationBase64(curTunnel)%>" /></td> %><option <%=(interactiveProfile == true ? "selected=\"selected\" " : "")%>value="interactive">interactive connection </option>
</tr> <option <%=(interactiveProfile == false ? "selected=\"selected\" " : "")%>value="bulk">bulk connection (downloads/websites/BT) </option>
<tr> </select>
<td colspan="2" align="center"> </div>
<b><hr size="1"> <div id="destinationField" class="rowItem">
Advanced networking options<br /> <label for="localDestination" accesskey="L">
</b> <span class="accessKey">L</span>ocal destination:
</td> </label>
</tr> <input type="text" size="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" value="<%=editBean.getDestinationBase64(curTunnel)%>" class="freetext" />
<tr> <span class="comment">(if known)</span>
<td> </div>
<b>Tunnel depth:</b>
</td> <div class="footer">
<td><select name="tunnelDepth"> </div>
<% int tunnelDepth = editBean.getTunnelDepth(curTunnel, 2); </div>
switch (tunnelDepth) {
case 0: %> <div id="tunnelAdvancedNetworking" class="panel">
<option value="0" selected="true">0 hop tunnel (low anonymity, low latency)</option> <div class="header">
<option value="1" >1 hop tunnel (medium anonymity, medium latency)</option> <h4>Advanced networking options</h4>
<option value="2" >2 hop tunnel (high anonymity, high latency)</option> </div>
<% break;
case 1: %> <div class="separator">
<option value="0" >0 hop tunnel (low anonymity, low latency)</option> <hr />
<option value="1" selected="true">1 hop tunnel (medium anonymity, medium latency)</option> </div>
<option value="2" >2 hop tunnel (high anonymity, high latency)</option>
<% break; <div id="tunnelOptionsField" class="rowItem">
case 2: %> <label>Tunnel Options:</label>
<option value="0" >0 hop tunnel (low anonymity, low latency)</option> </div>
<option value="1" >1 hop tunnel (medium anonymity, medium latency)</option> <div id="depthField" class="rowItem">
<option value="2" selected="true">2 hop tunnel (high anonymity, high latency)</option> <label for="tunnelDepth" accesskey="t">
<% break; Dep<span class="accessKey">t</span>h:
default: %> </label>
<option value="0" >0 hop tunnel (low anonymity, low latency)</option> <select id="tunnelDepth" name="tunnelDepth" title="Depth of each Tunnel" class="selectbox">
<option value="1" >1 hop tunnel (medium anonymity, medium latency)</option> <% int tunnelDepth = editBean.getTunnelDepth(curTunnel, 2);
<option value="2" >2 hop tunnel (high anonymity, high latency)</option> %><option value="0"<%=(tunnelDepth == 0 ? " selected=\"selected\"" : "") %>>0 hop tunnel (low anonymity, low latency)</option>
<option value="<%=tunnelDepth%>" ><%=tunnelDepth%> hop tunnel</option> <option value="1"<%=(tunnelDepth == 1 ? " selected=\"selected\"" : "") %>>1 hop tunnel (medium anonymity, medium latency)</option>
<% } %> <option value="2"<%=(tunnelDepth == 2 ? " selected=\"selected\"" : "") %>>2 hop tunnel (high anonymity, high latency)</option>
</select> <% if (tunnelDepth > 2) {
</td> %> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> hop tunnel</option>
</tr> <% }
<tr> %></select>
<td><b>Tunnel count:</b> </div>
</td> <div id="varianceField" class="rowItem">
<td> <label for="tunnelVariance" accesskey="v">
<select name="tunnelCount"> <span class="accessKey">V</span>ariance:
<% int tunnelCount = editBean.getTunnelCount(curTunnel, 2); </label>
switch (tunnelCount) { <select id="tunnelVariance" name="tunnelVariance" title="Level of Randomization for Tunnel Depth" class="selectbox">
case 1: %> <% int tunnelVariance = editBean.getTunnelVariance(curTunnel, -1);
<option value="1" selected="true" >1 inbound tunnel (low bandwidth usage, less reliability)</option> %><option value="0"<%=(tunnelVariance == 0 ? " selected=\"selected\"" : "") %>>0 hop variance (no randomisation, consistant performance)</option>
<option value="2" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option> <option value="-1"<%=(tunnelVariance == -1 ? " selected=\"selected\"" : "") %>>+/- 0-1 hop variance (standard randomisation, standard performance)</option>
<option value="3" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option> <option value="-2"<%=(tunnelVariance == -2 ? " selected=\"selected\"" : "") %>>+/- 0-2 hop variance (high randomisation, variable performance)</option>
<% break; <option value="1"<%=(tunnelVariance == 1 ? " selected=\"selected\"" : "") %>>+ 0-1 hop variance (medium additive randomisation, subtractive performance)</option>
case 2: %> <option value="2"<%=(tunnelVariance == 2 ? " selected=\"selected\"" : "") %>>+ 0-2 hop variance (high additive randomisation, subtractive performance)</option>
<option value="1" >1 inbound tunnel (low bandwidth usage, less reliability)</option> <% if (tunnelVariance > 2 || tunnelVariance < -2) {
<option value="2" selected="true" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option> %> <option value="<%=tunnelVariance%>" selected="selected"><%= (tunnelVariance > 2 ? "+ " : "+/- ") %>0-<%=tunnelVariance%> hop variance</option>
<option value="3" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option> <% }
<% break; %></select>
case 3: %> </div>
<option value="1" >1 inbound tunnel (low bandwidth usage, less reliability)</option> <div id="countField" class="rowItem">
<option value="2" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option> <label for="tunnelQuantity" accesskey="C">
<option value="3" selected="true" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option> <span class="accessKey">C</span>ount:
<% break; </label>
default: %> <select id="tunnelQuantity" name="tunnelQuantity" title="Number of Tunnels in Group" class="selectbox">
<option value="1" >1 inbound tunnel (low bandwidth usage, less reliability)</option> <% int tunnelQuantity = editBean.getTunnelQuantity(curTunnel, 2);
<option value="2" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option> %><option value="1"<%=(tunnelQuantity == 1 ? " selected=\"selected\"" : "") %>>1 inbound tunnel (low bandwidth usage, less reliability)</option>
<option value="3" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option> <option value="2"<%=(tunnelQuantity == 2 ? " selected=\"selected\"" : "") %>>2 inbound tunnels (standard bandwidth usage, standard reliability)</option>
<option value="<%=tunnelDepth%>" ><%=tunnelDepth%> inbound tunnels</option> <option value="3"<%=(tunnelQuantity == 3 ? " selected=\"selected\"" : "") %>>3 inbound tunnels (higher bandwidth usage, higher reliability)</option>
<% } %> <% if (tunnelQuantity > 3) {
</select> %> <option value="<%=tunnelQuantity%>" selected="selected"><%=tunnelQuantity%> inbound tunnels</option>
</td> <% }
<tr> %></select>
<td><b>I2CP host:</b> </div>
</td> <div id="backupField" class="rowItem">
<td> <label for="tunnelBackupQuantity" accesskey="b">
<input type="text" name="clientHost" size="20" value="<%=editBean.getI2CPHost(curTunnel)%>" /> <span class="accessKey">B</span>ackup Count:
</td> </label>
</tr> <select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="Number of Reserve Tunnels" class="selectbox">
<tr> <% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0);
<td><b>I2CP port:</b> %><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>>0 backup tunnels (0 redundancy, no added resource usage)</option>
</td> <option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>>1 backup tunnel (low redundancy, low resource usage)</option>
<td> <option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>>2 backup tunnels (medium redundancy, medium resource usage)</option>
<input type="text" name="clientPort" size="20" value="<%=editBean.getI2CPPort(curTunnel)%>" /><br /> <option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>>3 backup tunnels (high redundancy, high resource usage)</option>
</td> <% if (tunnelBackupQuantity > 3) {
</tr> %> <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> backup tunnels</option>
<tr> <% }
<td><b>Custom options:</b> %></select>
</td> </div>
<td>
<input type="text" name="customOptions" size="60" value="<%=editBean.getCustomOptions(curTunnel)%>" /> <div class="subdivider">
</td> <hr />
</tr> </div>
<tr>
<td colspan="2"> <div id="optionsField" class="rowItem">
<hr size="1"> <label>I2CP Options:</label>
</td> </div>
</tr> <div id="optionsHostField" class="rowItem">
<tr> <label for="clientHost" accesskey="o">
<td> H<span class="accessKey">o</span>st:
<b>Save:</b> </label>
</td> <input type="text" id="clientHost" name="clientHost" size="20" title="I2CP Hostname or IP" value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext" />
<td> </div>
<input type="submit" name="action" value="Save changes" /> <div id="optionsPortField" class="rowItem">
</td> <label for="clientPort" accesskey="r">
</tr> Po<span class="accessKey">r</span>t:
<tr> </label>
<td><b>Delete?</b> <input type="text" id="clientPort" name="clientPort" size="20" title="I2CP Port Number" value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext" />
</td> </div>
<td>
<input type="submit" name="action" value="Delete this proxy" /> &nbsp;&nbsp; <div class="subdivider">
<b><span style="color:#dd0000;">confirm delete:</span></b> <hr />
<input type="checkbox" value="true" name="removeConfirm" /> </div>
</td>
</tr> <div id="customOptionsField" class="rowItem">
</table> <label for="customOptions" accesskey="u">
</td> C<span class="accessKey">u</span>stom options:
</tr> </label>
</table> <input type="text" id="customOptions" name="customOptions" size="60" title="Custom Options" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" />
</form> </div>
<div class="footer">
</div>
</div>
<div id="globalOperationsPanel" class="panel">
<div class="header"></div>
<div class="footer">
<div class="toolbox">
<input type="hidden" value="true" name="removeConfirm" />
<button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Save changes" title="Save Changes"><span class="accessKey">S</span>ave</button><button id="controlDelete" <%=(editBean.allowJS() ? "onclick=\"if (!confirm('Are you sure you want to delete?')) { return false; }\" " : "")%>accesskey="D" class="control" type="submit" name="action" value="Delete this proxy" title="Delete this Proxy"><span class="accessKey">D</span>elete</button>
</div>
</div>
</div>
</form>
<div id="pageFooter">
</div>
</body> </body>
</html> </html>

View File

@ -1,185 +1,258 @@
<%@page contentType="text/html" import="net.i2p.i2ptunnel.web.IndexBean" %> <%@page contentType="text/html" import="net.i2p.i2ptunnel.web.IndexBean"%><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<jsp:useBean class="net.i2p.i2ptunnel.web.IndexBean" id="indexBean" scope="request" /> <jsp:useBean class="net.i2p.i2ptunnel.web.IndexBean" id="indexBean" scope="request" />
<jsp:setProperty name="indexBean" property="*" /> <jsp:setProperty name="indexBean" property="*" />
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html>
<head> <head>
<title>I2PTunnel Webmanager</title> <title>I2PTunnel Webmanager - List</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<% if (indexBean.allowCSS()) {
%><link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<link href="<%=indexBean.getTheme()%>default.css" rel="stylesheet" type="text/css" />
<link href="<%=indexBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" />
<% }
%>
</head> </head>
<body style="font-family: Verdana, Tahoma, Helvetica, sans-serif;font-size:12px;"> <body id="tunnelListPage">
<table width="90%" align="center" border="0" cellpadding="1" cellspacing="1"> <div id="pageHeader">
<tr> </div>
<td style="background-color:#000">
<div style="background-color:#ffffed"> <div id="statusMessagePanel" class="panel">
<table width="100%" align="center" border="0" cellpadding="4" cellspacing="1"> <div class="header">
<tr> <h4>Status Messages</h4>
<td nowrap="true"><b>New Messages: </b><br /> </div>
<a href="index.jsp">refresh</a>
</td>
<td>
<textarea rows="3" cols="60" readonly="true"><jsp:getProperty name="indexBean" property="messages" /></textarea>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<table width="90%" align="center" border="0" cellpadding="1" cellspacing="1">
<tr>
<td style="background-color:#000">
<div style="background-color:#ffffed">
<table width="100%" align="center" border="0" cellpadding="4" cellspacing="1"> <div class="separator">
<tr> <hr />
<td colspan="7" align="center" valign="middle" style="font-size:14px;"> </div>
<b>Your Client Tunnels:</b><br />
<hr size="1" />
</td>
</tr>
<tr>
<td width="15%"><b>Name:</b></td>
<td><b>Port:</b></td>
<td><b>Type:</b></td>
<td><b>Interface:</b></td>
<td><b>Status:</b></td>
</tr>
<% for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) {
if (!indexBean.isClient(curClient)) continue; %>
<tr>
<td valign="top" align="left">
<b><a href="edit.jsp?tunnel=<%=curClient%>"><%=indexBean.getTunnelName(curClient) %></a></b></td>
<td valign="top" align="left" nowrap="true"><%=indexBean.getClientPort(curClient) %></td>
<td valign="top" align="left" nowrap="true"><%=indexBean.getTunnelType(curClient) %></td>
<td valign="top" align="left" nowrap="true"><%=indexBean.getClientInterface(curClient) %></td>
<td valign="top" align="left" nowrap="true"><%
switch (indexBean.getTunnelStatus(curClient)) {
case IndexBean.STARTING:
%><b><span style="color:#339933">Starting...</span></b>
<a href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>">[STOP]</a><%
break;
case IndexBean.RUNNING:
%><b><span style="color:#00dd00">Running</span></b>
<a href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>">[STOP]</a><%
break;
case IndexBean.NOT_RUNNING:
%><b><span style="color:#dd0000">Not Running</span></b>
<a href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=start&tunnel=<%=curClient%>">[START]</a><%
break;
}
%></td>
</tr>
<tr><td align="right" valign="top">Destination:</td>
<td colspan="4"><input align="left" size="40" valign="top" style="overflow: hidden" readonly="true" value="<%=indexBean.getClientDestination(curClient) %>" /></td></tr>
<tr>
<td valign="top" align="right">Description:</td>
<td valign="top" align="left" colspan="4"><%=indexBean.getTunnelDescription(curClient) %></td>
</tr>
<% } %>
</table>
</td>
</tr>
</table>
<br />
<table width="90%" align="center" border="0" cellpadding="1" cellspacing="1"> <textarea id="statusMessages" rows="3" cols="60" readonly="readonly"><jsp:getProperty name="indexBean" property="messages" /></textarea>
<tr>
<td style="background-color:#000">
<div style="background-color:#ffffed">
<table width="100%" align="center" border="0" cellpadding="4" cellspacing="1">
<tr>
<td colspan="5" align="center" valign="middle" style="font-size:14px;">
<b>Your Server Tunnels:</b><br />
<hr size="1" />
</td>
</tr>
<tr>
<td width="15%"><b>Name: </b>
</td>
<td>
<b>Points at:</b>
</td>
<td>
<b>Status:</b>
</td>
</tr>
<% for (int curServer = 0; curServer < indexBean.getTunnelCount(); curServer++) { <div class="separator">
if (indexBean.isClient(curServer)) continue; %> <hr />
</div>
<tr> <div class="footer">
<td valign="top"> <div class="toolbox">
<b><a href="edit.jsp?tunnel=<%=curServer%>"><%=indexBean.getTunnelName(curServer)%></a></b> <a class="control" href="index.jsp">Refresh</a>
</td> </div>
<td valign="top"><%=indexBean.getServerTarget(curServer)%></td> </div>
<td valign="top" nowrap="true"><% </div>
switch (indexBean.getTunnelStatus(curServer)) {
case IndexBean.RUNNING:
%><b><span style="color:#00dd00">Running</span></b>
<a href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curServer%>">[STOP]</a><%
if ("httpserver".equals(indexBean.getInternalType(curServer))) {
%> (<a href="http://<%=(new java.util.Random()).nextLong()%>.i2p/?i2paddresshelper=<%=indexBean.getDestinationBase64(curServer)%>">preview</a>)<%
}
break;
case IndexBean.NOT_RUNNING:
%><b><span style="color:#dd0000">Not Running</span></b>
<a href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=start&tunnel=<%=curServer%>">[START]</a><%
break;
case IndexBean.STARTING:
%>
<b><span style="color:#339933">Starting...</span></b>
<a href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curServer%>">[STOP]</a><%
break;
}
%>
</td>
</tr>
<tr><td valign="top" align="right">Description:</td>
<td valign="top" align="left" colspan="2"><%=indexBean.getTunnelDescription(curServer)%></td></tr>
<% } %>
</table> <div id="localClientTunnelList" class="panel">
</td> <div class="header">
</tr> <h4>Local Client Tunnels</h4>
</table> </div>
<br />
<table width="90%" align="center" border="0" cellpadding="1" cellspacing="1"> <div class="separator">
<tr> <hr />
<td style="background-color:#000"> </div>
<div style="background-color:#ffffed">
<table width="100%" align="center" border="0" cellpadding="4" cellspacing="1"> <div class="nameHeaderField rowItem">
<tr> <label>Name:</label>
<td colspan="2" align="center" valign="middle"> </div>
<b>Operations Menu - Please chose from below!</b><br /><br /> <div class="portHeaderField rowItem">
</td> <label>Port:</label>
</tr> </div>
<tr> <div class="typeHeaderField rowItem">
<form action="index.jsp" method="GET"> <label>Type:</label>
<td > </div>
<input type="hidden" name="nonce" value="<%=indexBean.getNextNonce()%>" /> <div class="interfaceHeaderField rowItem">
<input type="submit" name="action" value="Stop all tunnels" /> <label>Interface:</label>
<input type="submit" name="action" value="Start all tunnels" /> </div>
<input type="submit" name="action" value="Restart all" /> <div class="statusHeaderField rowItem">
<input type="submit" name="action" value="Reload config" /> <label>Status:</label>
</td> </div>
</form>
<form action="edit.jsp"> <div class="separator">
<td > <hr />
<b>Add new:</b> </div>
<select name="type"> <%
<option value="httpclient">HTTP proxy</option> for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) {
<option value="ircclient">IRC proxy</option> if (!indexBean.isClient(curClient)) continue;
<option value="client">Client tunnel</option> %>
<option value="server">Server tunnel</option> <div class="nameField rowItem">
<option value="httpserver">HTTP server tunnel</option> <label>Name:</label>
</select> <input type="submit" value="Create" /> <span class="text"><a href="edit.jsp?tunnel=<%=curClient%>" title="Edit Tunnel Settings for <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a></span>
</td> </div>
</form> <div class="portField rowItem">
</tr> <label>Port:</label>
</table> <span class="text"><%=indexBean.getClientPort(curClient)%></span>
</td> </div>
</tr> <div class="typeField rowItem">
</table> <label>Type:</label>
<span class="text"><%=indexBean.getTunnelType(curClient)%></span>
</div>
<div class="interfaceField rowItem">
<label>Interface:</label>
<span class="text"><%=indexBean.getClientInterface(curClient)%></span>
</div>
<div class="statusField rowItem">
<label>Status:</label>
<%
switch (indexBean.getTunnelStatus(curClient)) {
case IndexBean.STARTING:
%><div class="statusStarting text">Starting...</div>
<a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curClient%>">Stop</a>
<%
break;
case IndexBean.RUNNING:
%><div class="statusRunning text">Running</div>
<a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curClient%>">Stop</a>
<%
break;
case IndexBean.NOT_RUNNING:
%><div class="statusNotRunning text">Stopped</div>
<a class="control" title="Start this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=start&amp;tunnel=<%=curClient%>">Start</a>
<%
break;
}
%></div>
<div class="destinationField rowItem">
<label>Destination:</label>
<input class="freetext" size="40" readonly="readonly" value="<%=indexBean.getClientDestination(curClient)%>" />
</div>
<div class="descriptionField rowItem">
<label>Description:</label>
<div class="text"><%=indexBean.getTunnelDescription(curClient)%></div>
</div>
<div class="subdivider">
<hr />
</div>
<%
}
%>
<div class="separator">
<hr />
</div>
<div class="footer">
<form id="addNewClientTunnelForm" action="edit.jsp">
<div class="toolbox">
<label>Add new client tunnel:</label>
<select name="type">
<option value="client">Standard</option>
<option value="httpclient">HTTP</option>
</select>
<input class="control" type="submit" value="Create" />
</div>
</form>
</div>
</div>
<div id="localServerTunnelList" class="panel">
<div class="header">
<h4>Local Server Tunnels</h4>
</div>
<div class="separator">
<hr />
</div>
<div class="nameHeaderField rowItem">
<label>Name:</label>
</div>
<div class="targetHeaderField rowItem">
<label>Points at:</label>
</div>
<div class="previewHeaderField rowItem">
<label>Preview:</label>
</div>
<div class="statusHeaderField rowItem">
<label>Status:</label>
</div>
<%
for (int curServer = 0; curServer < indexBean.getTunnelCount(); curServer++) {
if (indexBean.isClient(curServer)) continue;
%>
<div class="nameField rowItem">
<label>Name:</label>
<span class="text"><a href="edit.jsp?tunnel=<%=curServer%>" title="Edit Server Tunnel Settings for <%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%></a></span>
</div>
<div class="targetField rowItem">
<label>Points at:</label>
<span class="text"><%=indexBean.getServerTarget(curServer)%></span>
</div>
<div class="previewField rowItem">
<%
if ("httpserver".equals(indexBean.getInternalType(curServer)) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) {
%><label>Preview:</label>
<a class="control" title="Preview this Tunnel" href="http://<%=(new java.util.Random()).nextLong()%>.i2p/?i2paddresshelper=<%=indexBean.getDestinationBase64(curServer)%>" target="_new">Preview</a>
<%
} else {
%><span class="comment">No Preview</span>
<%
}
%></div>
<div class="statusField rowItem">
<label>Status:</label>
<%
switch (indexBean.getTunnelStatus(curServer)) {
case IndexBean.STARTING:
%><div class="statusStarting text">Starting...</div>
<a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curServer%>">Stop</a>
<%
break;
case IndexBean.RUNNING:
%><div class="statusRunning text">Running</div>
<a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curServer%>">Stop</a>
<%
break;
case IndexBean.NOT_RUNNING:
%><div class="statusNotRunning text">Stopped</div>
<a class="control" title="Start this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=start&amp;tunnel=<%=curServer%>">Start</a>
<%
break;
}
%></div>
<div class="descriptionField rowItem">
<label>Description:</label>
<div class="text"><%=indexBean.getTunnelDescription(curServer)%></div>
</div>
<div class="subdivider">
<hr />
</div>
<%
}
%>
<div class="separator">
<hr />
</div>
<div class="footer">
<form id="addNewServerTunnelForm" action="edit.jsp">
<div class="toolbox">
<label>Add new server tunnel:</label>
<select name="type">
<option value="server">Standard</option>
<option value="httpserver">HTTP</option>
</select>
<input class="control" type="submit" value="Create" />
</div>
</form>
</div>
</div>
<div id="globalOperationsPanel" class="panel">
<div class="header"></div>
<div class="footer">
<div class="toolbox">
<a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=Stop%20all">Stop All</a><a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=Start%20all">Start All</a><a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=Restart%20all">Restart All</a><a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=Reload%20configuration">Reload Config</a>
</div>
</div>
</div>
<div id="pageFooter">
</div>
</body> </body>
</html> </html>

View File

@ -1,4 +1,25 @@
$Id: history.txt,v 1.317 2005/11/10 22:46:36 jrandom Exp $ $Id: history.txt,v 1.318 2005/11/11 06:29:16 jrandom Exp $
2005-11-11 cervantes
* Initial pass of the routerconsole revamp, starting with I2PTunnel and
being progressively rolled out to other sections at later dates.
Featuring abstracted W3C strict XHTML1.0 markup, with CSS providing
layout and styling.
* Implemented console themes. Users can create their own themes by
creating css files in: {i2pdir}/docs/themes/console/{themename}/
and activating it using the routerconsole.theme={themename} advanced
config property. Look at the example incomplete "defCon1" theme.
Note: This is very much a work in progress. Folks might want to hold-off
creating their own skins until the markup has solidified.
* Added "routerconsole.javascript.disabled=true" to disable console
client-side scripting and "routerconsole.css.disabled=true" to remove
css styling (only rolled out in the i2ptunnel interface currently)
* Fixed long standing bug with i2ptunnel client and server edit screens
where tunnel count and depth properties would fail to save. Added
backup quantity and variance configuration options.
* Added basic accessibility support (key shortcuts, linear markup, alt and
title information and form labels).
* So far only tested on IE6, Firefox 1.0.6, Opera 8 and lynx.
2005-11-11 jrandom 2005-11-11 jrandom
* Default Syndie to single user mode, and automatically log into a default * Default Syndie to single user mode, and automatically log into a default

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
* *
*/ */
public class RouterVersion { public class RouterVersion {
public final static String ID = "$Revision: 1.285 $ $Date: 2005/11/06 17:25:18 $"; public final static String ID = "$Revision: 1.286 $ $Date: 2005/11/10 22:46:36 $";
public final static String VERSION = "0.6.1.4"; public final static String VERSION = "0.6.1.4";
public final static long BUILD = 6; public final static long BUILD = 7;
public static void main(String args[]) { public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID); System.out.println("Router ID: " + RouterVersion.ID);