diff --git a/AddressBook.cpp b/AddressBook.cpp index dfd788bf..c6a06490 100644 --- a/AddressBook.cpp +++ b/AddressBook.cpp @@ -43,7 +43,7 @@ void AddressBook::LoadHostsFromI2P () content = i2p::util::http::httpRequest(url_ss.str()); // TODO: check http errors - if (! boost::starts_with(content, "")) + if (! boost::starts_with(content, "") && content.size() > 0) break; std::this_thread::sleep_for(std::chrono::seconds(5)); } diff --git a/build/i2pd.pro b/build/i2pd.pro new file mode 100644 index 00000000..2200ea89 --- /dev/null +++ b/build/i2pd.pro @@ -0,0 +1,83 @@ +TEMPLATE = app +CONFIG += console +CONFIG -= app_bundle +CONFIG -= qt + +TARGET = ./../../i2pd_qt + +QMAKE_CXXFLAGS += -std=c++0x + +LIBS += -lcrypto++ +LIBS += \ + -lboost_system\ + -lboost_filesystem\ + -lboost_regex\ + -lboost_program_options\ + -lpthread + +SOURCES += \ + ../LeaseSet.cpp \ + ../i2p.cpp \ + ../HTTPServer.cpp \ + ../HTTPProxy.cpp \ + ../Garlic.cpp \ + ../base64.cpp \ + ../AddressBook.cpp \ + ../util.cpp \ + ../UPnP.cpp \ + ../TunnelPool.cpp \ + ../TunnelGateway.cpp \ + ../TunnelEndpoint.cpp \ + ../Tunnel.cpp \ + ../Transports.cpp \ + ../TransitTunnel.cpp \ + ../Streaming.cpp \ + ../SSU.cpp \ + ../RouterInfo.cpp \ + ../RouterContext.cpp \ + ../Reseed.cpp \ + ../NTCPSession.cpp \ + ../NetDb.cpp \ + ../Log.cpp \ + ../Identity.cpp \ + ../I2NPProtocol.cpp + +HEADERS += \ + ../LeaseSet.h \ + ../Identity.h \ + ../HTTPServer.h \ + ../HTTPProxy.h \ + ../hmac.h \ + ../Garlic.h \ + ../ElGamal.h \ + ../CryptoConst.h \ + ../base64.h \ + ../AddressBook.h \ + ../util.h \ + ../UPnP.h \ + ../TunnelPool.h \ + ../TunnelGateway.h \ + ../TunnelEndpoint.h \ + ../TunnelConfig.h \ + ../TunnelBase.h \ + ../Tunnel.h \ + ../Transports.h \ + ../TransitTunnel.h \ + ../Timestamp.h \ + ../Streaming.h \ + ../SSU.h \ + ../RouterInfo.h \ + ../RouterContext.h \ + ../Reseed.h \ + ../Queue.h \ + ../NTCPSession.h \ + ../NetDb.h \ + ../Log.h \ + ../LittleBigEndian.h \ + ../I2PEndian.h \ + ../I2NPProtocol.h + +OTHER_FILES += \ + ../README.md \ + ../Makefile \ + ../LICENSE diff --git a/util.cpp b/util.cpp index 8b95e2e3..05073c82 100644 --- a/util.cpp +++ b/util.cpp @@ -262,13 +262,14 @@ namespace http // code for parser tests //{ + // i2p::util::http::url u_0("http://127.0.0.1:7070/asdasd?qqqqqqqqqqqq"); // i2p::util::http::url u_1("http://user:password@site.com:8080/asdasd?qqqqqqqqqqqqq"); // i2p::util::http::url u_2("http://user:password@site.com/asdasd?qqqqqqqqqqqqqq"); // i2p::util::http::url u_3("http://user:@site.com/asdasd?qqqqqqqqqqqqq"); // i2p::util::http::url u_4("http://user@site.com/asdasd?qqqqqqqqqqqq"); // i2p::util::http::url u_5("http://@site.com:800/asdasd?qqqqqqqqqqqq"); // i2p::util::http::url u_6("http://@site.com:err_port/asdasd?qqqqqqqqqqqq"); - // i2p::util::http::url u_7("http://user:password@site.com:err_port/asdasd?qqqqqqqqqqqq"); + // i2p::util::http::url u_7("http://user:password@site.com:err_port/asdasd?qqqqqqqqqqqq"); //} void url::parse(const std::string& url_s) {