source: apps/i2ptunnel/jsp/editClient.jsp @ d4a8595

Last change on this file since d4a8595 was d4a8595, checked in by zzz <zzz@…>, 15 years ago

2005-09-04 jrandom

  • Don't persist peer profiles until we are shutting down, as the persistence process gobbles RAM and wall time.
  • Bugfix to allow you to check/uncheck the sharedClient setting on the I2PTunnel web interface.
  • Be more careful when expiring a failed tunnel message fragment so we don't drop the data while attempting to read it.
  • Property mode set to 100644
File size: 8.7 KB
Line 
1<%@page contentType="text/html" %>
2<jsp:useBean class="net.i2p.i2ptunnel.web.EditBean" id="editBean" scope="request" />
3<% String tun = request.getParameter("tunnel");
4   int curTunnel = -1;
5   if (tun != null) {
6     try {
7       curTunnel = Integer.parseInt(tun);
8     } catch (NumberFormatException nfe) {
9       curTunnel = -1;
10     }
11   }
12%>
13<html>
14<head>
15<title>I2PTunnel Webmanager</title>
16</head>
17<body>
18<form action="index.jsp">
19<input type="hidden" name="tunnel" value="<%=request.getParameter("tunnel")%>" />
20<input type="hidden" name="nonce" value="<%=editBean.getNextNonce()%>" />
21<table width="80%" align="center" border="0" cellpadding="1" cellspacing="1">
22<tr>
23<td style="background-color:#000">
24<div style="background-color:#ffffed">
25<table width="100%" align="center" border="0" cellpadding="4" cellspacing="1">
26<tr>
27<td colspan="2" align="center">
28<% if (curTunnel >= 0) { %>
29<b>Edit proxy settings</b>
30<% } else { %>
31<b>New proxy settings</b>
32<% } %>
33</td>
34</tr>
35<tr>
36<td><b>Name: </b>
37</td>
38<td>
39<input type="text" size="30" maxlength="50" name="name" value="<%=editBean.getTunnelName(curTunnel)%>" />
40</td>
41</tr>
42<tr>
43<td><b>Type: </b>
44<td><%
45if (curTunnel >= 0) {
46  %><%=editBean.getTunnelType(curTunnel)%>
47<input type="hidden" name="type" value="<%=editBean.getInternalType(curTunnel)%>" />
48<%
49} else {
50  %><%=editBean.getTypeName(request.getParameter("type"))%>
51<input type="hidden" name="type" value="<%=request.getParameter("type")%>" />
52<%
53}
54%></td>
55</tr>
56<tr>
57<td><b>Description: </b>
58</td>
59<td>
60<input type="text" size="60" maxlength="80" name="description" value="<%=editBean.getTunnelDescription(curTunnel)%>" />
61</td>
62</tr>
63<tr>
64<td><b>Start automatically?:</b>
65</td>
66<td>
67<% if (editBean.startAutomatically(curTunnel)) { %>
68<input value="1" type="checkbox" name="startOnLoad" checked="true" />
69<% } else { %>
70<input value="1" type="checkbox" name="startOnLoad" />
71<% } %>
72<i>(Check the Box for 'YES')</i>
73</td>
74</tr>
75<tr>
76<td> <b>Listening Port:</b>
77</td>
78<td>
79<input type="text" size="6" maxlength="5" name="port" value="<%=editBean.getClientPort(curTunnel)%>" />
80</td>
81</tr>
82<tr>
83<td><b> Accessable by:</b>
84</td>
85<td>
86<select name="reachableBy">
87<% String clientInterface = editBean.getClientInterface(curTunnel); %>
88<% if (("127.0.0.1".equals(clientInterface)) || (clientInterface == null) || (clientInterface.trim().length() <= 0)) { %>
89<option value="127.0.0.1" selected="true">Locally (127.0.0.1)</option>
90<option value="0.0.0.0">Everyone (0.0.0.0)</option>
91<option value="other">LAN Hosts (Please specify your LAN address)</option>
92
93</select>
94&nbsp;&nbsp;
95<b>others:</b>
96<input type="text" name="reachableByOther" size="20" />
97<% } else if ("0.0.0.0".equals(clientInterface)) { %>
98<option value="127.0.0.1">Locally (127.0.0.1)</option>
99<option value="0.0.0.0" selected="true">Everyone (0.0.0.0)</option>
100<option value="other">LAN Hosts (Please specify your LAN address)</option>
101
102</select>
103&nbsp;&nbsp;
104<b>others:</b>
105<input type="text" name="reachableByOther" size="20" />
106<% } else { %>
107<option value="127.0.0.1">Locally (127.0.0.1)</option>
108<option value="0.0.0.0">Everyone (0.0.0.0)</option>
109<option value="other" selected="true">LAN Hosts (Please specify your LAN address)</option>
110
111</select>
112&nbsp;&nbsp;
113<b>others:</b>
114<input type="text" name="reachableByOther" size="20" value="<%=clientInterface%>" />
115<% } %>
116
117</td>
118</tr>
119<tr>
120<% if ("httpclient".equals(editBean.getInternalType(curTunnel))) { %>
121<td><b>Outproxies:</b>
122<% } else { %>
123<td><b>Target:</b>
124<% } %>
125</td>
126<td>
127<% if ("httpclient".equals(editBean.getInternalType(curTunnel))) { %>
128<input type="text" name="proxyList" value="<%=editBean.getClientDestination(curTunnel)%>" />
129<% } else { %>
130<input type="text" name="targetDestination" value="<%=editBean.getClientDestination(curTunnel)%>" />
131<% } %>
132<i>(name or destination)</i>
133</td>
134</tr>
135<tr>
136<td>
137<b>Delayed connect?</b>
138</td>
139<td>
140<% if (editBean.shouldDelay(curTunnel)) { %>
141<input type="checkbox" value="1000" name="connectDelay" checked="true" />
142<% } else { %>
143<input type="checkbox" value="1000" name="connectDelay" />
144<% } %>
145<i>(for request/response connections)</i>
146</td>
147</tr>
148<tr>
149<td><b>Profile:</b>
150</td>
151<td>
152<select name="profile">
153<% if (editBean.isInteractive(curTunnel)) { %>
154<option value="interactive" selected="true">interactive connection </option>
155<option value="bulk">bulk connection (downloads/websites/BT) </option>
156<% } else { %>
157<option value="interactive">interactive connection </option>
158<option value="bulk" selected="true">bulk connection (downloads/websites/BT) </option>
159<% } %>
160</select>
161</td>
162</tr>
163<tr>
164<td>
165<b>Shared Client</b>
166</td>
167<td>
168<% if (editBean.isSharedClient(curTunnel)) { %>
169<input type="checkbox" value="true" name="shared" checked="true" />
170<% } else { %>
171<input type="checkbox" value="true" name="shared" />
172<% } %>
173<i>(Share tunnels with other clients and httpclients? Change requires restart of client proxy)</i>
174</td>
175</tr>
176<tr>
177<td colspan="2" align="center">
178<b><hr size="1">
179Advanced networking options<br />
180<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>
181</td>
182</tr>
183<tr>
184<td>
185<b>Tunnel depth:</b>
186</td>
187<td><select name="tunnelDepth">
188<% int tunnelDepth = editBean.getTunnelDepth(curTunnel, 2);
189   switch (tunnelDepth) { 
190     case 0: %>
191<option value="0" selected="true">0 hop tunnel (low anonymity, low latency)</option>
192<option value="1" >1 hop tunnel (medium anonymity, medium latency)</option>
193<option value="2" >2 hop tunnel (high anonymity, high latency)</option>
194<%     break;
195     case 1: %>
196<option value="0" >0 hop tunnel (low anonymity, low latency)</option>
197<option value="1" selected="true">1 hop tunnel (medium anonymity, medium latency)</option>
198<option value="2" >2 hop tunnel (high anonymity, high latency)</option>
199<%     break;
200     case 2: %>
201<option value="0" >0 hop tunnel (low anonymity, low latency)</option>
202<option value="1" >1 hop tunnel (medium anonymity, medium latency)</option>
203<option value="2" selected="true">2 hop tunnel (high anonymity, high latency)</option>
204<%     break;
205     default: %>
206<option value="0" >0 hop tunnel (low anonymity, low latency)</option>
207<option value="1" >1 hop tunnel (medium anonymity, medium latency)</option>
208<option value="2" >2 hop tunnel (high anonymity, high latency)</option>
209<option value="<%=tunnelDepth%>" ><%=tunnelDepth%> hop tunnel</option>
210<% } %>
211</select>
212</td>
213</tr>
214<tr>
215<td><b>Tunnel count:</b> 
216</td>
217<td>
218<select name="tunnelCount">
219<% int tunnelCount = editBean.getTunnelCount(curTunnel, 2);
220   switch (tunnelCount) { 
221     case 1: %>
222<option value="1" selected="true" >1 inbound tunnel (low bandwidth usage, less reliability)</option>
223<option value="2" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option>
224<option value="3" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option>
225<%     break;
226     case 2: %>
227<option value="1" >1 inbound tunnel (low bandwidth usage, less reliability)</option>
228<option value="2"  selected="true" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option>
229<option value="3" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option>
230<%     break;
231     case 3: %>
232<option value="1" >1 inbound tunnel (low bandwidth usage, less reliability)</option>
233<option value="2" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option>
234<option value="3" selected="true" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option>
235<%     break;
236     default: %>
237<option value="1" >1 inbound tunnel (low bandwidth usage, less reliability)</option>
238<option value="2" >2 inbound tunnels (standard bandwidth usage, standard reliability)</option>
239<option value="3" >3 inbound tunnels (higher bandwidth usage, higher reliability)</option>
240<option value="<%=tunnelDepth%>" ><%=tunnelDepth%> inbound tunnels</option>
241<% } %>
242</select>
243</td>
244<tr>
245<td><b>I2CP host:</b> 
246</td>
247<td>
248<input type="text" name="clientHost" size="20" value="<%=editBean.getI2CPHost(curTunnel)%>" />
249</td>
250</tr>
251<tr>
252<td><b>I2CP port:</b> 
253</td>
254<td>
255<input type="text" name="clientPort" size="20" value="<%=editBean.getI2CPPort(curTunnel)%>" /><br />
256</td>
257</tr>
258<tr>
259<td><b>Custom options:</b>
260</td>
261<td>
262<input type="text" name="customOptions" size="60" value="<%=editBean.getCustomOptions(curTunnel)%>" />
263</td>
264</tr>
265<tr>
266<td colspan="2">
267<hr size="1">
268</td>
269</tr>
270<tr>
271<td>
272<b>Save:</b>
273</td>
274<td>
275<input type="submit" name="action" value="Save changes" />
276</td>
277</tr>
278<tr>
279<td><b>Delete?</b>
280</td>
281<td>
282<input type="submit" name="action" value="Delete this proxy" /> &nbsp;&nbsp;
283<b><span style="color:#dd0000;">confirm delete:</span></b>
284<input type="checkbox" value="true" name="removeConfirm" />
285</td>
286</tr>
287</table>
288</td>
289</tr>
290</table>
291</form>
292</body>
293</html>
Note: See TracBrowser for help on using the repository browser.