forked from I2P_Developers/i2p.i2p
I2CP: Move the port 7654 definition
This commit is contained in:
@@ -37,7 +37,6 @@ import java.util.jar.Manifest;
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.app.*;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.util.I2PAppThread;
|
||||
import net.i2p.util.PortMapper;
|
||||
import net.i2p.util.SimpleTimer2;
|
||||
@@ -243,7 +242,7 @@ public class BOB implements Runnable, ClientApp {
|
||||
save = true;
|
||||
}
|
||||
if (!props.containsKey(I2PClient.PROP_TCP_PORT)) {
|
||||
props.setProperty(I2PClient.PROP_TCP_PORT, Integer.toString(I2PSession.DEFAULT_LISTEN_PORT));
|
||||
props.setProperty(I2PClient.PROP_TCP_PORT, Integer.toString(I2PClient.DEFAULT_LISTEN_PORT));
|
||||
save = true;
|
||||
}
|
||||
if (!props.containsKey(PROP_BOB_PORT)) {
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.streaming.I2PServerSocket;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
import net.i2p.client.streaming.I2PSocketManagerFactory;
|
||||
@@ -97,7 +96,7 @@ public class MUXlisten implements Runnable {
|
||||
}
|
||||
|
||||
String i2cpHost = Q.getProperty(I2PClient.PROP_TCP_HOST, "127.0.0.1");
|
||||
int i2cpPort = I2PSession.DEFAULT_LISTEN_PORT;
|
||||
int i2cpPort = I2PClient.DEFAULT_LISTEN_PORT;
|
||||
String i2cpPortStr = Q.getProperty(I2PClient.PROP_TCP_PORT);
|
||||
if (i2cpPortStr != null) {
|
||||
try {
|
||||
|
||||
@@ -99,7 +99,7 @@ public class I2PSnarkUtil {
|
||||
_baseName = baseName;
|
||||
_opts = new HashMap<String, String>();
|
||||
//setProxy("127.0.0.1", 4444);
|
||||
setI2CPConfig("127.0.0.1", I2PSession.DEFAULT_LISTEN_PORT, null);
|
||||
setI2CPConfig("127.0.0.1", I2PClient.DEFAULT_LISTEN_PORT, null);
|
||||
_banlist = new ConcurrentHashSet<Hash>();
|
||||
_maxUploaders = Snark.MAX_TOTAL_UPLOADERS;
|
||||
_maxUpBW = SnarkManager.DEFAULT_MAX_UP_BW;
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.i2p.I2PAppContext;
|
||||
import net.i2p.app.ClientApp;
|
||||
import net.i2p.app.ClientAppManager;
|
||||
import net.i2p.app.ClientAppState;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.crypto.SHA1Hash;
|
||||
import net.i2p.crypto.SigType;
|
||||
import net.i2p.data.Base64;
|
||||
@@ -786,7 +786,7 @@ public class SnarkManager implements CompleteListener, ClientApp {
|
||||
if (!_config.containsKey(PROP_I2CP_HOST))
|
||||
_config.setProperty(PROP_I2CP_HOST, "127.0.0.1");
|
||||
if (!_config.containsKey(PROP_I2CP_PORT))
|
||||
_config.setProperty(PROP_I2CP_PORT, Integer.toString(I2PSession.DEFAULT_LISTEN_PORT));
|
||||
_config.setProperty(PROP_I2CP_PORT, Integer.toString(I2PClient.DEFAULT_LISTEN_PORT));
|
||||
if (!_config.containsKey(PROP_I2CP_OPTS))
|
||||
_config.setProperty(PROP_I2CP_OPTS, "inbound.length=3 outbound.length=3" +
|
||||
" inbound.quantity=" + DEFAULT_TUNNEL_QUANTITY +
|
||||
@@ -912,7 +912,7 @@ public class SnarkManager implements CompleteListener, ClientApp {
|
||||
|
||||
private void updateConfig() {
|
||||
String i2cpHost = _config.getProperty(PROP_I2CP_HOST);
|
||||
int i2cpPort = getInt(PROP_I2CP_PORT, I2PSession.DEFAULT_LISTEN_PORT);
|
||||
int i2cpPort = getInt(PROP_I2CP_PORT, I2PClient.DEFAULT_LISTEN_PORT);
|
||||
String opts = _config.getProperty(PROP_I2CP_OPTS);
|
||||
Map<String, String> i2cpOpts = new HashMap<String, String>();
|
||||
if (opts != null) {
|
||||
|
||||
@@ -97,7 +97,7 @@ public class I2PTunnel extends EventDispatcherImpl implements Logging {
|
||||
public boolean ownDest = false;
|
||||
|
||||
/** the I2CP port, non-null */
|
||||
public String port = System.getProperty(I2PClient.PROP_TCP_PORT, Integer.toString(I2PSession.DEFAULT_LISTEN_PORT));
|
||||
public String port = System.getProperty(I2PClient.PROP_TCP_PORT, Integer.toString(I2PClient.DEFAULT_LISTEN_PORT));
|
||||
/** the I2CP host, non-null */
|
||||
public String host = System.getProperty(I2PClient.PROP_TCP_HOST, "127.0.0.1");
|
||||
/** the listen-on host. Sadly the listen-on port does not have a field. */
|
||||
|
||||
@@ -409,7 +409,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
|
||||
Log _log = tunnel.getContext().logManager().getLog(I2PTunnelClientBase.class);
|
||||
Properties props = new Properties();
|
||||
props.putAll(tunnel.getClientOptions());
|
||||
int portNum = I2PSession.DEFAULT_LISTEN_PORT;
|
||||
int portNum = I2PClient.DEFAULT_LISTEN_PORT;
|
||||
if (tunnel.port != null) {
|
||||
try {
|
||||
portNum = Integer.parseInt(tunnel.port);
|
||||
@@ -471,7 +471,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
|
||||
// try to make this error sensible as it will happen...
|
||||
String portNum = getTunnel().port;
|
||||
if (portNum == null)
|
||||
portNum = Integer.toString(I2PSession.DEFAULT_LISTEN_PORT);
|
||||
portNum = Integer.toString(I2PClient.DEFAULT_LISTEN_PORT);
|
||||
String msg;
|
||||
if (getTunnel().getContext().isRouterContext())
|
||||
msg = "Unable to build tunnels for the client";
|
||||
|
||||
@@ -210,7 +210,7 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable {
|
||||
private I2PSocketManager createManager(InputStream privData) {
|
||||
Properties props = new Properties();
|
||||
props.putAll(getTunnel().getClientOptions());
|
||||
int portNum = I2PSession.DEFAULT_LISTEN_PORT;
|
||||
int portNum = I2PClient.DEFAULT_LISTEN_PORT;
|
||||
if (getTunnel().port != null) {
|
||||
try {
|
||||
portNum = Integer.parseInt(getTunnel().port);
|
||||
@@ -305,7 +305,7 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable {
|
||||
// try to make this error sensible as it will happen...
|
||||
String portNum = getTunnel().port;
|
||||
if (portNum == null)
|
||||
portNum = Integer.toString(I2PSession.DEFAULT_LISTEN_PORT);
|
||||
portNum = Integer.toString(I2PClient.DEFAULT_LISTEN_PORT);
|
||||
String msg;
|
||||
if (getTunnel().getContext().isRouterContext())
|
||||
msg = "Unable to build tunnels for the server at " + remoteHost.getHostAddress() + ':' + remotePort;
|
||||
|
||||
@@ -733,10 +733,10 @@ public class TunnelController implements Logging {
|
||||
int portNum = Integer.parseInt(port);
|
||||
_tunnel.port = String.valueOf(portNum);
|
||||
} catch (NumberFormatException nfe) {
|
||||
_tunnel.port = Integer.toString(I2PSession.DEFAULT_LISTEN_PORT);
|
||||
_tunnel.port = Integer.toString(I2PClient.DEFAULT_LISTEN_PORT);
|
||||
}
|
||||
} else {
|
||||
_tunnel.port = Integer.toString(I2PSession.DEFAULT_LISTEN_PORT);
|
||||
_tunnel.port = Integer.toString(I2PClient.DEFAULT_LISTEN_PORT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.crypto.KeyGenerator;
|
||||
import net.i2p.crypto.SigType;
|
||||
import net.i2p.data.Base64;
|
||||
@@ -837,7 +836,7 @@ public class TunnelConfig {
|
||||
if ( (_i2cpPort != null) && (_i2cpPort.trim().length() > 0) ) {
|
||||
config.setProperty(TunnelController.PROP_I2CP_PORT, _i2cpPort);
|
||||
} else {
|
||||
config.setProperty(TunnelController.PROP_I2CP_PORT, Integer.toString(I2PSession.DEFAULT_LISTEN_PORT));
|
||||
config.setProperty(TunnelController.PROP_I2CP_PORT, Integer.toString(I2PClient.DEFAULT_LISTEN_PORT));
|
||||
}
|
||||
}
|
||||
if (_privKeyFile != null)
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.crypto.SigType;
|
||||
import net.i2p.data.Base64;
|
||||
import net.i2p.data.DataHelper;
|
||||
@@ -447,7 +447,7 @@ public class EditBean extends IndexBean {
|
||||
if (tun != null)
|
||||
return tun.getI2CPPort();
|
||||
else
|
||||
return Integer.toString(I2PSession.DEFAULT_LISTEN_PORT);
|
||||
return Integer.toString(I2PClient.DEFAULT_LISTEN_PORT);
|
||||
}
|
||||
|
||||
public String getCustomOptions(int tunnel) {
|
||||
|
||||
@@ -275,7 +275,7 @@ public class I2PSocketManagerFactory {
|
||||
}
|
||||
|
||||
private static int getPort() {
|
||||
int i2cpPort = I2PSession.DEFAULT_LISTEN_PORT;
|
||||
int i2cpPort = I2PClient.DEFAULT_LISTEN_PORT;
|
||||
String i2cpPortStr = System.getProperty(I2PClient.PROP_TCP_PORT);
|
||||
if (i2cpPortStr != null) {
|
||||
try {
|
||||
|
||||
@@ -146,7 +146,7 @@ class SAMStreamSession implements SAMMessageSess {
|
||||
allprops.putAll(props);
|
||||
|
||||
String i2cpHost = allprops.getProperty(I2PClient.PROP_TCP_HOST, "127.0.0.1");
|
||||
int i2cpPort = I2PSession.DEFAULT_LISTEN_PORT;
|
||||
int i2cpPort = I2PClient.DEFAULT_LISTEN_PORT;
|
||||
String sport = allprops.getProperty(I2PClient.PROP_TCP_PORT);
|
||||
if (sport != null) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user