mirror of https://github.com/PurpleI2P/i2pd.git
MXPLRS | Kirill
9 years ago
committed by
GitHub
24 changed files with 390 additions and 233 deletions
@ -1,32 +1,21 @@
@@ -1,32 +1,21 @@
|
||||
#ifndef HTTP_PROXY_H__ |
||||
#define HTTP_PROXY_H__ |
||||
|
||||
#include <memory> |
||||
#include <set> |
||||
#include <boost/asio.hpp> |
||||
#include <mutex> |
||||
#include "I2PService.h" |
||||
#include "Destination.h" |
||||
|
||||
namespace i2p |
||||
{ |
||||
namespace proxy |
||||
{ |
||||
class HTTPProxyServer: public i2p::client::TCPIPAcceptor |
||||
namespace i2p { |
||||
namespace proxy { |
||||
class HTTPProxy: public i2p::client::TCPIPAcceptor |
||||
{ |
||||
public: |
||||
|
||||
HTTPProxyServer(const std::string& address, int port, std::shared_ptr<i2p::client::ClientDestination> localDestination = nullptr); |
||||
~HTTPProxyServer() {}; |
||||
HTTPProxy(const std::string& address, int port, std::shared_ptr<i2p::client::ClientDestination> localDestination = nullptr); |
||||
~HTTPProxy() {}; |
||||
|
||||
protected: |
||||
// Implements TCPIPAcceptor
|
||||
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket); |
||||
const char* GetName() { return "HTTP Proxy"; } |
||||
}; |
||||
|
||||
typedef HTTPProxyServer HTTPProxy; |
||||
} |
||||
} |
||||
} // http
|
||||
} // i2p
|
||||
|
||||
#endif |
||||
|
@ -1,42 +1,47 @@
@@ -1,42 +1,47 @@
|
||||
USE_WIN32_APP=yes |
||||
CXX = g++ |
||||
WINDRES = windres |
||||
CXXFLAGS = -Os -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN |
||||
NEEDED_CXXFLAGS = -std=c++11 |
||||
BOOST_SUFFIX = -mt |
||||
INCFLAGS = -I/usr/include/ -I/usr/local/include/ |
||||
LDFLAGS = -Wl,-rpath,/usr/local/lib \
|
||||
-L/usr/local/lib \
|
||||
-L/c/dev/openssl \
|
||||
-L/c/dev/boost/lib |
||||
LDLIBS = \
|
||||
-Wl,-Bstatic -lboost_system$(BOOST_SUFFIX) \
|
||||
-Wl,-Bstatic -lboost_date_time$(BOOST_SUFFIX) \
|
||||
-Wl,-Bstatic -lboost_filesystem$(BOOST_SUFFIX) \
|
||||
-Wl,-Bstatic -lboost_program_options$(BOOST_SUFFIX) \
|
||||
-Wl,-Bstatic -lssl \
|
||||
-Wl,-Bstatic -lcrypto \
|
||||
-Wl,-Bstatic -lz \
|
||||
-Wl,-Bstatic -lwsock32 \
|
||||
-Wl,-Bstatic -lws2_32 \
|
||||
-Wl,-Bstatic -lgdi32 \
|
||||
-Wl,-Bstatic -liphlpapi \
|
||||
-static-libgcc -static-libstdc++ \
|
||||
-Wl,-Bstatic -lstdc++ \
|
||||
-Wl,-Bstatic -lpthread |
||||
|
||||
ifeq ($(USE_WIN32_APP), yes) |
||||
CXXFLAGS += -DWIN32_APP |
||||
LDFLAGS += -mwindows -s |
||||
DAEMON_RC += Win32/Resource.rc |
||||
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC)) |
||||
endif |
||||
|
||||
ifeq ($(USE_AESNI),1) |
||||
CPU_FLAGS = -maes -DAESNI |
||||
else |
||||
CPU_FLAGS = -msse |
||||
endif |
||||
|
||||
obj/%.o : %.rc |
||||
$(WINDRES) -i $< -o $@ |
||||
USE_WIN32_APP=yes |
||||
CXX = g++ |
||||
WINDRES = windres |
||||
CXXFLAGS = -Os -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN |
||||
NEEDED_CXXFLAGS = -std=c++11 |
||||
BOOST_SUFFIX = -mt |
||||
INCFLAGS = -I/usr/include/ -I/usr/local/include/ |
||||
LDFLAGS = -Wl,-rpath,/usr/local/lib \
|
||||
-L/usr/local/lib |
||||
|
||||
# UPNP Support
|
||||
ifeq ($(USE_UPNP),1) |
||||
CXXFLAGS += -DUSE_UPNP -DMINIUPNP_STATICLIB |
||||
LDLIBS = -Wl,-Bstatic -lminiupnpc |
||||
endif |
||||
|
||||
LDLIBS += \
|
||||
-Wl,-Bstatic -lboost_system$(BOOST_SUFFIX) \
|
||||
-Wl,-Bstatic -lboost_date_time$(BOOST_SUFFIX) \
|
||||
-Wl,-Bstatic -lboost_filesystem$(BOOST_SUFFIX) \
|
||||
-Wl,-Bstatic -lboost_program_options$(BOOST_SUFFIX) \
|
||||
-Wl,-Bstatic -lssl \
|
||||
-Wl,-Bstatic -lcrypto \
|
||||
-Wl,-Bstatic -lz \
|
||||
-Wl,-Bstatic -lwsock32 \
|
||||
-Wl,-Bstatic -lws2_32 \
|
||||
-Wl,-Bstatic -lgdi32 \
|
||||
-Wl,-Bstatic -liphlpapi \
|
||||
-static-libgcc -static-libstdc++ \
|
||||
-Wl,-Bstatic -lstdc++ \
|
||||
-Wl,-Bstatic -lpthread |
||||
|
||||
ifeq ($(USE_WIN32_APP), yes) |
||||
CXXFLAGS += -DWIN32_APP |
||||
LDFLAGS += -mwindows -s |
||||
DAEMON_RC += Win32/Resource.rc |
||||
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC)) |
||||
endif |
||||
|
||||
ifeq ($(USE_AESNI),1) |
||||
CPU_FLAGS = -maes -DAESNI |
||||
else |
||||
CPU_FLAGS = -msse |
||||
endif |
||||
|
||||
obj/%.o : %.rc |
||||
$(WINDRES) -i $< -o $@ |
||||
|
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0"> |
||||
<qresource prefix="/"> |
||||
<file>images/icon.png</file> |
||||
</qresource> |
||||
</RCC> |
After Width: | Height: | Size: 8.5 KiB |
Loading…
Reference in new issue