propagate from branch 'i2p.i2p.zzz.test' (head eb755dae363d71808cb93ae1c6c976c1ec5df5d2)
to branch 'i2p.i2p' (head 25097fabfedcbe372d42dcddaf89b5279e9285e4)
This commit is contained in:
@ -49,7 +49,7 @@ public class PeerHelper {
|
||||
return "ERROR: The UDP port is already in use. Set i2np.udp.internalPort=xxxx to a different value in the advanced config and restart";
|
||||
case CommSystemFacade.STATUS_UNKNOWN: // fallthrough
|
||||
default:
|
||||
ra = context.router().getRouterInfo().getTargetAddress("UDP");
|
||||
ra = context.router().getRouterInfo().getTargetAddress("SSU");
|
||||
if (ra == null && context.router().getUptime() > 5*60*1000) {
|
||||
if (context.getProperty(PROP_I2NP_NTCP_HOSTNAME) == null ||
|
||||
context.getProperty(PROP_I2NP_NTCP_PORT) == null)
|
||||
|
@ -39,7 +39,7 @@ public class I2PTunnelClient extends I2PTunnelClientBase {
|
||||
return;
|
||||
}
|
||||
|
||||
StringTokenizer tok = new StringTokenizer(destinations, ",");
|
||||
StringTokenizer tok = new StringTokenizer(destinations, ", ");
|
||||
dests = new ArrayList(1);
|
||||
while (tok.hasMoreTokens()) {
|
||||
String destination = tok.nextToken();
|
||||
|
@ -345,7 +345,9 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
|
||||
public I2PSocket createI2PSocket(Destination dest) throws I2PException, ConnectException, NoRouteToHostException, InterruptedIOException {
|
||||
if (sockMgr == null) {
|
||||
// we need this before getDefaultOptions()
|
||||
sockMgr = getSocketManager();
|
||||
synchronized(sockLock) {
|
||||
sockMgr = getSocketManager();
|
||||
}
|
||||
}
|
||||
return createI2PSocket(dest, getDefaultOptions());
|
||||
}
|
||||
@ -369,9 +371,12 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
|
||||
|
||||
if (sockMgr == null) {
|
||||
// delayed open - call get instead of build because the locking is up there
|
||||
sockMgr = getSocketManager();
|
||||
} else if (Boolean.valueOf(getTunnel().getClientOptions().getProperty("i2cp.newDestOnResume")).booleanValue()) {
|
||||
synchronized(sockMgr) {
|
||||
synchronized(sockLock) {
|
||||
sockMgr = getSocketManager();
|
||||
}
|
||||
} else if (Boolean.valueOf(getTunnel().getClientOptions().getProperty("i2cp.closeOnIdle")).booleanValue() &&
|
||||
Boolean.valueOf(getTunnel().getClientOptions().getProperty("i2cp.newDestOnResume")).booleanValue()) {
|
||||
synchronized(sockLock) {
|
||||
I2PSocketManager oldSockMgr = sockMgr;
|
||||
// This will build a new socket manager and a new dest if the session is closed.
|
||||
sockMgr = getSocketManager();
|
||||
|
@ -211,8 +211,11 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
|
||||
if (!defaultOpts.contains("i2p.streaming.inactivityTimeout"))
|
||||
defaultOpts.setProperty("i2p.streaming.inactivityTimeout", ""+DEFAULT_READ_TIMEOUT);
|
||||
// delayed start
|
||||
if (sockMgr == null)
|
||||
sockMgr = getSocketManager();
|
||||
if (sockMgr == null) {
|
||||
synchronized(sockLock) {
|
||||
sockMgr = getSocketManager();
|
||||
}
|
||||
}
|
||||
I2PSocketOptions opts = sockMgr.buildOptions(defaultOpts);
|
||||
if (!defaultOpts.containsKey(I2PSocketOptions.PROP_CONNECT_TIMEOUT))
|
||||
opts.setConnectTimeout(DEFAULT_CONNECT_TIMEOUT);
|
||||
|
@ -153,7 +153,9 @@ public class EditBean extends IndexBean {
|
||||
}
|
||||
|
||||
public boolean getNewDest(int tunnel) {
|
||||
return getBooleanProperty(tunnel, "i2cp.newDestOnResume");
|
||||
return getBooleanProperty(tunnel, "i2cp.newDestOnResume") &&
|
||||
getBooleanProperty(tunnel, "i2cp.closeOnIdle") &&
|
||||
!getBooleanProperty(tunnel, "persistentClientKey");
|
||||
}
|
||||
|
||||
public boolean getPersistentClientKey(int tunnel) {
|
||||
|
@ -135,7 +135,7 @@ public class SummaryHelper extends HelperBase {
|
||||
return "ERR-UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart";
|
||||
case CommSystemFacade.STATUS_UNKNOWN: // fallthrough
|
||||
default:
|
||||
ra = _context.router().getRouterInfo().getTargetAddress("UDP");
|
||||
ra = _context.router().getRouterInfo().getTargetAddress("SSU");
|
||||
if (ra == null && _context.router().getUptime() > 5*60*1000) {
|
||||
if (_context.getProperty(ConfigNetHelper.PROP_I2NP_NTCP_HOSTNAME) == null ||
|
||||
_context.getProperty(ConfigNetHelper.PROP_I2NP_NTCP_PORT) == null)
|
||||
|
@ -17,6 +17,8 @@
|
||||
I2P <jsp:getProperty name="helper" property="version" /><br />
|
||||
<%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%><br />
|
||||
<%=System.getProperty("os.name")%> <%=System.getProperty("os.arch")%> <%=System.getProperty("os.version")%><br />
|
||||
CPU <%=net.i2p.util.NativeBigInteger.cpuModel()%> (<%=net.i2p.util.NativeBigInteger.cpuType()%>)<br />
|
||||
jbigi <%=net.i2p.util.NativeBigInteger.loadStatus()%><br />
|
||||
</p>
|
||||
<hr />
|
||||
<jsp:useBean class="net.i2p.router.web.LogsHelper" id="logsHelper" scope="request" />
|
||||
|
@ -37,7 +37,7 @@
|
||||
<echo message="Ignore any warning about /WEB-INF/web.xml not found" />
|
||||
<java classname="org.apache.jasper.JspC" fork="true" classpathref="cp">
|
||||
<arg value="-d" />
|
||||
<arg value="WEB-INF/classes" />
|
||||
<arg value="${tmp}" />
|
||||
<arg value="-v" />
|
||||
<arg value="-p" />
|
||||
<arg value="i2p.susi.dns.jsp" />
|
||||
@ -47,7 +47,7 @@
|
||||
<arg value="./jsp" />
|
||||
</java>
|
||||
<javac debug="true" deprecation="on" source="1.5" target="1.5"
|
||||
destdir="${bin}" srcdir="./WEB-INF/classes" includes="**/*.java" classpathref="cp">
|
||||
destdir="${bin}" srcdir="${tmp}" includes="**/*.java" classpathref="cp">
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
</javac>
|
||||
<copy file="WEB-INF/web-template.xml" tofile="WEB-INF/web-out.xml" />
|
||||
@ -85,6 +85,7 @@
|
||||
<fileset dir="WEB-INF" includes="web-fragment.xml, web-out.xml" />
|
||||
</delete>
|
||||
<delete dir="${bin}" />
|
||||
<delete dir="${tmp}" />
|
||||
</target>
|
||||
<target name="distclean" depends="clean" />
|
||||
</project>
|
||||
|
Reference in New Issue
Block a user