forked from I2P_Developers/i2p.i2p
i2ptunnel filter tweaks
This commit is contained in:
@@ -258,6 +258,7 @@ public class IndexBean {
|
|||||||
// give the messages a chance to make it to the window
|
// give the messages a chance to make it to the window
|
||||||
try { Thread.sleep(1000); } catch (InterruptedException ie) {}
|
try { Thread.sleep(1000); } catch (InterruptedException ie) {}
|
||||||
// and give them something to look at in any case
|
// and give them something to look at in any case
|
||||||
|
// FIXME name will be HTML escaped twice
|
||||||
return _("Starting tunnel") + ' ' + getTunnelName(_tunnel) + "...";
|
return _("Starting tunnel") + ' ' + getTunnelName(_tunnel) + "...";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,6 +272,7 @@ public class IndexBean {
|
|||||||
// give the messages a chance to make it to the window
|
// give the messages a chance to make it to the window
|
||||||
try { Thread.sleep(1000); } catch (InterruptedException ie) {}
|
try { Thread.sleep(1000); } catch (InterruptedException ie) {}
|
||||||
// and give them something to look at in any case
|
// and give them something to look at in any case
|
||||||
|
// FIXME name will be HTML escaped twice
|
||||||
return _("Stopping tunnel") + ' ' + getTunnelName(_tunnel) + "...";
|
return _("Stopping tunnel") + ' ' + getTunnelName(_tunnel) + "...";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,6 +354,7 @@ public class IndexBean {
|
|||||||
List<String> msgs = doSave();
|
List<String> msgs = doSave();
|
||||||
if (ksMsg != null)
|
if (ksMsg != null)
|
||||||
msgs.add(ksMsg);
|
msgs.add(ksMsg);
|
||||||
|
// FIXME name will be HTML escaped twice
|
||||||
return getMessages(msgs);
|
return getMessages(msgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,7 +405,8 @@ public class IndexBean {
|
|||||||
name = Long.toString(_context.clock().now());
|
name = Long.toString(_context.clock().now());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
name = "i2ptunnel-deleted-" + name.replace(' ', '_') + '-' + _context.clock().now() + "-privkeys.dat";
|
name = name.replace(' ', '_').replace(':', '_').replace("..", "_").replace('/', '_').replace('\\', '_');
|
||||||
|
name = "i2ptunnel-deleted-" + name + '-' + _context.clock().now() + "-privkeys.dat";
|
||||||
File backupDir = new SecureFile(_context.getConfigDir(), TunnelController.KEY_BACKUP_DIR);
|
File backupDir = new SecureFile(_context.getConfigDir(), TunnelController.KEY_BACKUP_DIR);
|
||||||
File to;
|
File to;
|
||||||
if (backupDir.isDirectory() || backupDir.mkdir())
|
if (backupDir.isDirectory() || backupDir.mkdir())
|
||||||
@@ -451,13 +455,11 @@ public class IndexBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean allowCSS() {
|
public boolean allowCSS() {
|
||||||
String css = _context.getProperty(PROP_CSS_DISABLED);
|
return !_context.getBooleanProperty(PROP_CSS_DISABLED);
|
||||||
return (css == null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean allowJS() {
|
public boolean allowJS() {
|
||||||
String js = _context.getProperty(PROP_JS_DISABLED);
|
return !_context.getBooleanProperty(PROP_JS_DISABLED);
|
||||||
return (js == null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTunnelCount() {
|
public int getTunnelCount() {
|
||||||
@@ -727,8 +729,9 @@ public class IndexBean {
|
|||||||
_name = (name != null ? name.trim() : null);
|
_name = (name != null ? name.trim() : null);
|
||||||
}
|
}
|
||||||
/** one line description */
|
/** one line description */
|
||||||
public void setDescription(String description) {
|
public void setNofilter_description(String description) {
|
||||||
_description = (description != null ? description.trim() : null);
|
// '#' will blow up DataHelper.storeProps()
|
||||||
|
_description = (description != null ? description.replace('#', ' ').trim() : null);
|
||||||
}
|
}
|
||||||
/** I2CP host the router is on, ignored when in router context */
|
/** I2CP host the router is on, ignored when in router context */
|
||||||
public void setClientHost(String host) {
|
public void setClientHost(String host) {
|
||||||
|
@@ -79,7 +79,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
|
|||||||
<label for="description" accesskey="e">
|
<label for="description" accesskey="e">
|
||||||
<%=intl._("Description")%>:(<span class="accessKey">E</span>)
|
<%=intl._("Description")%>:(<span class="accessKey">E</span>)
|
||||||
</label>
|
</label>
|
||||||
<input type="text" size="60" maxlength="80" name="description" id="description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext" />
|
<input type="text" size="60" maxlength="80" name="nofilter_description" id="description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="subdivider">
|
<div class="subdivider">
|
||||||
|
@@ -79,7 +79,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
|
|||||||
<label for="description" accesskey="e">
|
<label for="description" accesskey="e">
|
||||||
<%=intl._("Description")%>(<span class="accessKey">e</span>):
|
<%=intl._("Description")%>(<span class="accessKey">e</span>):
|
||||||
</label>
|
</label>
|
||||||
<input type="text" size="60" maxlength="80" name="description" id="description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext" />
|
<input type="text" size="60" maxlength="80" name="nofilter_description" id="description" title="Tunnel Description" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext" />
|
||||||
</div>
|
</div>
|
||||||
<div id="startupField" class="rowItem">
|
<div id="startupField" class="rowItem">
|
||||||
<label for="startOnLoad" accesskey="a">
|
<label for="startOnLoad" accesskey="a">
|
||||||
|
@@ -233,11 +233,11 @@
|
|||||||
<label for="description" accesskey="e">
|
<label for="description" accesskey="e">
|
||||||
<%=intl._("Description")%>:(<span class="accessKey">E</span>)
|
<%=intl._("Description")%>:(<span class="accessKey">E</span>)
|
||||||
</label>
|
</label>
|
||||||
<input type="text" size="60" maxlength="80" name="description" id="description" title="Tunnel Description" value="<%=(!"null".equals(request.getParameter("description")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("description")) : "" ) %>" class="freetext" />
|
<input type="text" size="60" maxlength="80" name="nofilter_description" id="description" title="Tunnel Description" value="<%=(!"null".equals(request.getParameter("description")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("description")) : "" ) %>" class="freetext" />
|
||||||
</div><%
|
</div><%
|
||||||
} else {
|
} else {
|
||||||
%><input type="hidden" name="name" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%>" />
|
%><input type="hidden" name="name" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%>" />
|
||||||
<input type="hidden" name="description" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("description"))%>" /><%
|
<input type="hidden" name="nofilter_description" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("description"))%>" /><%
|
||||||
} /* curPage 3 */
|
} /* curPage 3 */
|
||||||
|
|
||||||
/* End page 3 */ %>
|
/* End page 3 */ %>
|
||||||
@@ -484,7 +484,7 @@
|
|||||||
<input type="hidden" name="tunnelBackupQuantity" value="0" />
|
<input type="hidden" name="tunnelBackupQuantity" value="0" />
|
||||||
<input type="hidden" name="clientHost" value="internal" />
|
<input type="hidden" name="clientHost" value="internal" />
|
||||||
<input type="hidden" name="clientport" value="internal" />
|
<input type="hidden" name="clientport" value="internal" />
|
||||||
<input type="hidden" name="customOptions" value="" />
|
<input type="hidden" name="nofilter_customOptions" value="" />
|
||||||
|
|
||||||
<%
|
<%
|
||||||
if (!"streamrclient".equals(tunnelType)) {
|
if (!"streamrclient".equals(tunnelType)) {
|
||||||
@@ -501,9 +501,9 @@
|
|||||||
}
|
}
|
||||||
if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) {
|
if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) {
|
||||||
%><input type="hidden" name="proxyUsername" value="" />
|
%><input type="hidden" name="proxyUsername" value="" />
|
||||||
<input type="hidden" name="proxyPassword" value="" />
|
<input type="hidden" name="nofilter_proxyPassword" value="" />
|
||||||
<input type="hidden" name="outproxyUsername" value="" />
|
<input type="hidden" name="outproxyUsername" value="" />
|
||||||
<input type="hidden" name="outproxyPassword" value="" /><%
|
<input type="hidden" name="nofilter_outproxyPassword" value="" /><%
|
||||||
}
|
}
|
||||||
if ("httpclient".equals(tunnelType)) {
|
if ("httpclient".equals(tunnelType)) {
|
||||||
%><input type="hidden" name="jumpList" value="http://i2host.i2p/cgi-bin/i2hostjump?
|
%><input type="hidden" name="jumpList" value="http://i2host.i2p/cgi-bin/i2hostjump?
|
||||||
|
Reference in New Issue
Block a user