forked from I2P_Developers/i2p.i2p
Tunnels: Enable sending short tunnel build messages,
remove debug settings
This commit is contained in:
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Git";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 0;
|
||||
public final static long BUILD = 1;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -105,9 +105,6 @@ class BuildHandler implements Runnable {
|
||||
|
||||
private static final long JOB_LAG_LIMIT_TUNNEL = 350;
|
||||
|
||||
// TODO remove when finished
|
||||
private static final boolean HANDLE_SHORT = true;
|
||||
|
||||
public BuildHandler(RouterContext ctx, TunnelPoolManager manager, BuildExecutor exec) {
|
||||
_context = ctx;
|
||||
_log = ctx.logManager().getLog(getClass());
|
||||
@ -977,11 +974,6 @@ class BuildHandler implements Runnable {
|
||||
// TODO options
|
||||
Properties props = EmptyProperties.INSTANCE;
|
||||
if (state.msg.getType() == ShortTunnelBuildMessage.MESSAGE_TYPE) {
|
||||
if (!HANDLE_SHORT) {
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("Unsupported STBM");
|
||||
return;
|
||||
}
|
||||
reply = BuildResponseRecord.createShort(_context, response, req.getChaChaReplyKey(), req.getChaChaReplyAD(), props, ourSlot);
|
||||
} else {
|
||||
reply = BuildResponseRecord.create(_context, response, req.getChaChaReplyKey(), req.getChaChaReplyAD(), props);
|
||||
|
@ -40,8 +40,6 @@ abstract class BuildRequestor {
|
||||
private static final List<Integer> ORDER = new ArrayList<Integer>(TunnelBuildMessage.MAX_RECORD_COUNT);
|
||||
private static final String MIN_NEWTBM_VERSION = "0.9.51";
|
||||
private static final boolean SEND_VARIABLE = true;
|
||||
// TODO remove when finished
|
||||
private static final boolean SEND_SHORT = false;
|
||||
private static final int SHORT_RECORDS = 4;
|
||||
private static final List<Integer> SHORT_ORDER = new ArrayList<Integer>(SHORT_RECORDS);
|
||||
/** 5 (~2600 bytes) fits nicely in 3 tunnel messages */
|
||||
@ -338,8 +336,7 @@ abstract class BuildRequestor {
|
||||
long replyTunnel = 0;
|
||||
Hash replyRouter;
|
||||
boolean useVariable = SEND_VARIABLE && cfg.getLength() <= MEDIUM_RECORDS;
|
||||
boolean useShortTBM = (SEND_SHORT || ctx.getBooleanProperty("router.useShortTBM")) &&
|
||||
ctx.keyManager().getPublicKey().getType() == EncType.ECIES_X25519;
|
||||
boolean useShortTBM = ctx.keyManager().getPublicKey().getType() == EncType.ECIES_X25519;
|
||||
if (useShortTBM && !cfg.isInbound() && !pool.getSettings().isExploratory()) {
|
||||
// client must be EC also to get garlic OTBRM reply
|
||||
LeaseSetKeys lsk = ctx.keyManager().getKeys(pool.getSettings().getDestination());
|
||||
|
Reference in New Issue
Block a user