From 83bd3c21ca6fc92d3d87567113f226a811effd56 Mon Sep 17 00:00:00 2001 From: Meeh Date: Fri, 31 Jan 2014 07:31:06 +0100 Subject: [PATCH] Adding more reseed hosts Ignore zip files --- Reseed.cpp | 4 ++++ Reseed.h | 10 +++++++++- util.cpp | 6 +----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Reseed.cpp b/Reseed.cpp index cc61e4ef..05825f6a 100644 --- a/Reseed.cpp +++ b/Reseed.cpp @@ -40,9 +40,13 @@ namespace data std::string routerInfo; std::string tmpUrl; std::string filename; + std::string ignoreFileSuffix = ".zip"; while (i != j) { + //TODO: Ugly code, try to clean up. name = *i++; + if (name.find(ignoreFileSuffix)!=std::string::npos) + continue; LogPrint("Downloading ", name); tmpUrl = reseedHost; tmpUrl.append(name); diff --git a/Reseed.h b/Reseed.h index ac5a7cd7..96ce9c55 100644 --- a/Reseed.h +++ b/Reseed.h @@ -18,7 +18,15 @@ namespace data private: std::vector httpReseedHostList = { "http://193.150.121.66/netDb/", - "http://netdb.i2p2.no/" + "http://netdb.i2p2.no/", + "http://reseed.i2p-projekt.de/", + "http://cowpuncher.drollette.com/netdb/", + "http://i2p.mooo.com/netDb/", + "http://reseed.info/", + "http://reseed.pkol.de/", + "http://uk.reseed.i2p2.no/", + "http://i2p-netdb.innovatio.no/", + "http://ieb9oopo.mooo.com" }; }; diff --git a/util.cpp b/util.cpp index a101dfe4..5834e2ab 100644 --- a/util.cpp +++ b/util.cpp @@ -49,11 +49,7 @@ const char* GetCharArg(const std::string& strArg, const std::string& nDefault) namespace http { -//const std::string& filename -//AddRouterInfo ((uint8_t *)ss.str ().c_str (), ss.str ().size ()); - //TODO: Move to reseed. - //TODO: Implement v1 & v2 reseeding. Lightweight zip library is needed for v2. - // orignal: zip is part of crypto++, see implementation of DatabaseStoreMsg + //TODO: Implement v2 reseeding. Lightweight zip library is needed. //TODO: Implement SU3, utils. std::string httpRequest(const std::string& address) {