From 9d2f684ac705793b7a2c96d614f6859b5b7e7dee Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 11 Jul 2018 13:04:13 +0000 Subject: [PATCH] Streaming: Change enforce protocol default to true --- .../src/net/i2p/client/streaming/impl/ConnectionManager.java | 3 +-- .../src/net/i2p/client/streaming/impl/ConnectionOptions.java | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionManager.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionManager.java index c57992aaa..42cece4f5 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionManager.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionManager.java @@ -97,11 +97,10 @@ class ConnectionManager { _connectionHandler = new ConnectionHandler(_context, this, _timer); _tcbShare = new TCBShare(_context, _timer); // PROTO_ANY is for backward compatibility (pre-0.7.1) - // TODO change proto to PROTO_STREAMING someday. - // Right now we get everything, and rely on Datagram to specify PROTO_UDP. // PacketQueue has sent PROTO_STREAMING since the beginning of mux support (0.7.1) // As of 0.9.1, new option to enforce streaming protocol, off by default // As of 0.9.1, listen on configured port (default 0 = all) + // enforce protocol default changed to true in 0.9.36 int protocol = defaultOptions.getEnforceProtocol() ? I2PSession.PROTO_STREAMING : I2PSession.PROTO_ANY; _session.addMuxedSessionListener(_messageHandler, protocol, defaultOptions.getLocalPort()); _outboundQueue = new PacketQueue(_context, _timer); diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java index dbf12fb43..6f88b5bc7 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java @@ -155,9 +155,10 @@ class ConnectionOptions extends I2PSocketOptionsImpl { /** * If PROTO is enforced, we cannot communicate with destinations earlier than version 0.7.1. + * Default true as of 0.9.36. * @since 0.9.1 */ - private static final boolean DEFAULT_ENFORCE_PROTO = false; + private static final boolean DEFAULT_ENFORCE_PROTO = true; private final int _trend[] = new int[TREND_COUNT]; @@ -523,7 +524,7 @@ class ConnectionOptions extends I2PSocketOptionsImpl { /** * Do we receive all traffic, or only traffic marked with I2PSession.PROTO_STREAMING (6) ? - * Default false. + * Default true. * If PROTO is enforced, we cannot communicate with destinations earlier than version 0.7.1 * (released March 2009), which is when streaming started sending the PROTO_STREAMING indication. * Set to true if you are running multiple protocols on a single Destination.