From d1e1ce4cdbb0bd5cb640798dec34ededc1cca857 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 May 2015 10:35:48 +1000 Subject: [PATCH] Add option to disable native code. --- .../main/java/net/md_5/bungee/BungeeCord.java | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index 5b320508..8fc2f882 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -199,19 +199,22 @@ public class BungeeCord extends ProxyServer System.setErr( new PrintStream( new LoggingOutputStream( logger, Level.SEVERE ), true ) ); System.setOut( new PrintStream( new LoggingOutputStream( logger, Level.INFO ), true ) ); - if ( EncryptionUtil.nativeFactory.load() ) + if ( !Boolean.getBoolean( "net.md_5.bungee.native.disable" ) ) { - logger.info( "Using OpenSSL based native cipher." ); - } else - { - logger.info( "Using standard Java JCE cipher. To enable the OpenSSL based native cipher, please make sure you are using 64 bit Ubuntu or Debian with libssl installed." ); - } - if ( CompressFactory.zlib.load() ) - { - logger.info( "Using native code compressor" ); - } else - { - logger.info( "Using standard Java compressor. To enable zero copy compression, run on 64 bit Linux" ); + if ( EncryptionUtil.nativeFactory.load() ) + { + logger.info( "Using OpenSSL based native cipher." ); + } else + { + logger.info( "Using standard Java JCE cipher. To enable the OpenSSL based native cipher, please make sure you are using 64 bit Ubuntu or Debian with libssl installed." ); + } + if ( CompressFactory.zlib.load() ) + { + logger.info( "Using native code compressor" ); + } else + { + logger.info( "Using standard Java compressor. To enable zero copy compression, run on 64 bit Linux" ); + } } }