diff --git a/apps/i2ptunnel/jsp/index.jsp b/apps/i2ptunnel/jsp/index.jsp index 8f506c8d0d70ced491f2efcbf97cc79930e9947a..dd3bde8f1b8b6df2a02b36dd9060dea90b233a5a 100644 --- a/apps/i2ptunnel/jsp/index.jsp +++ b/apps/i2ptunnel/jsp/index.jsp @@ -1,291 +1,296 @@ -<%@page contentType="text/html" import="net.i2p.i2ptunnel.web.IndexBean"%><?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.IndexBean" id="indexBean" scope="request" /> -<jsp:setProperty name="indexBean" property="*" /> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>I2PTunnel Webmanager - List</title> - - <meta htt -p-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="/themes/console/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> -<body id="tunnelListPage"> - <div id="pageHeader"> - </div> - - <div id="statusMessagePanel" class="panel"> - <div class="header"> - <h4>Status Messages</h4> - </div> - - <div class="separator"> - <hr /> - </div> - - <textarea id="statusMessages" rows="3" cols="60" readonly="readonly"><jsp:getProperty name="indexBean" property="messages" /></textarea> - - <div class="separator"> - <hr /> - </div> - - <div class="footer"> - <div class="toolbox"> - <a class="control" href="index.jsp">Refresh</a> - </div> - </div> - </div> - - <div id="localClientTunnelList" class="panel"> - <div class="header"> - <h4>Local Client Tunnels</h4> - </div> - - <div class="separator"> - <hr /> - </div> - - <div class="nameHeaderField rowItem"> - <label>Name:</label> - </div> - <div class="portHeaderField rowItem"> - <label>Port:</label> - </div> - <div class="typeHeaderField rowItem"> - <label>Type:</label> - </div> - <div class="interfaceHeaderField rowItem"> - <label>Interface:</label> - </div> - <div class="statusHeaderField rowItem"> - <label>Status:</label> - </div> - - <div class="separator"> - <hr /> - </div> - <% - for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) { - if (!indexBean.isClient(curClient)) continue; - %> - <div class="nameField rowItem"> - <label>Name:</label> - <span class="text"><a href="edit.jsp?tunnel=<%=curClient%>" title="Edit Tunnel Settings for <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%> (Edit)</a></span> - </div> - <div class="portField rowItem"> - <label>Port:</label> - <span class="text"><%=indexBean.getClientPort(curClient)%></span> - </div> - <div class="typeField rowItem"> - <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()%>&action=stop&tunnel=<%=curClient%>">Stop</a> - <% - break; - case IndexBean.STANDBY: - %><div class="statusStarting text">Standby</div> - <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&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()%>&action=stop&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()%>&action=start&tunnel=<%=curClient%>">Start</a> - <% - break; - } - %></div> - - <% if (!"sockstunnel".equals(indexBean.getInternalType(curClient))) { %> - <div class="destinationField rowItem"> - <label> - <% if ("httpclient".equals(indexBean.getInternalType(curClient)) || "connectclient".equals(indexBean.getInternalType(curClient))) { %> - Outproxy: - <% } else { %> - 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> - <option value="ircclient">IRC</option> - <option value="sockstunnel">SOCKS 4/4a/5</option> - <option value="connectclient">CONNECT</option> - <option value="streamrclient">Streamr</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="previewHeaderField rowItem"> - <label>Points at:</label> - </div> - <div class="targetHeaderField 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)%> (Edit)</a></span> - </div> - <div class="previewField rowItem"> - <label>Points at:</label> - <span class="text"> - <% - if ("httpserver".equals(indexBean.getInternalType(curServer))) { - %> - <a href="http://<%=indexBean.getServerTarget(curServer)%>/" title="Test HTTP server, bypassing I2P"><%=indexBean.getServerTarget(curServer)%></a> - <% - } else { - %><%=indexBean.getServerTarget(curServer)%> - <% - } - %></span> - </div> - <div class="targetField rowItem"> - <% - if ("httpserver".equals(indexBean.getInternalType(curServer)) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { - %><label>Preview:</label> - <a class="control" title="Test HTTP server through I2P" href="http://<%=indexBean.getDestHashBase32(curServer)%>.b32.i2p">Preview</a> - <% - } else if (indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { - %><span class="text">Base32 Address:<br><%=indexBean.getDestHashBase32(curServer)%>.b32.i2p</span> - <% - } 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()%>&action=stop&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()%>&action=stop&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()%>&action=start&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> - <option value="ircserver">IRC</option> - <option value="streamrserver">Streamr</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()%>&action=Stop%20all">Stop All</a><a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Start%20all">Start All</a><a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Restart%20all">Restart All</a><a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Reload%20configuration">Reload Config</a> - </div> - </div> - </div> - - <div id="pageFooter"> - </div> -</body> -</html> +<%@page contentType="text/html" import="net.i2p.i2ptunnel.web.IndexBean"%><?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.IndexBean" id="indexBean" scope="request" /> +<jsp:setProperty name="indexBean" property="*" /> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>I2PTunnel Webmanager - List</title> + + <meta htt +p-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="/themes/console/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> +<body id="tunnelListPage"> + <div id="pageHeader"> + </div> + + <div id="statusMessagePanel" class="panel"> + <div class="header"> + <h4>Status Messages</h4> + </div> + + <div class="separator"> + <hr /> + </div> + + <textarea id="statusMessages" rows="4" cols="60" readonly="readonly"><jsp:getProperty name="indexBean" property="messages" /></textarea> + + <div class="separator"> + <hr /> + </div> + + <div class="footer"> + <div class="toolbox"> + <a class="control" href="index.jsp">Refresh</a> + </div> + </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()%>&action=Stop%20all">Stop All</a> <a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Start%20all">Start All</a> <a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Restart%20all">Restart All</a> <a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Reload%20configuration">Reload Config</a> + </div> + </div> + </div> + + + + <div id="localServerTunnelList" class="panel"> + <div class="header"> + + <h4>I2P Server Tunnels</h4> + </div> + + + <div class="separator"> </div> + + <div class="nameHeaderField rowItem"> + <label>Name:</label> + </div> + <div class="previewHeaderField rowItem"> + <label>Points at:</label> + </div> + <div class="targetHeaderField 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="previewField rowItem"> + <label>Points at:</label> + <span class="text"> + <% + if ("httpserver".equals(indexBean.getInternalType(curServer))) { + %> + <a href="http://<%=indexBean.getServerTarget(curServer)%>/" title="Test HTTP server, bypassing I2P"><%=indexBean.getServerTarget(curServer)%></a> + <% + } else { + %><%=indexBean.getServerTarget(curServer)%> + <% + } + %></span> + </div> + <div class="targetField rowItem"> + <% + if ("httpserver".equals(indexBean.getInternalType(curServer)) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { + %><label>Preview:</label> + <a class="control" title="Test HTTP server through I2P" href="http://<%=indexBean.getDestHashBase32(curServer)%>.b32.i2p">Preview</a> + <% + } else if (indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { + %><span class="text">Base32 Address:<br><%=indexBean.getDestHashBase32(curServer)%>.b32.i2p</span> + <% + } else { + %><span class="comment">No Preview</span> + <% + } + %></div> + <div class="statusField rowItem"> + <label>Status:</label> + <% + switch (indexBean.getTunnelStatus(curServer)) { + case IndexBean.STARTING: + %><div class="separator"></div> + <div class="statusStarting text">Starting...</div> + <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&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()%>&action=stop&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()%>&action=start&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>New server tunnel:</label> + <select name="type"> + <option value="server">Standard</option> + <option value="httpserver">HTTP</option> + <option value="ircserver">IRC</option> + <option value="streamrserver">Streamr</option> + </select> + <input class="control" type="submit" value="Create" /> + </div> + </form> + </div> + </div> + + + <div id="localClientTunnelList" class="panel"> + <div class="header"> + + <h4>I2P Client Tunnels</h4> + </div> + + + <div class="separator"> </div> + + <div class="nameHeaderField rowItem"> + <label>Name:</label> + </div> + <div class="portHeaderField rowItem"> + <label>Port:</label> + </div> + <div class="typeHeaderField rowItem"> + <label>Type:</label> + </div> + <div class="interfaceHeaderField rowItem"> + <label>Interface:</label> + </div> + <div class="statusHeaderField rowItem"> + <label>Status:</label> + </div> + + <div class="separator"> + </div> + <% + for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) { + if (!indexBean.isClient(curClient)) continue; + %> + <div class="nameField rowItem"> + <label>Name:</label> + <span class="text"><a href="edit.jsp?tunnel=<%=curClient%>" title="Edit Tunnel Settings for <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a></span> + </div> + <div class="portField rowItem"> + <label>Port:</label> + <span class="text"><%=indexBean.getClientPort(curClient)%></span> + </div> + <div class="typeField rowItem"> + <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> <div class="separator></div> + <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>">Stop</a> + <% + break; + case IndexBean.STANDBY: + %><div class="statusStarting text">Standby</div> + <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&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()%>&action=stop&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()%>&action=start&tunnel=<%=curClient%>">Start</a> + <% + break; + } + %></div> + + <% if (!"sockstunnel".equals(indexBean.getInternalType(curClient))) { %> + <div class="destinationField rowItem"> + <label> + <% if ("httpclient".equals(indexBean.getInternalType(curClient)) || "connectclient".equals(indexBean.getInternalType(curClient))) { %> + Outproxy: + <% } else { %> + 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>New client tunnel:</label> + <select name="type"> + <option value="client">Standard</option> + <option value="httpclient">HTTP</option> + <option value="ircclient">IRC</option> + <option value="sockstunnel">SOCKS 4/4a/5</option> + <option value="connectclient">CONNECT</option> + <option value="streamrclient">Streamr</option> + </select> + <input class="control" type="submit" value="Create" /> + </div> + </form> + </div> + </div> + <div id="pageFooter"> + </div> + </div> +</body> +</html> diff --git a/apps/routerconsole/jsp/configadvanced.jsp b/apps/routerconsole/jsp/configadvanced.jsp index 96750c46576ff9cba02066624c1cf9eefb376051..ab177676c1e93091b22b02b04994c7881fb87d0e 100644 --- a/apps/routerconsole/jsp/configadvanced.jsp +++ b/apps/routerconsole/jsp/configadvanced.jsp @@ -1,41 +1,44 @@ -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html><head> -<title>I2P Router Console - config advanced</title> -<%@include file="css.jsp" %> -</head><body> - -<%@include file="nav.jsp" %> -<%@include file="summary.jsp" %> - -<jsp:useBean class="net.i2p.router.web.ConfigAdvancedHelper" id="advancedhelper" scope="request" /> -<jsp:setProperty name="advancedhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - -<h1>I2P Advanced Configuration</h1> -<div class="main" id="main"> - - <%@include file="confignav.jsp" %> - - <jsp:useBean class="net.i2p.router.web.ConfigAdvancedHandler" id="formhandler" scope="request" /> - <jsp:setProperty name="formhandler" property="*" /> - <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:getProperty name="formhandler" property="allMessages" /> - - <form action="configadvanced.jsp" method="POST"> - <% String prev = System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce"); - if (prev != null) System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.noncePrev", prev); - System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce", new java.util.Random().nextLong()+""); %> - <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce")%>" /> - <input type="hidden" name="action" value="blah" /> - <textarea rows="32" cols="100" name="config" wrap="off"><jsp:getProperty name="advancedhelper" property="settings" /></textarea><br /> -<p> - <input type="submit" name="shouldsave" value="Apply" /> <input type="reset" value="Cancel" /> -</p><p> - NOTE: Some changes may require a restart to take effect. -</p> - </form> -</div> -</body> -</html> +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html><head> +<title>I2P Router Console - config advanced</title> +<%@include file="css.jsp" %> +</head><body> + +<%@include file="nav.jsp" %> +<%@include file="summary.jsp" %> + +<jsp:useBean class="net.i2p.router.web.ConfigAdvancedHelper" id="advancedhelper" scope="request" /> +<jsp:setProperty name="advancedhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + +<h1>I2P Advanced Configuration</h1> +<div class="main" id="main"> + + <%@include file="confignav.jsp" %> + + <jsp:useBean class="net.i2p.router.web.ConfigAdvancedHandler" id="formhandler" scope="request" /> + <jsp:setProperty name="formhandler" property="*" /> + <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:getProperty name="formhandler" property="allMessages" /> + <div class="configure"> + <form action="configadvanced.jsp" method="POST"> + <% String prev = System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce"); + if (prev != null) System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.noncePrev", prev); + System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce", new java.util.Random().nextLong()+""); %> + <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce")%>" /> + <input type="hidden" name="action" value="blah" /> + <textarea rows="32" cols="100" name="config" wrap="off"><jsp:getProperty name="advancedhelper" property="settings" /></textarea><br /><hr> + <p align="right"> + <input type="submit" name="shouldsave" value="Apply" /> + <input type="reset" value="Cancel" /> + </p> + <p> + NOTE: Some changes may require a restart to take effect. +</p> + </form> +</div> +</div> +</body> +</html> diff --git a/apps/routerconsole/jsp/configclients.jsp b/apps/routerconsole/jsp/configclients.jsp index 9a06aa4d20007a9d12dd77cf902540772750cd9b..9634908d424dde69c84103fc5887fc4ff0793069 100644 --- a/apps/routerconsole/jsp/configclients.jsp +++ b/apps/routerconsole/jsp/configclients.jsp @@ -1,69 +1,69 @@ -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html><head> -<title>I2P Router Console - config clients</title> -<%@include file="css.jsp" %> -<style type='text/css'> -button span.hide{ - display:none; -} -</style> -</head><body> - -<%@include file="nav.jsp" %> -<%@include file="summary.jsp" %> - -<jsp:useBean class="net.i2p.router.web.ConfigClientsHelper" id="clientshelper" scope="request" /> -<jsp:setProperty name="clientshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> -<h1>I2P Client Configuration</h1> -<div class="main" id="main"> - <%@include file="confignav.jsp" %> - - <jsp:useBean class="net.i2p.router.web.ConfigClientsHandler" id="formhandler" scope="request" /> - <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:setProperty name="formhandler" property="action" value="<%=request.getParameter("action")%>" /> - <jsp:setProperty name="formhandler" property="nonce" value="<%=request.getParameter("nonce")%>" /> - <jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" /> - <jsp:getProperty name="formhandler" property="allMessages" /> - - <form action="configclients.jsp" method="POST"> - <% String prev = System.getProperty("net.i2p.router.web.ConfigClientsHandler.nonce"); - if (prev != null) System.setProperty("net.i2p.router.web.ConfigClientsHandler.noncePrev", prev); - System.setProperty("net.i2p.router.web.ConfigClientsHandler.nonce", new java.util.Random().nextLong()+""); %> - <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigClientsHandler.nonce")%>" /> - <h3>Client Configuration</h3> - <p> - The Java clients listed below are started by the router and run in the same JVM. - </p><p> - <jsp:getProperty name="clientshelper" property="form1" /> - </p><p> - <i>All changes require restart to take effect. To change other client options, edit the clients.config file.</i> - </p> <hr /><p> - <input type="submit" name="action" value="Save Client Configuration" /> - </p> -<hr /> - <h3>WebApp Configuration</h3> - <p> - The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. - They are usually web applications accessible through the router console. - They may be complete applications (e.g. i2psnark), - front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), - or have no web interface at all (e.g. addressbook). - </p><p> - A web app may also be disabled by removing the .war file from the webapps directory; - however the .war file and web app will reappear when you update your router to a newer version, - so disabling the web app here is the preferred method. - </p><p> - <jsp:getProperty name="clientshelper" property="form2" /> - </p><p> - <input type="submit" name="action" value="Save WebApp Configuration" /> - </p><p> - <i>All changes require restart to take effect. To change other webapp options, edit the webapps.config file.</i> - </p> - </form> -</div> - -</body> -</html> +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html><head> +<title>I2P Router Console - config clients</title> +<%@include file="css.jsp" %> +<style type='text/css'> +button span.hide{ + display:none; +} +</style> +</head><body> + +<%@include file="nav.jsp" %> +<%@include file="summary.jsp" %> + +<jsp:useBean class="net.i2p.router.web.ConfigClientsHelper" id="clientshelper" scope="request" /> +<jsp:setProperty name="clientshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> +<h1>I2P Client Configuration</h1> +<div class="main" id="main"> + <%@include file="confignav.jsp" %> + + <jsp:useBean class="net.i2p.router.web.ConfigClientsHandler" id="formhandler" scope="request" /> + <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:setProperty name="formhandler" property="action" value="<%=request.getParameter("action")%>" /> + <jsp:setProperty name="formhandler" property="nonce" value="<%=request.getParameter("nonce")%>" /> + <jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" /> + <jsp:getProperty name="formhandler" property="allMessages" /> + <div class="configure"> + <form action="configclients.jsp" method="POST"> + <% String prev = System.getProperty("net.i2p.router.web.ConfigClientsHandler.nonce"); + if (prev != null) System.setProperty("net.i2p.router.web.ConfigClientsHandler.noncePrev", prev); + System.setProperty("net.i2p.router.web.ConfigClientsHandler.nonce", new java.util.Random().nextLong()+""); %> + <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigClientsHandler.nonce")%>" /> + <h3>Client Configuration</h3> + <p> + The Java clients listed below are started by the router and run in the same JVM. + </p><p> + <jsp:getProperty name="clientshelper" property="form1" /> + </p><p> + <i>All changes require restart to take effect. To change other client options, edit the clients.config file.</i> + </p> <hr /><p> + <input type="submit" name="action" value="Save Client Configuration" /> + </p> +<hr /> + <h3>WebApp Configuration</h3> + <p> + The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. + They are usually web applications accessible through the router console. + They may be complete applications (e.g. i2psnark), + front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), + or have no web interface at all (e.g. addressbook). + </p><p> + A web app may also be disabled by removing the .war file from the webapps directory; + however the .war file and web app will reappear when you update your router to a newer version, + so disabling the web app here is the preferred method. + </p><p> + <jsp:getProperty name="clientshelper" property="form2" /> + </p><p><hr> + <input type="submit" name="action" value="Save WebApp Configuration" /> + </p><hr><p> + <i>All changes require restart to take effect. To change other webapp options, edit the webapps.config file.</i> + </p> + </form> +</div> +</div> +</body> +</html> diff --git a/apps/routerconsole/jsp/configkeyring.jsp b/apps/routerconsole/jsp/configkeyring.jsp index 5f31e1b3b73708e93121ec0b4aa352f9a8399fd2..4dbc914cd6794cf709f048bcb9387247146c3347 100644 --- a/apps/routerconsole/jsp/configkeyring.jsp +++ b/apps/routerconsole/jsp/configkeyring.jsp @@ -1,57 +1,63 @@ -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html><head> -<title>I2P Router Console - config keyring</title> -<%@include file="css.jsp" %> -</head><body> - -<%@include file="nav.jsp" %> -<%@include file="summary.jsp" %> -<h1>I2P Keyring Configuration</h1> -<div class="main" id="main"> - <%@include file="confignav.jsp" %> - - <jsp:useBean class="net.i2p.router.web.ConfigKeyringHandler" id="formhandler" scope="request" /> - <jsp:setProperty name="formhandler" property="*" /> - <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:getProperty name="formhandler" property="allMessages" /> - - - - <jsp:useBean class="net.i2p.router.web.ConfigKeyringHelper" id="keyringhelper" scope="request" /> - <jsp:setProperty name="keyringhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - - <p> - <h2>Keyring</h2> - The router keyring is used to decrypt encrypted leaseSets. - The keyring may contain keys for local or remote encrypted destinations. - <p><jsp:getProperty name="keyringhelper" property="summary" /> - </p> - - <hr /> - - <form action="configkeyring.jsp" method="POST"> - <% String prev = System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce"); - if (prev != null) System.setProperty("net.i2p.router.web.ConfigKeyringHandler.noncePrev", prev); - System.setProperty("net.i2p.router.web.ConfigKeyringHandler.nonce", new java.util.Random().nextLong()+""); %> - <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce")%>" /> - <h2>Manual Keyring Addition</h2> - Enter keys for encrypted remote destinations here. - Keys for local destinations must be entered on the <a href="i2ptunnel/index.jsp">I2PTunnel page</a>. - <p> - <table> - <tr><td>Dest. name, hash, or full key: - <td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off"></textarea> - <tr><td align="right">Session Key: - <td><input type="text" size="55" name="key" /> - <tr><td><td><input type="submit" name="action" value="Add key" /> - </table> - </form> - - -</div> - -</body> -</html> +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html><head> +<title>I2P Router Console - config keyring</title> +<%@include file="css.jsp" %> +</head><body> + +<%@include file="nav.jsp" %> +<%@include file="summary.jsp" %> +<h1>I2P Keyring Configuration</h1> +<div class="main" id="main"> + <%@include file="confignav.jsp" %> + + <jsp:useBean class="net.i2p.router.web.ConfigKeyringHandler" id="formhandler" scope="request" /> + <jsp:setProperty name="formhandler" property="*" /> + <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:getProperty name="formhandler" property="allMessages" /> + + + + <jsp:useBean class="net.i2p.router.web.ConfigKeyringHelper" id="keyringhelper" scope="request" /> + <jsp:setProperty name="keyringhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> +<div class="configure"> + <p> + <h2>Keyring</h2> + The router keyring is used to decrypt encrypted leaseSets. + The keyring may contain keys for local or remote encrypted destinations. + <p><jsp:getProperty name="keyringhelper" property="summary" /> + </p> + + <hr /> + + <form action="configkeyring.jsp" method="POST"> + <% String prev = System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce"); + if (prev != null) System.setProperty("net.i2p.router.web.ConfigKeyringHandler.noncePrev", prev); + System.setProperty("net.i2p.router.web.ConfigKeyringHandler.nonce", new java.util.Random().nextLong()+""); %> + <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce")%>" /> + <h2>Manual Keyring Addition</h2> + Enter keys for encrypted remote destinations here. + Keys for local destinations must be entered on the <a href="i2ptunnel/index.jsp">I2PTunnel page</a>. + <p> + <table> + <tr> + <td>Dest. name, hash, or full key: + <td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off"></textarea> + <tr> + <td align="right">Session Key: + <td><input type="text" size="55" name="key" /> + <tr> + <td> + <td><div align="right"> + <input type="submit" name="action" value="Add key" /> + </div> + </table> + </form> + + +</div> +</div> +</body> +</html> diff --git a/apps/routerconsole/jsp/configlogging.jsp b/apps/routerconsole/jsp/configlogging.jsp index a3f854c0ebaca89fcfb7895d55492e93e7f0b7cc..3f4c6daa226a014d59ad9b79d190eabe9b445cc7 100644 --- a/apps/routerconsole/jsp/configlogging.jsp +++ b/apps/routerconsole/jsp/configlogging.jsp @@ -1,54 +1,68 @@ -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html><head> -<title>I2P Router Console - config logging</title> -<%@include file="css.jsp" %> -</head><body> -<jsp:useBean class="net.i2p.router.web.ConfigLoggingHelper" id="logginghelper" scope="request" /> -<jsp:setProperty name="logginghelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - -<%@include file="nav.jsp" %> -<%@include file="summary.jsp" %> -<h1>I2P Logging Configuration</h1> -<div class="main" id="main"> - <%@include file="confignav.jsp" %> - - <jsp:useBean class="net.i2p.router.web.ConfigLoggingHandler" id="formhandler" scope="request" /> - <jsp:setProperty name="formhandler" property="*" /> - <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:getProperty name="formhandler" property="allMessages" /> - - <form action="configlogging.jsp" method="POST"> - <% String prev = System.getProperty("net.i2p.router.web.ConfigLoggingHandler.nonce"); - if (prev != null) System.setProperty("net.i2p.router.web.ConfigLoggingHandler.noncePrev", prev); - System.setProperty("net.i2p.router.web.ConfigLoggingHandler.nonce", new java.util.Random().nextLong()+""); %> - <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigLoggingHandler.nonce")%>" /> - <input type="hidden" name="action" value="blah" /> - <table border="0" cellspacing="5"> - <tr><td valign="top"><b>Logging filename:</b> - <td><input type="text" name="logfilename" size="40" value="<jsp:getProperty name="logginghelper" property="logFilePattern" />" /><br /> - <i>(the symbol '@' will be replaced during log rotation)</i> - <tr><td valign="top"><b>Log record format:</b> - <td><input type="text" name="logformat" size="20" value="<jsp:getProperty name="logginghelper" property="recordPattern" />" /><br /> - <i>(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, 'm' = message)</i> - <tr><td valign="top"><b>Log date format:</b> - <td><input type="text" name="logdateformat" size="20" value="<jsp:getProperty name="logginghelper" property="datePattern" />" /><br /> - <i>('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' = second, 'SSS' = millisecond)</i> - <tr><td valign="top"><b>Max log file size:</b> - <td><input type="text" name="logfilesize" size="4" value="<jsp:getProperty name="logginghelper" property="maxFileSize" />" /><br /> - <tr><td valign="top"><b>Default log level:</b> - <td><jsp:getProperty name="logginghelper" property="defaultLogLevelBox" /> - <br /><i>(DEBUG and INFO are not recommended defaults, as they will drastically slow down your router)</i> - <tr><td valign="top"><b>Log level overrides:</b> - <td><jsp:getProperty name="logginghelper" property="logLevelTable" /> - <tr><td><td> - <input type="submit" name="shouldsave" value="Save changes" /> - <input type="reset" value="Cancel" /> - </table> - </form> -</div> - -</body> -</html> +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html><head> +<title>I2P Router Console - config logging</title> +<%@include file="css.jsp" %> +</head><body> +<jsp:useBean class="net.i2p.router.web.ConfigLoggingHelper" id="logginghelper" scope="request" /> +<jsp:setProperty name="logginghelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + +<%@include file="nav.jsp" %> +<%@include file="summary.jsp" %> +<h1>I2P Logging Configuration</h1> +<div class="main" id="main"> + <%@include file="confignav.jsp" %> + + <jsp:useBean class="net.i2p.router.web.ConfigLoggingHandler" id="formhandler" scope="request" /> + <jsp:setProperty name="formhandler" property="*" /> + <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:getProperty name="formhandler" property="allMessages" /> +<div class="configure"> + <form action="configlogging.jsp" method="POST"> + <% String prev = System.getProperty("net.i2p.router.web.ConfigLoggingHandler.nonce"); + if (prev != null) System.setProperty("net.i2p.router.web.ConfigLoggingHandler.noncePrev", prev); + System.setProperty("net.i2p.router.web.ConfigLoggingHandler.nonce", new java.util.Random().nextLong()+""); %> + <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigLoggingHandler.nonce")%>" /> + <input type="hidden" name="action" value="blah" /> + <table border="0" cellspacing="5"> + <tr> + <td valign="top"><b>Logging filename:</b> + <td><input type="text" name="logfilename" size="40" value="<jsp:getProperty name="logginghelper" property="logFilePattern" />" /> + <br /> <i>(the symbol '@' will be replaced during log rotation)</i> + <tr> + <td valign="top"><b>Log record format:</b> + <td><input type="text" name="logformat" size="20" value="<jsp:getProperty name="logginghelper" property="recordPattern" />" /> + <br /> <i>(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, + 'm' = message)</i> + <tr> + <td valign="top"><b>Log date format:</b> + <td><input type="text" name="logdateformat" size="20" value="<jsp:getProperty name="logginghelper" property="datePattern" />" /> + <br /> <i>('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' + = second, 'SSS' = millisecond)</i> + <tr> + <td valign="top"><b>Max log file size:</b> + <td><input type="text" name="logfilesize" size="4" value="<jsp:getProperty name="logginghelper" property="maxFileSize" />" /> + <br /> + <tr> + <td valign="top"><b>Default log level:</b> + <td><jsp:getProperty name="logginghelper" property="defaultLogLevelBox" /> <br /> <i>(DEBUG and INFO are not recommended defaults, + as they will drastically slow down your router)</i> + <tr> + <td valign="top"><b>Log level overrides:</b> + <td><jsp:getProperty name="logginghelper" property="logLevelTable" /> + <tr> + <td colspan="2" valign="top"><hr> + <tr> + <td> + <td> <div align="right"> + <input type="submit" name="shouldsave" value="Save changes" /> + <input type="reset" value="Cancel" /> + </div> + </table> + </form> +</div> +</div> +</body> +</html> diff --git a/apps/routerconsole/jsp/configpeer.jsp b/apps/routerconsole/jsp/configpeer.jsp index b465559cd151cf20330a6acedf4b7aae477dd026..2fc0de9ec37cd2d0df17a2ae8b0a7d31b1e700bc 100644 --- a/apps/routerconsole/jsp/configpeer.jsp +++ b/apps/routerconsole/jsp/configpeer.jsp @@ -1,84 +1,87 @@ -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html><head> -<title>I2P Router Console - config peers</title> -<%@include file="css.jsp" %> -</head><body> - -<%@include file="nav.jsp" %> -<%@include file="summary.jsp" %> -<h1>I2P Peer Configuration</h1> -<div class="main" id="main"> - <%@include file="confignav.jsp" %> - - <jsp:useBean class="net.i2p.router.web.ConfigPeerHandler" id="formhandler" scope="request" /> - <jsp:setProperty name="formhandler" property="*" /> - <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:getProperty name="formhandler" property="allMessages" /> - - - - <jsp:useBean class="net.i2p.router.web.ConfigPeerHelper" id="peerhelper" scope="request" /> - <jsp:setProperty name="peerhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - - <% String peer = ""; - if (request.getParameter("peer") != null) - peer = request.getParameter("peer"); - %> - - <form action="configpeer.jsp" method="POST"> - <% String prev = System.getProperty("net.i2p.router.web.ConfigPeerHandler.nonce"); - if (prev != null) System.setProperty("net.i2p.router.web.ConfigPeerHandler.noncePrev", prev); - System.setProperty("net.i2p.router.web.ConfigPeerHandler.nonce", new java.util.Random().nextLong()+""); %> - <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigPeerHandler.nonce")%>" /> - <hr /> - <p> - <a name="sh"> </a> - <a name="unsh"> </a> - <a name="bonus"> </a> - <h2>Manual Peer Controls</h2> - Router Hash: - <input type="text" size="55" name="peer" value="<%=peer%>" /> - <h3>Manually Shitlist / Unshitlist a Router</h3> - Shitlisting will prevent the participation of this peer in tunnels you create. - <p> - <input type="submit" name="action" value="Shitlist peer until restart" /> - <input type="submit" name="action" value="Unshitlist peer" /> - <% if (! "".equals(peer)) { %> - <font color="blue"><---- click to verify action</font> - <% } %> - </p> - - <h3>Adjust Profile Bonuses</h3> - Bonuses may be positive or negative, and affect the peer's inclusion in Fast and High Capacity tiers. - Fast peers are used for client tunnels, and High Capacity peers are used for some exploratory tunnels. - Current bonuses are displayed on the <a href="profiles.jsp">profiles page</a>. - <p> - <% long speed = 0; long capacity = 0; - if (! "".equals(peer)) { - // get existing bonus values? - } - %> - Speed: - <input type="text" size="8" name="speed" value="<%=speed%>" /> - Capacity: - <input type="text" size="8" name="capacity" value="<%=capacity%>" /> - <input type="submit" name="action" value="Adjust peer bonuses" /> - </p> - </form> - - <hr /> - <a name="shitlist"> </a> - <jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" /> - <jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:getProperty name="profilesHelper" property="shitlistSummary" /> - <hr /> - <jsp:getProperty name="peerhelper" property="blocklistSummary" /> - - -</div> - -</body> -</html> +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html><head> +<title>I2P Router Console - config peers</title> +<%@include file="css.jsp" %> +</head><body> + +<%@include file="nav.jsp" %> +<%@include file="summary.jsp" %> +<h1>I2P Peer Configuration</h1> +<div class="main" id="main"> + <%@include file="confignav.jsp" %> + + <jsp:useBean class="net.i2p.router.web.ConfigPeerHandler" id="formhandler" scope="request" /> + <jsp:setProperty name="formhandler" property="*" /> + <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:getProperty name="formhandler" property="allMessages" /> + + + + <jsp:useBean class="net.i2p.router.web.ConfigPeerHelper" id="peerhelper" scope="request" /> + <jsp:setProperty name="peerhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + + <% String peer = ""; + if (request.getParameter("peer") != null) + peer = request.getParameter("peer"); + %> + <div class="configure"> + <form action="configpeer.jsp" method="POST"> + <% String prev = System.getProperty("net.i2p.router.web.ConfigPeerHandler.nonce"); + if (prev != null) System.setProperty("net.i2p.router.web.ConfigPeerHandler.noncePrev", prev); + System.setProperty("net.i2p.router.web.ConfigPeerHandler.nonce", new java.util.Random().nextLong()+""); %> + <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigPeerHandler.nonce")%>" /> + <hr /> + <p> + <a name="sh"> </a> + <a name="unsh"> </a> + <a name="bonus"> </a> + <h2>Manual Peer Controls</h2> + Router Hash: + <input type="text" size="55" name="peer" value="<%=peer%>" /> + <h3>Manually Shitlist / Unshitlist a Router</h3> + Shitlisting will prevent the participation of this peer in tunnels you create. + <hr /> + <p> + <input type="submit" name="action" value="Shitlist peer until restart" /> + <input type="submit" name="action" value="Unshitlist peer" /> + <% if (! "".equals(peer)) { %> + <font color="blue"><---- click to verify action</font> + <% } %> + </p> + + <h3>Adjust Profile Bonuses</h3> + Bonuses may be positive or negative, and affect the peer's inclusion in Fast + and High Capacity tiers. Fast peers are used for client tunnels, and High + Capacity peers are used for some exploratory tunnels. Current bonuses are + displayed on the <a href="profiles.jsp">profiles page</a>. + <hr /> + <p> + <% long speed = 0; long capacity = 0; + if (! "".equals(peer)) { + // get existing bonus values? + } + %> + Speed: + <input type="text" size="8" name="speed" value="<%=speed%>" /> + Capacity: + <input type="text" size="8" name="capacity" value="<%=capacity%>" /> + <input type="submit" name="action" value="Adjust peer bonuses" /> + </p> + </form> + + <hr /> + <a name="shitlist"> </a> + <jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" /> + <jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:getProperty name="profilesHelper" property="shitlistSummary" /> + <hr /> + <jsp:getProperty name="peerhelper" property="blocklistSummary" /> + + +</div> +</div> +</body> +</html> diff --git a/apps/routerconsole/jsp/configservice.jsp b/apps/routerconsole/jsp/configservice.jsp index e465757fff241b359a80f6b93edb3b8254314c4a..d2ed15b221ce78e953e1022338641f50fea23261 100644 --- a/apps/routerconsole/jsp/configservice.jsp +++ b/apps/routerconsole/jsp/configservice.jsp @@ -1,87 +1,87 @@ -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html><head> -<title>I2P Router Console - config service</title> -<%@include file="css.jsp" %> -</head><body> - -<%@include file="nav.jsp" %> -<%@include file="summary.jsp" %> -<h1>I2P Service Configuration</h1> -<div class="main" id="main"> - <%@include file="confignav.jsp" %> - - <jsp:useBean class="net.i2p.router.web.ConfigServiceHandler" id="formhandler" scope="request" /> - <jsp:setProperty name="formhandler" property="*" /> - <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:getProperty name="formhandler" property="allMessages" /> - - <form action="configservice.jsp" method="POST"> - <% String prev = System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce"); - if (prev != null) System.setProperty("net.i2p.router.web.ConfigServiceHandler.noncePrev", prev); - System.setProperty("net.i2p.router.web.ConfigServiceHandler.nonce", new java.util.Random().nextLong()+""); %> - <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce")%>" /> - <h4>Shutdown the router</h4> - <p>Graceful shutdown lets the router satisfy the agreements it has already made - before shutting down, but may take a few minutes. If you need to kill the - router immediately, that option is available as well.</p> - - <input type="submit" name="action" value="Shutdown gracefully" /> - <input type="submit" name="action" value="Shutdown immediately" /> - <input type="submit" name="action" value="Cancel graceful shutdown" /> - <hr> - <% if (System.getProperty("wrapper.version") != null) { %> - <p>If you want the router to restart itself after shutting down, you can choose one of - the following. This is useful in some situations - for example, if you changed - some settings that client applications only read at startup, such as the routerconsole password - or the interface it listens on. A graceful restart will take a few minutes (but your peers - will appreciate your patience), while a hard restart does so immediately. After tearing down - the router, it will wait 1 minute before starting back up again.</p> - - <input type="submit" name="action" value="Graceful restart" /> - <input type="submit" name="action" value="Hard restart" /> - <% } %> - <hr> - <% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %> - <h4>Systray integration</h4> - <p>On the windows platform, there is a small application to sit in the system - tray, allowing you to view the router's status (later on, I2P client applications - will be able to integrate their own functionality into the system tray as well). - If you are on windows, you can either enable or disable that icon here.</p> - <input type="submit" name="action" value="Show systray icon" /> - <input type="submit" name="action" value="Hide systray icon" /> - <hr> - <h4>Run on startup</h4> - <p>You can control whether I2P is run on startup or not by selecting one of the - following options - I2P will install (or remove) a service accordingly. You can - also run the <code>install_i2p_service_winnt.bat</code> (or - <code>uninstall_i2p_service_winnt.bat</code>) from the command line, if you prefer.</p> - <input type="submit" name="action" value="Run I2P on startup" /> - <input type="submit" name="action" value="Don't run I2P on startup" /><br /> - <p><b>Note:</b> If you are running I2P as service right now, removing it will shut - down your router immediately. You may want to consider shutting down gracefully, as - above, then running uninstall_i2p_service_winnt.bat.</p><hr> - <% } %> - - <% if (System.getProperty("wrapper.version") != null) { %> - <h4>Debugging</h4> - <p>At times, it may be helpful to debug I2P by getting a thread dump. To do so, - please select the following option and review the thread dumped to - <a href="logs.jsp#servicelogs">wrapper.log</a>.</p> - <input type="submit" name="action" value="Dump threads" /> - <% } %><hr> - - <h4>Launch browser on router startup?</h4> - <p>I2P's main configuration interface is this web console, so for your convenience - I2P can launch a web browser pointing at - <a href="http://127.0.0.1:7657/index.jsp">http://127.0.0.1:7657/index.jsp</a> whenever - the router starts up.</p> - <input type="submit" name="action" value="View console on startup" /> - <input type="submit" name="action" value="Do not view console on startup" /> - </form><hr> -</div> - -</body> -</html> +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html><head> +<title>I2P Router Console - config service</title> +<%@include file="css.jsp" %> +</head><body> + +<%@include file="nav.jsp" %> +<%@include file="summary.jsp" %> +<h1>I2P Service Configuration</h1> +<div class="main" id="main"> + <%@include file="confignav.jsp" %> + + <jsp:useBean class="net.i2p.router.web.ConfigServiceHandler" id="formhandler" scope="request" /> + <jsp:setProperty name="formhandler" property="*" /> + <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:getProperty name="formhandler" property="allMessages" /> + <div class="configure"> + <form action="configservice.jsp" method="POST"> + <% String prev = System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce"); + if (prev != null) System.setProperty("net.i2p.router.web.ConfigServiceHandler.noncePrev", prev); + System.setProperty("net.i2p.router.web.ConfigServiceHandler.nonce", new java.util.Random().nextLong()+""); %> + <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce")%>" /> + <h4>Shutdown the router</h4> + <p>Graceful shutdown lets the router satisfy the agreements it has already made + before shutting down, but may take a few minutes. If you need to kill the + router immediately, that option is available as well.</p> + + <input type="submit" name="action" value="Shutdown gracefully" /> + <input type="submit" name="action" value="Shutdown immediately" /> + <input type="submit" name="action" value="Cancel graceful shutdown" /> + <hr> + <% if (System.getProperty("wrapper.version") != null) { %> + <p>If you want the router to restart itself after shutting down, you can choose one of + the following. This is useful in some situations - for example, if you changed + some settings that client applications only read at startup, such as the routerconsole password + or the interface it listens on. A graceful restart will take a few minutes (but your peers + will appreciate your patience), while a hard restart does so immediately. After tearing down + the router, it will wait 1 minute before starting back up again.</p> + + <input type="submit" name="action" value="Graceful restart" /> + <input type="submit" name="action" value="Hard restart" /> + <% } %> + <hr> + <% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %> + <h4>Systray integration</h4> + <p>On the windows platform, there is a small application to sit in the system + tray, allowing you to view the router's status (later on, I2P client applications + will be able to integrate their own functionality into the system tray as well). + If you are on windows, you can either enable or disable that icon here.</p> + <input type="submit" name="action" value="Show systray icon" /> + <input type="submit" name="action" value="Hide systray icon" /> + <hr> + <h4>Run on startup</h4> + <p>You can control whether I2P is run on startup or not by selecting one of the + following options - I2P will install (or remove) a service accordingly. You can + also run the <code>install_i2p_service_winnt.bat</code> (or + <code>uninstall_i2p_service_winnt.bat</code>) from the command line, if you prefer.</p> + <input type="submit" name="action" value="Run I2P on startup" /> + <input type="submit" name="action" value="Don't run I2P on startup" /><br /> + <p><b>Note:</b> If you are running I2P as service right now, removing it will shut + down your router immediately. You may want to consider shutting down gracefully, as + above, then running uninstall_i2p_service_winnt.bat.</p><hr> + <% } %> + + <% if (System.getProperty("wrapper.version") != null) { %> + <h4>Debugging</h4> + <p>At times, it may be helpful to debug I2P by getting a thread dump. To do so, + please select the following option and review the thread dumped to + <a href="logs.jsp#servicelogs">wrapper.log</a>.</p> + <input type="submit" name="action" value="Dump threads" /> + <% } %><hr> + + <h4>Launch browser on router startup?</h4> + <p>I2P's main configuration interface is this web console, so for your convenience + I2P can launch a web browser pointing at + <a href="http://127.0.0.1:7657/index.jsp">http://127.0.0.1:7657/index.jsp</a> whenever + the router starts up.</p> + <input type="submit" name="action" value="View console on startup" /> + <input type="submit" name="action" value="Do not view console on startup" /> + </form><hr> +</div> +</div> +</body> +</html> diff --git a/apps/routerconsole/jsp/configstats.jsp b/apps/routerconsole/jsp/configstats.jsp index e2dde4c4441a0e7376deb4ac80fcecab73a7c1a5..039f9b55f9a222480a39707d2a1ede1b47533a18 100644 --- a/apps/routerconsole/jsp/configstats.jsp +++ b/apps/routerconsole/jsp/configstats.jsp @@ -1,112 +1,111 @@ -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html><head> -<title>I2P Router Console - config stats</title> -<%@include file="css.jsp" %> -<script type="text/javascript"> -function init() -{ - checkAll = false; -} -function toggleAll(category) -{ - var inputs = document.getElementsByTagName("input"); - for(index = 0; index < inputs.length; index++) - { - if(inputs[index].id == category) - { - if(inputs[index].checked == 0) - { - inputs[index].checked = 1; - } - else if(inputs[index].checked == 1) - { - inputs[index].checked = 0; - } - } - if(category == '*') - { - if (checkAll == false) - { - inputs[index].checked = 1; - } - else if (checkAll == true) - { - inputs[index].checked = 0; - } - } - } - if(category == '*') - { - if (checkAll == false) - { - checkAll = true; - } - else if (checkAll == true) - { - checkAll = false; - } - } -} -</script> -</head><body onLoad="init();"> -<%@include file="nav.jsp" %> -<%@include file="summary.jsp" %> -<h1>I2P Stats Configuration</h1> -<div class="main" id="main"> - <%@include file="confignav.jsp" %> - - <jsp:useBean class="net.i2p.router.web.ConfigStatsHandler" id="formhandler" scope="request" /> - <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:setProperty name="formhandler" property="*" /> - <jsp:getProperty name="formhandler" property="allMessages" /> - - <jsp:useBean class="net.i2p.router.web.ConfigStatsHelper" id="statshelper" scope="request" /> - <jsp:setProperty name="statshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - - <form id="statsForm" name="statsForm" action="configstats.jsp" method="POST"> - <% String prev = System.getProperty("net.i2p.router.web.ConfigStatsHandler.nonce"); - if (prev != null) System.setProperty("net.i2p.router.web.ConfigStatsHandler.noncePrev", prev); - System.setProperty("net.i2p.router.web.ConfigStatsHandler.nonce", new java.util.Random().nextLong()+""); %> - <input type="hidden" name="action" value="foo" /> - <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigStatsHandler.nonce")%>" /> - Enable full stats? - <input type="checkbox" name="isFull" value="true" <% - if (statshelper.getIsFull()) { %>checked="true" <% } %>/> - (change requires restart to take effect)<br /> - Stat file: <input type="text" name="filename" value="<%=statshelper.getFilename()%>" /><br /> - Filter: (<a href="javascript: void(null);" onclick="toggleAll('*')">toggle all</a>)<br /> - <table> - <% while (statshelper.hasMoreStats()) { - while (statshelper.groupRequired()) { %> - <tr><td valign="top" align="left" colspan="3"> - <b><%=statshelper.getCurrentGroupName()%></b> - (<a href="javascript: void(null);" onclick="toggleAll('<%=statshelper.getCurrentGroupName()%>')">toggle all</a>) - </td></tr><tr><td>Log</td><td>Graph</td><td></td></tr><% - } // end iterating over required groups for the current stat %> - <tr><td valign="top" align="left"> - <a name="<%=statshelper.getCurrentStatName()%>"></a> - <input id="<%=statshelper.getCurrentGroupName()%>" type="checkbox" name="statList" value="<%=statshelper.getCurrentStatName()%>" <% - if (statshelper.getCurrentIsLogged()) { %>checked="true" <% } %>/></td> - <td valign="top" align="left"> - <% if (statshelper.getCurrentCanBeGraphed()) { %> - <input id="<%=statshelper.getCurrentGroupName()%>" type="checkbox" name="graphList" value="<%=statshelper.getCurrentGraphName()%>" <% - if (statshelper.getCurrentIsGraphed()) { %>checked="true" <% } %>/><% } %></td> - <td valign="top" align="left"><b><%=statshelper.getCurrentStatName()%>:</b><br /> - <%=statshelper.getCurrentStatDescription()%></td></tr><% - } // end iterating over all stats %> - <tr><td colspan="3"><hr /></td></tr> - <tr><td><input type="checkbox" name="explicitFilter" /></td> - <td colspan="2">Advanced filter: - <input type="text" name="explicitFilterValue" value="<%=statshelper.getExplicitFilter()%>" size="40" /></td></tr> - <tr><td colspan="3"><hr /></td></tr> - <tr><td><input type="submit" name="shouldsave" value="Save changes" /> </td> - <td><input type="reset" value="Cancel" /></td></tr> - </form> - </table> -</div> - -</body> -</html> +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html><head> +<title>I2P Router Console - config stats</title> +<%@include file="css.jsp" %> +<script type="text/javascript"> +function init() +{ + checkAll = false; +} +function toggleAll(category) +{ + var inputs = document.getElementsByTagName("input"); + for(index = 0; index < inputs.length; index++) + { + if(inputs[index].id == category) + { + if(inputs[index].checked == 0) + { + inputs[index].checked = 1; + } + else if(inputs[index].checked == 1) + { + inputs[index].checked = 0; + } + } + if(category == '*') + { + if (checkAll == false) + { + inputs[index].checked = 1; + } + else if (checkAll == true) + { + inputs[index].checked = 0; + } + } + } + if(category == '*') + { + if (checkAll == false) + { + checkAll = true; + } + else if (checkAll == true) + { + checkAll = false; + } + } +} +</script> +</head><body onLoad="init();"> +<%@include file="nav.jsp" %> +<%@include file="summary.jsp" %> +<h1>I2P Stats Configuration</h1> +<div class="main" id="main"> + <%@include file="confignav.jsp" %> + + <jsp:useBean class="net.i2p.router.web.ConfigStatsHandler" id="formhandler" scope="request" /> + <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:setProperty name="formhandler" property="*" /> + <jsp:getProperty name="formhandler" property="allMessages" /> + + <jsp:useBean class="net.i2p.router.web.ConfigStatsHelper" id="statshelper" scope="request" /> + <jsp:setProperty name="statshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <div class="configure"> + <form id="statsForm" name="statsForm" action="configstats.jsp" method="POST"> + <% String prev = System.getProperty("net.i2p.router.web.ConfigStatsHandler.nonce"); + if (prev != null) System.setProperty("net.i2p.router.web.ConfigStatsHandler.noncePrev", prev); + System.setProperty("net.i2p.router.web.ConfigStatsHandler.nonce", new java.util.Random().nextLong()+""); %> + <input type="hidden" name="action" value="foo" /> + <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigStatsHandler.nonce")%>" /> + Enable full stats? + <input type="checkbox" name="isFull" value="true" <% + if (statshelper.getIsFull()) { %>checked="true" <% } %>/> + (change requires restart to take effect)<br /> + Stat file: <input type="text" name="filename" value="<%=statshelper.getFilename()%>" /><br /> + Filter: (<a href="javascript: void(null);" onclick="toggleAll('*')">toggle all</a>)<br /> + <table> + <% while (statshelper.hasMoreStats()) { + while (statshelper.groupRequired()) { %> + <tr><td valign="top" align="left" colspan="3"> + <b><%=statshelper.getCurrentGroupName()%></b> + (<a href="javascript: void(null);" onclick="toggleAll('<%=statshelper.getCurrentGroupName()%>')">toggle all</a>) + </td></tr><tr><td>Log</td><td>Graph</td><td></td></tr><% + } // end iterating over required groups for the current stat %> + <tr><td valign="top" align="left"> + <a name="<%=statshelper.getCurrentStatName()%>"></a> + <input id="<%=statshelper.getCurrentGroupName()%>" type="checkbox" name="statList" value="<%=statshelper.getCurrentStatName()%>" <% + if (statshelper.getCurrentIsLogged()) { %>checked="true" <% } %>/></td> + <td valign="top" align="left"> + <% if (statshelper.getCurrentCanBeGraphed()) { %> + <input id="<%=statshelper.getCurrentGroupName()%>" type="checkbox" name="graphList" value="<%=statshelper.getCurrentGraphName()%>" <% + if (statshelper.getCurrentIsGraphed()) { %>checked="true" <% } %>/><% } %></td> + <td valign="top" align="left"><b><%=statshelper.getCurrentStatName()%>:</b><br /> + <%=statshelper.getCurrentStatDescription()%></td></tr><% + } // end iterating over all stats %> + <tr><td colspan="3"><hr /></td></tr> + <tr><td><input type="checkbox" name="explicitFilter" /></td> + <td colspan="2">Advanced filter: + <input type="text" name="explicitFilterValue" value="<%=statshelper.getExplicitFilter()%>" size="40" /></td></tr> + <tr><td colspan="3"><hr /></td></tr> + <tr><td><input type="submit" name="shouldsave" value="Save changes" /> </td> + <td><input type="reset" value="Cancel" /></td><td></td></tr></form> + </table> +</div> +</div> +</body> +</html> diff --git a/apps/routerconsole/jsp/configtunnels.jsp b/apps/routerconsole/jsp/configtunnels.jsp index 4a53940cd11ab2a21ad2a73c49b07836f92e9cea..d1b08b5b2f07da5923546913367fd08a3aaf528a 100644 --- a/apps/routerconsole/jsp/configtunnels.jsp +++ b/apps/routerconsole/jsp/configtunnels.jsp @@ -1,51 +1,51 @@ -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html><head> -<title>I2P Router Console - config tunnels</title> -<%@include file="css.jsp" %> -</head><body> - -<%@include file="nav.jsp" %> -<%@include file="summary.jsp" %> - -<jsp:useBean class="net.i2p.router.web.ConfigTunnelsHelper" id="tunnelshelper" scope="request" /> -<jsp:setProperty name="tunnelshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> -<h1>I2P Tunnel Configuration</h1> -<div class="main" id="main"> - <%@include file="confignav.jsp" %> - - <jsp:useBean class="net.i2p.router.web.ConfigTunnelsHandler" id="formhandler" scope="request" /> - <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:setProperty name="formhandler" property="shouldsave" value="<%=request.getParameter("shouldsave")%>" /> - <jsp:setProperty name="formhandler" property="action" value="<%=request.getParameter("action")%>" /> - <jsp:setProperty name="formhandler" property="nonce" value="<%=request.getParameter("nonce")%>" /> - <jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" /> - <jsp:getProperty name="formhandler" property="allMessages" /> - - <p><i> - NOTE: The default settings work for most people. - There is a fundamental tradeoff between anonymity and performance. - Tunnels longer than 3 hops (for example 2 hops + 0-2 hops, 3 hops + 0-1 hops, 3 hops + 0-2 hops), - or a high quantity + backup quantity, may severely reduce performance or reliability. - High CPU and/or high outbound bandwidth usage may result. - Change these settings with care, and adjust them if you have problems. - </i></p> - - <form action="configtunnels.jsp" method="POST"> - <% String prev = System.getProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce"); - if (prev != null) System.setProperty("net.i2p.router.web.ConfigTunnelsHandler.noncePrev", prev); - System.setProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce", new java.util.Random().nextLong()+""); %> - <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce")%>" /> - <input type="hidden" name="action" value="blah" /> - <jsp:getProperty name="tunnelshelper" property="form" /> - <i>Note - Exploratory tunnel setting changes are stored in the router.config file.</i></br> - <i>Client tunnel changes are temporary and are not saved.</i><br> - <i>To make permanent client tunnel changes see the </i><a href="i2ptunnel/index.jsp">i2ptunnel page</a>.<br> - <hr /> <input type="submit" name="shouldsave" value="Save changes" /> <input type="reset" value="Cancel" /> - </form> -</div> - -</body> -</html> +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html><head> +<title>I2P Router Console - config tunnels</title> +<%@include file="css.jsp" %> +</head><body> + +<%@include file="nav.jsp" %> +<%@include file="summary.jsp" %> + +<jsp:useBean class="net.i2p.router.web.ConfigTunnelsHelper" id="tunnelshelper" scope="request" /> +<jsp:setProperty name="tunnelshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> +<h1>I2P Tunnel Configuration</h1> +<div class="main" id="main"> + <%@include file="confignav.jsp" %> + + <jsp:useBean class="net.i2p.router.web.ConfigTunnelsHandler" id="formhandler" scope="request" /> + <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:setProperty name="formhandler" property="shouldsave" value="<%=request.getParameter("shouldsave")%>" /> + <jsp:setProperty name="formhandler" property="action" value="<%=request.getParameter("action")%>" /> + <jsp:setProperty name="formhandler" property="nonce" value="<%=request.getParameter("nonce")%>" /> + <jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" /> + <jsp:getProperty name="formhandler" property="allMessages" /> + <div class="configure"> + <p><i> + NOTE: The default settings work for most people. + There is a fundamental tradeoff between anonymity and performance. + Tunnels longer than 3 hops (for example 2 hops + 0-2 hops, 3 hops + 0-1 hops, 3 hops + 0-2 hops), + or a high quantity + backup quantity, may severely reduce performance or reliability. + High CPU and/or high outbound bandwidth usage may result. + Change these settings with care, and adjust them if you have problems. + </i></p> + + <form action="configtunnels.jsp" method="POST"> + <% String prev = System.getProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce"); + if (prev != null) System.setProperty("net.i2p.router.web.ConfigTunnelsHandler.noncePrev", prev); + System.setProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce", new java.util.Random().nextLong()+""); %> + <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce")%>" /> + <input type="hidden" name="action" value="blah" /> + <jsp:getProperty name="tunnelshelper" property="form" /> + <i>Note - Exploratory tunnel setting changes are stored in the router.config file.</i></br> + <i>Client tunnel changes are temporary and are not saved.</i><br> + <i>To make permanent client tunnel changes see the </i><a href="i2ptunnel/index.jsp">i2ptunnel page</a>.<br> + <hr /> <input type="submit" name="shouldsave" value="Save changes" /> <input type="reset" value="Cancel" /> + </form> +</div> +</div> +</body> +</html> diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp index 9127eaa9b24672b6f10b8593d46023a0cd0aea87..72aac377b75ce8e6be7e9c2960dbeffe2534836b 100644 --- a/apps/routerconsole/jsp/configupdate.jsp +++ b/apps/routerconsole/jsp/configupdate.jsp @@ -1,59 +1,81 @@ -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html><head> -<title>I2P Router Console - config update</title> -<%@include file="css.jsp" %> -</head><body> - -<%@include file="nav.jsp" %> -<%@include file="summary.jsp" %> -<h1>I2P Update Configuration</h1> -<div class="main" id="main"> - <%@include file="confignav.jsp" %> - - <jsp:useBean class="net.i2p.router.web.ConfigUpdateHandler" id="formhandler" scope="request" /> - <jsp:setProperty name="formhandler" property="*" /> - <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - <jsp:getProperty name="formhandler" property="allMessages" /> - - <jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" /> - <jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> - - <br /><i><jsp:getProperty name="updatehelper" property="newsStatus" /></i><br /> <br /> - <form action="configupdate.jsp" method="POST"> - <% String prev = System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce"); - if (prev != null) System.setProperty("net.i2p.router.web.ConfigUpdateHandler.noncePrev", prev); - System.setProperty("net.i2p.router.web.ConfigUpdateHandler.nonce", new java.util.Random().nextLong()+""); %> - <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce")%>" /> -<table border="0" cellspacing="5"><tr><td colspan="2"></tr><tr><td><b>News:</b></td><td> - <% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> - <i>Update In Progress</i><br /> - <% } else { %> - <input type="submit" name="action" value="Check for update now" /> -<% } %></tr> -<tr><td colspan="2"><hr /></td></tr> -<tr><td><b>News URL:</b></td> -<td><input type="text" size="60" name="newsURL" value="<jsp:getProperty name="updatehelper" property="newsURL" />"></td></tr> -<tr><td><b>Refresh frequency:</b> -<td><jsp:getProperty name="updatehelper" property="refreshFrequencySelectBox" /> -<tr><td><b>Update policy:</b> -<td><jsp:getProperty name="updatehelper" property="updatePolicySelectBox" /> -<tr><td><b>Update through the eepProxy?</b> -<td><jsp:getProperty name="updatehelper" property="updateThroughProxy" /> -<tr><td><b>eepProxy host:</b> -<td><input type="text" size="10" name="proxyHost" value="<jsp:getProperty name="updatehelper" property="proxyHost" />" /> -<tr><td><b>eepProxy port:</b> -<td><input type="text" size="4" name="proxyPort" value="<jsp:getProperty name="updatehelper" property="proxyPort" />" /> -<tr><td><b>Update URLs:</b> -<td><textarea name="updateURL" wrap="off"><jsp:getProperty name="updatehelper" property="updateURL" /></textarea> -<tr><td><b>Trusted keys:</b> -<td><textarea name="trustedKeys" wrap="off"><jsp:getProperty name="updatehelper" property="trustedKeys" /></textarea> -<tr><tr><td colspan="2"><hr /><tr> -<tr><td><td><input type="submit" name="action" value="Save" /> <input type="reset" value="Cancel" /> -</table> - </form> -</div> -</body> -</html> +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html><head> +<title>I2P Router Console - config update</title> +<%@include file="css.jsp" %> +</head><body> + +<%@include file="nav.jsp" %> +<%@include file="summary.jsp" %> +<h1>I2P Update Configuration</h1> +<div class="main" id="main"> + <%@include file="confignav.jsp" %> + + <jsp:useBean class="net.i2p.router.web.ConfigUpdateHandler" id="formhandler" scope="request" /> + <jsp:setProperty name="formhandler" property="*" /> + <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> + <jsp:getProperty name="formhandler" property="allMessages" /> + + <jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" /> + <jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> +<div class="messages"> +<i><jsp:getProperty name="updatehelper" property="newsStatus" /></i></div> +<div class="configure"> + <form action="configupdate.jsp" method="POST"> + <% String prev = System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce"); + if (prev != null) System.setProperty("net.i2p.router.web.ConfigUpdateHandler.noncePrev", prev); + System.setProperty("net.i2p.router.web.ConfigUpdateHandler.nonce", new java.util.Random().nextLong()+""); %> + <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce")%>" /> + <table border="0" cellspacing="5"> + <tr> + <td colspan="2"></tr> + <tr> + <td><b>News:</b></td> + <td> <% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> <i>Update In Progress</i><br /> <% } else { %> <input type="submit" name="action" value="Check for update now" /> + <% } %></tr> + <tr> + <td colspan="2"><hr /></td> + </tr> + <tr> + <td><b>News URL:</b></td> + <td><input type="text" size="60" name="newsURL" value="<jsp:getProperty name="updatehelper" property="newsURL" />"></td> + </tr> + <tr> + <td><b>Refresh frequency:</b> + <td><jsp:getProperty name="updatehelper" property="refreshFrequencySelectBox" /> + <tr> + <td><b>Update policy:</b> + <td><jsp:getProperty name="updatehelper" property="updatePolicySelectBox" /> + <tr> + <td><b>Update through the eepProxy?</b> + <td><jsp:getProperty name="updatehelper" property="updateThroughProxy" /> + <tr> + <td><b>eepProxy host:</b> + <td><input type="text" size="10" name="proxyHost" value="<jsp:getProperty name="updatehelper" property="proxyHost" />" /> + <tr> + <td><b>eepProxy port:</b> + <td><input type="text" size="4" name="proxyPort" value="<jsp:getProperty name="updatehelper" property="proxyPort" />" /> + <tr> + <td><b>Update URLs:</b> + <td><textarea name="updateURL" wrap="off"><jsp:getProperty name="updatehelper" property="updateURL" /></textarea> + <tr> + <td><b>Trusted keys:</b> + <td><textarea name="trustedKeys" wrap="off"><jsp:getProperty name="updatehelper" property="trustedKeys" /></textarea> + <tr> + <tr> + <td colspan="2"><hr /> + <tr> + <tr> + <td> + <td><div align="right"> + <input type="submit" name="action" value="Save" /> + <input type="reset" value="Cancel" /> + </div> + </table> + </form> +</div> +</div> +</body> +</html> diff --git a/installer/resources/themes/console/dark/console.css b/installer/resources/themes/console/dark/console.css index 7440a98f8b38ff7f21bba1996c271521c0982961..87180c2863ff7102d3e1a0514dc4dcd6df6981c4 100644 --- a/installer/resources/themes/console/dark/console.css +++ b/installer/resources/themes/console/dark/console.css @@ -166,6 +166,7 @@ div.configure { -khtml-border-radius: 4px; border-radius: 4px; border: 1px solid #99f; + background: url(images/darkbluebg.png); } div.messages { @@ -340,10 +341,15 @@ h2 a:hover { } h3 { - border-bottom: 1px; - border-bottom-style: solid; - border-bottom-color: #99f; - padding: 5px 0; + border: 1px solid #99f; + border-left: 5px solid #99f; + padding: 3px 5px 3px 5px; + margin: 20px 0 15px 0; + border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + -khtml-border-radius: 0 4px 4px 0; + background: #004; + background: url(images/darkbluebg.png); } h4 { diff --git a/installer/resources/themes/console/light/default.css b/installer/resources/themes/console/light/default.css index 2411bdca7b41483a5ec5a1307dbdd38974f63b03..d4d4603a9fe98ae8c80459ca6686934525857d0e 100644 --- a/installer/resources/themes/console/light/default.css +++ b/installer/resources/themes/console/light/default.css @@ -29,7 +29,7 @@ label { height: 28px; font-weight: normal; text-align: right; - font-size: 7pt; + font-size: 8pt; font-style: italic; -moz-box-sizing: border-box; box-sizing: border-box; @@ -122,8 +122,11 @@ hr { .separator, .subdivider { clear: both; height: 1px; - margin: 3px 0px 3px 0px; + margin: 1px 0px 1px 0px; border-bottom: 1px solid #225; +/* + display: none; +*/ } .subdivider { @@ -150,7 +153,7 @@ hr { } .control { - margin: 4px 0 0 0 !important; + margin: 4px 0 0 4px !important; padding: 2px; overflow: hidden; /* @@ -171,7 +174,7 @@ hr { } .control:active { - border: 2px inset; + border: 1px inset; background-color: #003; color: #ff6600; } diff --git a/installer/resources/themes/console/light/i2ptunnel.css b/installer/resources/themes/console/light/i2ptunnel.css index 5df715e016571e4538e67f92acbfbea75f754070..8b3a9aee31c489a3d0aeb1bda2afc217bbf6ba2d 100644 --- a/installer/resources/themes/console/light/i2ptunnel.css +++ b/installer/resources/themes/console/light/i2ptunnel.css @@ -83,10 +83,14 @@ height: 100px; padding: 0 0 0 4px; margin: 1px 0 4px 0; - background-color: #000088; + background-color: #005; color: #fff; - font-family: "Lucida Console", "Andale Mono", "Courier New", Courier, mono; - border: 1px inset #002; + font-family: "Lucida Console", "DejaVu Sans Mono", "Andale Mono", "Courier New", Courier, mono; + border: 2px inset #002; + font-size: 10pt !important; + font-weight: bold; + text-align: justify !important; + background: url(images/darkbluetile.png); } #tunnelListPage .footer .control {