From 44d6d4405e299123d81341b103c5b99d3351a62e Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 5 Dec 2017 13:45:22 +0300 Subject: [PATCH 1/9] Don't meddle with stdlib Forgotten part of #1014: -stdlib should not be changed. It breaks build on e.g. FreeBSD where libc++ is used. --- build/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index db0fd33f..e7b5eb9a 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -461,12 +461,6 @@ if (WITH_BINARY) fixup_bundle(\"${APPS}\" \"\" \"${DIRS}\") " COMPONENT Runtime) endif () - - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - if (NOT (MSVC OR MSYS OR APPLE)) # for Clang build on Linux - target_link_libraries("${PROJECT_NAME}" stdc++) - endif() - endif() endif () install(FILES ../LICENSE From c0c0642bd11c9ca9321614f5f7bb4677cd6d5a12 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Wed, 6 Dec 2017 02:12:27 +0300 Subject: [PATCH 2/9] temporary disable osx build due to of big waiting time of VM --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7dd14872..c55f1885 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ cache: apt: true os: - linux -- osx +#- osx dist: trusty sudo: required compiler: From 18b6353803bee7cfcdddd50ff21b127e2a7aad61 Mon Sep 17 00:00:00 2001 From: yangfl Date: Thu, 7 Dec 2017 21:26:28 +0800 Subject: [PATCH 3/9] fix typo --- ChangeLog | 4 ++-- android/jni/Application.mk | 2 +- build/build_mingw.cmd | 2 +- build/docker/README.md | 2 +- contrib/debian/i2pd.service | 2 +- docs/Doxyfile | 2 +- libi2pd/Config.h | 2 +- libi2pd/Destination.h | 2 +- libi2pd/NetDb.cpp | 2 +- libi2pd/Reseed.cpp | 2 +- libi2pd/Transports.cpp | 2 +- libi2pd_client/I2PTunnel.cpp | 2 +- libi2pd_client/SOCKS.cpp | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 487734ad..2ff1af50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -162,12 +162,12 @@ - Configurable limit of transit tunnels ### Changed -- Speed-up of assymetric crypto for non-x64 platforms +- Speed-up of asymmetric crypto for non-x64 platforms - Refactoring of web-console ## [2.6.0] - 2016-03-31 ### Added -- Gracefull shutdown on SIGINT +- Graceful shutdown on SIGINT - Numeric bandwidth limits (was: by router class) - Jumpservices in web-console - Logging to syslog diff --git a/android/jni/Application.mk b/android/jni/Application.mk index 25f2bb71..0fa116c2 100755 --- a/android/jni/Application.mk +++ b/android/jni/Application.mk @@ -11,7 +11,7 @@ NDK_TOOLCHAIN_VERSION := 4.9 # APP_STL := stlport_shared --> does not seem to contain C++11 features APP_STL := gnustl_shared -# Enable c++11 extentions in source code +# Enable c++11 extensions in source code APP_CPPFLAGS += -std=c++11 APP_CPPFLAGS += -DANDROID -D__ANDROID__ -DUSE_UPNP diff --git a/build/build_mingw.cmd b/build/build_mingw.cmd index 7015954f..6763b63e 100644 --- a/build/build_mingw.cmd +++ b/build/build_mingw.cmd @@ -6,7 +6,7 @@ REM Copyright (c) 2013-2017, The PurpleI2P Project REM This file is part of Purple i2pd project and licensed under BSD3 REM See full license text in LICENSE file at top of project tree -REM To use that script, you must have installed in your MSYS installation theese packages: +REM To use that script, you must have installed in your MSYS installation these packages: REM Base: git make zip REM x86_64: mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-gcc REM i686: mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-gcc diff --git a/build/docker/README.md b/build/docker/README.md index df2cdc01..877a9ce5 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -28,7 +28,7 @@ Options are set via docker environment variables. This can be set at run with -e **Logging** -Logging happens to STDOUT as the best practise with docker containers, since infrastructure systems like kubernetes with ELK integration can automaticly forward the log to say, kibana or greylog without manual setup. :) +Logging happens to STDOUT as the best practise with docker containers, since infrastructure systems like kubernetes with ELK integration can automatically forward the log to say, kibana or greylog without manual setup. :) diff --git a/contrib/debian/i2pd.service b/contrib/debian/i2pd.service index 4580aa80..89562ff5 100644 --- a/contrib/debian/i2pd.service +++ b/contrib/debian/i2pd.service @@ -14,7 +14,7 @@ PIDFile=/var/run/i2pd/i2pd.pid ### Uncomment, if auto restart needed #Restart=on-failure -### Use SIGINT for gracefull stop daemon. +### Use SIGINT for graceful stop daemon. # i2pd stops accepting new tunnels and waits ~10 min while old ones do not die. KillSignal=SIGINT TimeoutStopSec=10m diff --git a/docs/Doxyfile b/docs/Doxyfile index 9df84656..c434d2dc 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -1638,7 +1638,7 @@ EXTRA_PACKAGES = # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, # $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to +# for the replacement values of the other commands the user is referred to # HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. diff --git a/libi2pd/Config.h b/libi2pd/Config.h index 754618d7..c920c6fe 100644 --- a/libi2pd/Config.h +++ b/libi2pd/Config.h @@ -47,7 +47,7 @@ namespace config { * @brief Load and parse given config file * @param path Path to config file * - * If error occured when opening file path is points to, + * If error occurred when opening file path is points to, * we show the error message and terminate program. * * In case of parameter misuse boost throws an exception. diff --git a/libi2pd/Destination.h b/libi2pd/Destination.h index d11b10dd..d3122b3b 100644 --- a/libi2pd/Destination.h +++ b/libi2pd/Destination.h @@ -29,7 +29,7 @@ namespace client const uint8_t PROTOCOL_TYPE_DATAGRAM = 17; const uint8_t PROTOCOL_TYPE_RAW = 18; const int PUBLISH_CONFIRMATION_TIMEOUT = 5; // in seconds - const int PUBLISH_VERIFICATION_TIMEOUT = 10; // in seconds after successfull publish + const int PUBLISH_VERIFICATION_TIMEOUT = 10; // in seconds after successful publish const int PUBLISH_MIN_INTERVAL = 20; // in seconds const int PUBLISH_REGULAR_VERIFICATION_INTERNAL = 100; // in seconds periodically const int LEASESET_REQUEST_TIMEOUT = 5; // in seconds diff --git a/libi2pd/NetDb.cpp b/libi2pd/NetDb.cpp index 97ef0280..47baaac7 100644 --- a/libi2pd/NetDb.cpp +++ b/libi2pd/NetDb.cpp @@ -783,7 +783,7 @@ namespace data uint8_t flag = buf[64]; - LogPrint (eLogDebug, "NetDb: DatabaseLookup for ", key, " recieved flags=", (int)flag); + LogPrint (eLogDebug, "NetDb: DatabaseLookup for ", key, " received flags=", (int)flag); uint8_t lookupType = flag & DATABASE_LOOKUP_TYPE_FLAGS_MASK; const uint8_t * excluded = buf + 65; uint32_t replyTunnelID = 0; diff --git a/libi2pd/Reseed.cpp b/libi2pd/Reseed.cpp index 21fa790e..68a582ee 100644 --- a/libi2pd/Reseed.cpp +++ b/libi2pd/Reseed.cpp @@ -320,7 +320,7 @@ namespace data s.seekg (pos, std::ios::beg); // back to compressed data } - LogPrint (eLogDebug, "Reseed: Proccessing file ", localFileName, " ", compressedSize, " bytes"); + LogPrint (eLogDebug, "Reseed: Processing file ", localFileName, " ", compressedSize, " bytes"); if (!compressedSize) { LogPrint (eLogWarning, "Reseed: Unexpected size 0. Skipped"); diff --git a/libi2pd/Transports.cpp b/libi2pd/Transports.cpp index bb94036a..982d0945 100644 --- a/libi2pd/Transports.cpp +++ b/libi2pd/Transports.cpp @@ -63,7 +63,7 @@ namespace transport else { std::unique_lock l(m_AcquiredMutex); - m_Acquired.wait (l); // wait for element gets aquired + m_Acquired.wait (l); // wait for element gets acquired } } } diff --git a/libi2pd_client/I2PTunnel.cpp b/libi2pd_client/I2PTunnel.cpp index da5dbfee..8117a755 100644 --- a/libi2pd_client/I2PTunnel.cpp +++ b/libi2pd_client/I2PTunnel.cpp @@ -844,7 +844,7 @@ namespace client LogPrint(eLogWarning, "UDP Client: not tracking udp session using port ", (int) toPort); } else - LogPrint(eLogWarning, "UDP Client: unwarrented traffic from ", from.GetIdentHash().ToBase32()); + LogPrint(eLogWarning, "UDP Client: unwarranted traffic from ", from.GetIdentHash().ToBase32()); } I2PUDPClientTunnel::~I2PUDPClientTunnel() { diff --git a/libi2pd_client/SOCKS.cpp b/libi2pd_client/SOCKS.cpp index e63c369f..631d3e5c 100644 --- a/libi2pd_client/SOCKS.cpp +++ b/libi2pd_client/SOCKS.cpp @@ -554,7 +554,7 @@ namespace proxy void SOCKSHandler::HandleSockRecv(const boost::system::error_code & ecode, std::size_t len) { - LogPrint(eLogDebug, "SOCKS: recieved ", len, " bytes"); + LogPrint(eLogDebug, "SOCKS: received ", len, " bytes"); if(ecode) { LogPrint(eLogWarning, "SOCKS: recv got error: ", ecode); From fc73dabc0b121787d2b3ec4e7e479fcb1ee5bfbf Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sat, 9 Dec 2017 07:42:32 -0500 Subject: [PATCH 4/9] Use transient destinations by default instead of shared local destination --- libi2pd_client/ClientContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi2pd_client/ClientContext.cpp b/libi2pd_client/ClientContext.cpp index f823a92b..db3a129d 100644 --- a/libi2pd_client/ClientContext.cpp +++ b/libi2pd_client/ClientContext.cpp @@ -495,7 +495,7 @@ namespace client int port = section.second.get (I2P_CLIENT_TUNNEL_PORT); // optional params bool matchTunnels = section.second.get(I2P_CLIENT_TUNNEL_MATCH_TUNNELS, false); - std::string keys = section.second.get (I2P_CLIENT_TUNNEL_KEYS, ""); + std::string keys = section.second.get (I2P_CLIENT_TUNNEL_KEYS, "transient"); std::string address = section.second.get (I2P_CLIENT_TUNNEL_ADDRESS, "127.0.0.1"); int destinationPort = section.second.get (I2P_CLIENT_TUNNEL_DESTINATION_PORT, 0); i2p::data::SigningKeyType sigType = section.second.get (I2P_CLIENT_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256); From 60ef70cee48b73c68cba495ef9c4e87905c04b9e Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 10 Dec 2017 08:46:13 -0500 Subject: [PATCH 5/9] gradle build added --- android/build.gradle | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 android/build.gradle diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 00000000..f6bff2ee --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,38 @@ +buildscript { + repositories { + mavenCentral() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.1.2' + } +} + +apply plugin: 'com.android.application' + +android { + compileSdkVersion 25 + buildToolsVersion "25.0.2" + defaultConfig { + applicationId "org.purplei2p.i2pd" + targetSdkVersion 25 + minSdkVersion 14 + versionCode 1 + versionName "2.17.1" + } + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + res.srcDirs = ['res'] + jniLibs.srcDirs = ['libs'] + } + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' + } + } +} + From 6632b71273413760e895a8d5f091eb733b06f052 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 10 Dec 2017 09:01:13 -0500 Subject: [PATCH 6/9] gradle relese build --- android/build.gradle | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index f6bff2ee..a88403fd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -28,11 +28,20 @@ android { jniLibs.srcDirs = ['libs'] } } - buildTypes { + signingConfigs { + orignal { + storeFile file("i2pdapk.jks") + storePassword "android" + keyAlias "i2pdapk" + keyPassword "android" + } + } + buildTypes { release { minifyEnabled false + signingConfig signingConfigs.orignal proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' } - } + } } From 511499d950d0fc85742ed18b0988e57c07918fa8 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 11 Dec 2017 19:59:06 +0300 Subject: [PATCH 7/9] Reorder preprocessor conditions in libi2pd/I2PEndian.h The problem is that __FreeBSD_kernel__ may be defined on FreeBSD as well, while it always needs --- libi2pd/I2PEndian.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libi2pd/I2PEndian.h b/libi2pd/I2PEndian.h index 2b34895f..e5271233 100644 --- a/libi2pd/I2PEndian.h +++ b/libi2pd/I2PEndian.h @@ -3,10 +3,10 @@ #include #include -#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) -#include -#elif __FreeBSD__ +#if defined(__FreeBSD__) #include +#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) +#include #elif defined(__APPLE__) && defined(__MACH__) #include From 0f2d2156e6b4c75568a8c87606b1196cabff1948 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 11 Dec 2017 22:34:48 +0300 Subject: [PATCH 8/9] Don't use deprecated boost::asio::ssl::context ctor This was removed in boost 1.66, in prior versions the service argument was not used --- daemon/I2PControl.cpp | 2 +- libi2pd/Reseed.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/I2PControl.cpp b/daemon/I2PControl.cpp index 3d06b97a..7ba6ebea 100644 --- a/daemon/I2PControl.cpp +++ b/daemon/I2PControl.cpp @@ -35,7 +35,7 @@ namespace client I2PControlService::I2PControlService (const std::string& address, int port): m_IsRunning (false), m_Thread (nullptr), m_Acceptor (m_Service, boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string(address), port)), - m_SSLContext (m_Service, boost::asio::ssl::context::sslv23), + m_SSLContext (boost::asio::ssl::context::sslv23), m_ShutdownTimer (m_Service) { i2p::config::GetOption("i2pcontrol.password", m_Password); diff --git a/libi2pd/Reseed.cpp b/libi2pd/Reseed.cpp index 68a582ee..12888cef 100644 --- a/libi2pd/Reseed.cpp +++ b/libi2pd/Reseed.cpp @@ -522,7 +522,7 @@ namespace data boost::asio::io_service service; boost::system::error_code ecode; - boost::asio::ssl::context ctx(service, boost::asio::ssl::context::sslv23); + boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23); ctx.set_verify_mode(boost::asio::ssl::context::verify_none); boost::asio::ssl::stream s(service, ctx); From 50e4fb138a48ce07a89c19d1f5c8888cec3dae78 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Wed, 13 Dec 2017 15:17:45 +0300 Subject: [PATCH 9/9] close #1032 (#1034) --- daemon/HTTPServer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index 224744b7..5faa8b7f 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -316,8 +316,9 @@ namespace http { if (dest) { auto ident = dest->GetIdentHash (); - s << ""; - s << i2p::client::context.GetAddressBook ().ToAddress(ident) << "
\r\n" << std::endl; + auto& name = dest->GetNickname (); + s << "[ "; + s << name << " ] ⇔ " << i2p::client::context.GetAddressBook ().ToAddress(ident) <<"
\r\n" << std::endl; } } }