Files
i2p.itoopie/apps/routerconsole/jsp/configpeer.jsp

75 lines
3.3 KiB
Plaintext
Raw Normal View History

2008-07-16 15:05:07 +00:00
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2009-08-15 16:08:33 +00:00
<html><head><title>I2P Router Console - config peers</title>
<%@include file="css.jsp" %>
2008-07-16 15:05:07 +00:00
</head><body>
<%@include file="summary.jsp" %>
<h1>I2P Peer Configuration</h1>
2008-07-16 15:05:07 +00:00
<div class="main" id="main">
<%@include file="confignav.jsp" %>
2009-08-15 16:08:33 +00:00
2008-07-16 15:05:07 +00:00
<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" />
2009-08-15 16:08:33 +00:00
2008-07-16 15:05:07 +00:00
<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 = "";
2009-08-15 16:08:33 +00:00
if (request.getParameter("peer") != null)
2008-07-16 15:05:07 +00:00
peer = request.getParameter("peer");
%>
<div class="configure">
2008-07-16 15:05:07 +00:00
<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")%>" />
<a name="sh"> </a>
<a name="unsh"> </a>
<a name="bonus"> </a>
<h2>Manual Peer Controls</h2>
2009-10-22 11:33:02 +00:00
<div class="mediumtags"><p>Router Hash:
<input type="text" size="55" name="peer" value="<%=peer%>" /></p></div>
2009-08-08 17:14:30 +00:00
<h3>Manually Ban / Unban a Peer</h3>
2009-10-22 11:33:02 +00:00
<p>Banning will prevent the participation of this peer in tunnels you create.</p>
2009-08-15 16:08:33 +00:00
<div class="formaction">
2009-08-08 17:14:30 +00:00
<input type="submit" name="action" value="Ban peer until restart" />
<input type="submit" name="action" value="Unban peer" />
<% if (! "".equals(peer)) { %>
<!-- <font color="blue">&lt;---- click to verify action</font> -->
<% } %>
</div>
2008-07-16 15:05:07 +00:00
<h3>Adjust Profile Bonuses</h3>
2009-10-22 11:33:02 +00:00
<p>Bonuses may be positive or negative, and affect the peer's inclusion in Fast
2009-08-15 16:08:33 +00:00
and High Capacity tiers. Fast peers are used for client tunnels, and High
Capacity peers are used for some exploratory tunnels. Current bonuses are
2009-10-22 11:33:02 +00:00
displayed on the <a href="profiles.jsp">profiles page</a>.</p>
2008-07-16 15:05:07 +00:00
<% long speed = 0; long capacity = 0;
if (! "".equals(peer)) {
// get existing bonus values?
}
2009-08-15 16:08:33 +00:00
%>
2009-10-22 11:33:02 +00:00
<div class="mediumtags"><p>Speed:
2008-07-16 15:05:07 +00:00
<input type="text" size="8" name="speed" value="<%=speed%>" />
Capacity:
2008-07-16 15:05:07 +00:00
<input type="text" size="8" name="capacity" value="<%=capacity%>" />
2009-10-22 11:33:02 +00:00
<input type="submit" name="action" value="Adjust peer bonuses" /></p></div>
2008-07-16 15:05:07 +00:00
</form>
<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:setProperty name="profilesHelper" property="writer" value="<%=out%>" />
2008-07-16 15:05:07 +00:00
<jsp:getProperty name="profilesHelper" property="shitlistSummary" />
<div class="wideload">
<jsp:getProperty name="peerhelper" property="blocklistSummary" />
2008-07-16 15:05:07 +00:00
2009-10-22 11:33:02 +00:00
</div><hr></div></div></body></html>