1 | <%@page contentType="text/html" import="net.i2p.i2ptunnel.web.IndexBean"%><?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|
3 | <jsp:useBean class="net.i2p.i2ptunnel.web.IndexBean" id="indexBean" scope="request" /> |
---|
4 | <jsp:setProperty name="indexBean" property="*" /> |
---|
5 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
6 | <head> |
---|
7 | <title>I2PTunnel Webmanager - List</title> |
---|
8 | |
---|
9 | <meta htt |
---|
10 | p-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
---|
11 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> |
---|
12 | |
---|
13 | <% if (indexBean.allowCSS()) { |
---|
14 | %><link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> |
---|
15 | <link href="<%=indexBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> |
---|
16 | <link href="<%=indexBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> |
---|
17 | <% } |
---|
18 | %> |
---|
19 | </head> |
---|
20 | <body id="tunnelListPage"> |
---|
21 | <div id="pageHeader"> |
---|
22 | </div> |
---|
23 | |
---|
24 | <div id="statusMessagePanel" class="panel"> |
---|
25 | <div class="header"> |
---|
26 | <h4>Status Messages</h4> |
---|
27 | </div> |
---|
28 | |
---|
29 | <div class="separator"> |
---|
30 | <hr> |
---|
31 | </div> |
---|
32 | |
---|
33 | <textarea id="statusMessages" rows="4" cols="60" readonly="readonly"><jsp:getProperty name="indexBean" property="messages" /></textarea> |
---|
34 | |
---|
35 | <div class="separator"> |
---|
36 | <hr> |
---|
37 | </div> |
---|
38 | |
---|
39 | <div class="footer"> |
---|
40 | <div class="toolbox"> |
---|
41 | <a class="control" href="index.jsp">Refresh</a> |
---|
42 | </div> |
---|
43 | </div> |
---|
44 | </div> |
---|
45 | |
---|
46 | <div id="globalOperationsPanel" class="panel"> |
---|
47 | <div class="header"></div> |
---|
48 | <div class="footer"> |
---|
49 | <div class="toolbox"> |
---|
50 | <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> |
---|
51 | </div> |
---|
52 | </div> |
---|
53 | </div> |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | <div id="localServerTunnelList" class="panel"> |
---|
58 | <div class="header"> |
---|
59 | |
---|
60 | <h4>I2P Server Tunnels</h4> |
---|
61 | </div> |
---|
62 | |
---|
63 | |
---|
64 | <div class="separator"> </div> |
---|
65 | |
---|
66 | <div class="nameHeaderField rowItem"> |
---|
67 | <label>Name:</label> |
---|
68 | </div> |
---|
69 | <div class="previewHeaderField rowItem"> |
---|
70 | <label>Points at:</label> |
---|
71 | </div> |
---|
72 | <div class="targetHeaderField rowItem"> |
---|
73 | <label>Preview:</label> |
---|
74 | </div> |
---|
75 | <div class="statusHeaderField rowItem"> |
---|
76 | <label>Status:</label> |
---|
77 | <hr> </div> |
---|
78 | |
---|
79 | <% |
---|
80 | for (int curServer = 0; curServer < indexBean.getTunnelCount(); curServer++) { |
---|
81 | if (indexBean.isClient(curServer)) continue; |
---|
82 | |
---|
83 | %> |
---|
84 | <div class="nameField rowItem"> |
---|
85 | <label>Name:</label> |
---|
86 | <span class="text"><a href="edit.jsp?tunnel=<%=curServer%>" title="Edit Server Tunnel Settings for <%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%></a></span> |
---|
87 | </div> |
---|
88 | <div class="previewField rowItem"> |
---|
89 | <label>Points at:</label> |
---|
90 | <span class="text"> |
---|
91 | <% |
---|
92 | if ("httpserver".equals(indexBean.getInternalType(curServer))) { |
---|
93 | %> |
---|
94 | <a href="http://<%=indexBean.getServerTarget(curServer)%>/" title="Test HTTP server, bypassing I2P"><%=indexBean.getServerTarget(curServer)%></a> |
---|
95 | <% |
---|
96 | } else { |
---|
97 | %><%=indexBean.getServerTarget(curServer)%> |
---|
98 | <% |
---|
99 | } |
---|
100 | %></span> |
---|
101 | </div> |
---|
102 | <div class="targetField rowItem"> |
---|
103 | <% |
---|
104 | if ("httpserver".equals(indexBean.getInternalType(curServer)) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { |
---|
105 | %><label>Preview:</label> |
---|
106 | <a class="control" title="Test HTTP server through I2P" href="http://<%=indexBean.getDestHashBase32(curServer)%>.b32.i2p">Preview</a> |
---|
107 | <% |
---|
108 | } else if (indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) { |
---|
109 | %><span class="text">Base32 Address:<br><%=indexBean.getDestHashBase32(curServer)%>.b32.i2p</span> |
---|
110 | <% |
---|
111 | } else { |
---|
112 | %><span class="comment">No Preview</span> |
---|
113 | <% |
---|
114 | } |
---|
115 | %></div> |
---|
116 | <div class="statusField rowItem"> |
---|
117 | <label>Status:</label> |
---|
118 | <% |
---|
119 | switch (indexBean.getTunnelStatus(curServer)) { |
---|
120 | case IndexBean.STARTING: |
---|
121 | %><div class="statusStarting text">Starting...</div> |
---|
122 | <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curServer%>">Stop</a> |
---|
123 | <% |
---|
124 | break; |
---|
125 | case IndexBean.RUNNING: |
---|
126 | %><div class="statusRunning text">Running</div> |
---|
127 | <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curServer%>">Stop</a> |
---|
128 | <% |
---|
129 | break; |
---|
130 | case IndexBean.NOT_RUNNING: |
---|
131 | %><div class="statusNotRunning text">Stopped</div> |
---|
132 | <a class="control" title="Start this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=start&tunnel=<%=curServer%>">Start</a> |
---|
133 | <% |
---|
134 | break; |
---|
135 | } |
---|
136 | %></div> |
---|
137 | |
---|
138 | <div class="descriptionField rowItem"> |
---|
139 | <label>Description:</label> |
---|
140 | <div class="text"><%=indexBean.getTunnelDescription(curServer)%></div> |
---|
141 | </div> |
---|
142 | |
---|
143 | <div class="subdivider"> |
---|
144 | <hr> |
---|
145 | </div> |
---|
146 | <% |
---|
147 | } |
---|
148 | %> |
---|
149 | <div class="separator"> |
---|
150 | <hr> |
---|
151 | </div> |
---|
152 | |
---|
153 | <div class="footer"> |
---|
154 | <form id="addNewServerTunnelForm" action="edit.jsp"> |
---|
155 | <div class="toolbox"> |
---|
156 | |
---|
157 | <label>New server tunnel:</label> |
---|
158 | <select name="type"> |
---|
159 | <option value="server">Standard</option> |
---|
160 | <option value="httpserver">HTTP</option> |
---|
161 | <option value="ircserver">IRC</option> |
---|
162 | <option value="streamrserver">Streamr</option> |
---|
163 | </select> |
---|
164 | <input class="control" type="submit" value="Create" /> |
---|
165 | </div> |
---|
166 | </form> |
---|
167 | </div> |
---|
168 | </div> |
---|
169 | |
---|
170 | |
---|
171 | <div id="localClientTunnelList" class="panel"> |
---|
172 | <div class="header"> |
---|
173 | |
---|
174 | <h4>I2P Client Tunnels</h4> |
---|
175 | </div> |
---|
176 | |
---|
177 | |
---|
178 | <div class="separator"> </div> |
---|
179 | |
---|
180 | <div class="nameHeaderField rowItem"> |
---|
181 | <label>Name:</label> |
---|
182 | </div> |
---|
183 | <div class="portHeaderField rowItem"> |
---|
184 | <label>Port:</label> |
---|
185 | </div> |
---|
186 | <div class="typeHeaderField rowItem"> |
---|
187 | <label>Type:</label> |
---|
188 | </div> |
---|
189 | <div class="interfaceHeaderField rowItem"> |
---|
190 | <label>Interface:</label> |
---|
191 | </div> |
---|
192 | <div class="statusHeaderField rowItem"> |
---|
193 | <label>Status:</label> |
---|
194 | </div> |
---|
195 | |
---|
196 | <div class="separator"> |
---|
197 | <hr> |
---|
198 | </div> |
---|
199 | <% |
---|
200 | for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) { |
---|
201 | if (!indexBean.isClient(curClient)) continue; |
---|
202 | %> |
---|
203 | <div class="nameField rowItem"> |
---|
204 | <label>Name:</label> |
---|
205 | <span class="text"><a href="edit.jsp?tunnel=<%=curClient%>" title="Edit Tunnel Settings for <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a></span> |
---|
206 | </div> |
---|
207 | <div class="portField rowItem"> |
---|
208 | <label>Port:</label> |
---|
209 | <span class="text"><%=indexBean.getClientPort(curClient)%></span> |
---|
210 | </div> |
---|
211 | <div class="typeField rowItem"> |
---|
212 | <label>Type:</label> |
---|
213 | <span class="text"><%=indexBean.getTunnelType(curClient)%></span> |
---|
214 | </div> |
---|
215 | <div class="interfaceField rowItem"> |
---|
216 | <label>Interface:</label> |
---|
217 | <span class="text"><%=indexBean.getClientInterface(curClient)%></span> |
---|
218 | </div> |
---|
219 | <div class="statusField rowItem"> |
---|
220 | <label>Status:</label> |
---|
221 | <% |
---|
222 | switch (indexBean.getTunnelStatus(curClient)) { |
---|
223 | case IndexBean.STARTING: |
---|
224 | %><div class="statusStarting text">Starting...</div> |
---|
225 | <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>">Stop</a> |
---|
226 | <% |
---|
227 | break; |
---|
228 | case IndexBean.STANDBY: |
---|
229 | %><div class="statusStarting text">Standby</div> |
---|
230 | <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>">Stop</a> |
---|
231 | <% |
---|
232 | break; |
---|
233 | case IndexBean.RUNNING: |
---|
234 | %><div class="statusRunning text">Running</div> |
---|
235 | <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>">Stop</a> |
---|
236 | <% |
---|
237 | break; |
---|
238 | case IndexBean.NOT_RUNNING: |
---|
239 | %><div class="statusNotRunning text">Stopped</div> |
---|
240 | <a class="control" title="Start this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=start&tunnel=<%=curClient%>">Start</a> |
---|
241 | <% |
---|
242 | break; |
---|
243 | } |
---|
244 | %></div> |
---|
245 | |
---|
246 | <% if (!"sockstunnel".equals(indexBean.getInternalType(curClient))) { %> |
---|
247 | <div class="destinationField rowItem"> |
---|
248 | <label> |
---|
249 | <% if ("httpclient".equals(indexBean.getInternalType(curClient)) || "connectclient".equals(indexBean.getInternalType(curClient))) { %> |
---|
250 | Outproxy: |
---|
251 | <% } else { %> |
---|
252 | Destination: |
---|
253 | <% } %> |
---|
254 | </label> |
---|
255 | <input class="freetext" size="40" readonly="readonly" value="<%=indexBean.getClientDestination(curClient)%>" /> |
---|
256 | </div> |
---|
257 | <% } %> |
---|
258 | |
---|
259 | <div class="descriptionField rowItem"> |
---|
260 | <label>Description:</label> |
---|
261 | <div class="text"><%=indexBean.getTunnelDescription(curClient)%></div> |
---|
262 | </div> |
---|
263 | |
---|
264 | <div class="subdivider"> |
---|
265 | <hr> |
---|
266 | </div> |
---|
267 | <% |
---|
268 | } |
---|
269 | %> |
---|
270 | <div class="separator"> |
---|
271 | <hr> |
---|
272 | </div> |
---|
273 | |
---|
274 | <div class="footer"> |
---|
275 | <form id="addNewClientTunnelForm" action="edit.jsp"> |
---|
276 | <div class="toolbox"> |
---|
277 | |
---|
278 | <label>New client tunnel:</label> |
---|
279 | <select name="type"> |
---|
280 | <option value="client">Standard</option> |
---|
281 | <option value="httpclient">HTTP</option> |
---|
282 | <option value="ircclient">IRC</option> |
---|
283 | <option value="sockstunnel">SOCKS 4/4a/5</option> |
---|
284 | <option value="connectclient">CONNECT</option> |
---|
285 | <option value="streamrclient">Streamr</option> |
---|
286 | </select> |
---|
287 | <input class="control" type="submit" value="Create" /> |
---|
288 | </div> |
---|
289 | </form> |
---|
290 | </div> |
---|
291 | </div> |
---|
292 | <div id="pageFooter"> |
---|
293 | </div> |
---|
294 | </body> |
---|
295 | </html> |
---|