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 @@ |
|||||||
#ifndef HTTP_PROXY_H__ |
#ifndef HTTP_PROXY_H__ |
||||||
#define HTTP_PROXY_H__ |
#define HTTP_PROXY_H__ |
||||||
|
|
||||||
#include <memory> |
namespace i2p { |
||||||
#include <set> |
namespace proxy { |
||||||
#include <boost/asio.hpp> |
class HTTPProxy: public i2p::client::TCPIPAcceptor |
||||||
#include <mutex> |
|
||||||
#include "I2PService.h" |
|
||||||
#include "Destination.h" |
|
||||||
|
|
||||||
namespace i2p |
|
||||||
{ |
|
||||||
namespace proxy |
|
||||||
{ |
|
||||||
class HTTPProxyServer: public i2p::client::TCPIPAcceptor |
|
||||||
{ |
{ |
||||||
public: |
public: |
||||||
|
|
||||||
HTTPProxyServer(const std::string& address, int port, std::shared_ptr<i2p::client::ClientDestination> localDestination = nullptr); |
HTTPProxy(const std::string& address, int port, std::shared_ptr<i2p::client::ClientDestination> localDestination = nullptr); |
||||||
~HTTPProxyServer() {}; |
~HTTPProxy() {}; |
||||||
|
|
||||||
protected: |
protected: |
||||||
// Implements TCPIPAcceptor
|
// Implements TCPIPAcceptor
|
||||||
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket); |
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket); |
||||||
const char* GetName() { return "HTTP Proxy"; } |
const char* GetName() { return "HTTP Proxy"; } |
||||||
}; |
}; |
||||||
|
} // http
|
||||||
typedef HTTPProxyServer HTTPProxy; |
} // i2p
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
#endif |
#endif |
||||||
|
@ -1,42 +1,47 @@ |
|||||||
USE_WIN32_APP=yes |
USE_WIN32_APP=yes |
||||||
CXX = g++ |
CXX = g++ |
||||||
WINDRES = windres |
WINDRES = windres |
||||||
CXXFLAGS = -Os -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN |
CXXFLAGS = -Os -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN |
||||||
NEEDED_CXXFLAGS = -std=c++11 |
NEEDED_CXXFLAGS = -std=c++11 |
||||||
BOOST_SUFFIX = -mt |
BOOST_SUFFIX = -mt |
||||||
INCFLAGS = -I/usr/include/ -I/usr/local/include/ |
INCFLAGS = -I/usr/include/ -I/usr/local/include/ |
||||||
LDFLAGS = -Wl,-rpath,/usr/local/lib \
|
LDFLAGS = -Wl,-rpath,/usr/local/lib \
|
||||||
-L/usr/local/lib \
|
-L/usr/local/lib |
||||||
-L/c/dev/openssl \
|
|
||||||
-L/c/dev/boost/lib |
# UPNP Support
|
||||||
LDLIBS = \
|
ifeq ($(USE_UPNP),1) |
||||||
-Wl,-Bstatic -lboost_system$(BOOST_SUFFIX) \
|
CXXFLAGS += -DUSE_UPNP -DMINIUPNP_STATICLIB |
||||||
-Wl,-Bstatic -lboost_date_time$(BOOST_SUFFIX) \
|
LDLIBS = -Wl,-Bstatic -lminiupnpc |
||||||
-Wl,-Bstatic -lboost_filesystem$(BOOST_SUFFIX) \
|
endif |
||||||
-Wl,-Bstatic -lboost_program_options$(BOOST_SUFFIX) \
|
|
||||||
-Wl,-Bstatic -lssl \
|
LDLIBS += \
|
||||||
-Wl,-Bstatic -lcrypto \
|
-Wl,-Bstatic -lboost_system$(BOOST_SUFFIX) \
|
||||||
-Wl,-Bstatic -lz \
|
-Wl,-Bstatic -lboost_date_time$(BOOST_SUFFIX) \
|
||||||
-Wl,-Bstatic -lwsock32 \
|
-Wl,-Bstatic -lboost_filesystem$(BOOST_SUFFIX) \
|
||||||
-Wl,-Bstatic -lws2_32 \
|
-Wl,-Bstatic -lboost_program_options$(BOOST_SUFFIX) \
|
||||||
-Wl,-Bstatic -lgdi32 \
|
-Wl,-Bstatic -lssl \
|
||||||
-Wl,-Bstatic -liphlpapi \
|
-Wl,-Bstatic -lcrypto \
|
||||||
-static-libgcc -static-libstdc++ \
|
-Wl,-Bstatic -lz \
|
||||||
-Wl,-Bstatic -lstdc++ \
|
-Wl,-Bstatic -lwsock32 \
|
||||||
-Wl,-Bstatic -lpthread |
-Wl,-Bstatic -lws2_32 \
|
||||||
|
-Wl,-Bstatic -lgdi32 \
|
||||||
ifeq ($(USE_WIN32_APP), yes) |
-Wl,-Bstatic -liphlpapi \
|
||||||
CXXFLAGS += -DWIN32_APP |
-static-libgcc -static-libstdc++ \
|
||||||
LDFLAGS += -mwindows -s |
-Wl,-Bstatic -lstdc++ \
|
||||||
DAEMON_RC += Win32/Resource.rc |
-Wl,-Bstatic -lpthread |
||||||
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC)) |
|
||||||
endif |
ifeq ($(USE_WIN32_APP), yes) |
||||||
|
CXXFLAGS += -DWIN32_APP |
||||||
ifeq ($(USE_AESNI),1) |
LDFLAGS += -mwindows -s |
||||||
CPU_FLAGS = -maes -DAESNI |
DAEMON_RC += Win32/Resource.rc |
||||||
else |
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC)) |
||||||
CPU_FLAGS = -msse |
endif |
||||||
endif |
|
||||||
|
ifeq ($(USE_AESNI),1) |
||||||
obj/%.o : %.rc |
CPU_FLAGS = -maes -DAESNI |
||||||
$(WINDRES) -i $< -o $@ |
else |
||||||
|
CPU_FLAGS = -msse |
||||||
|
endif |
||||||
|
|
||||||
|
obj/%.o : %.rc |
||||||
|
$(WINDRES) -i $< -o $@ |
||||||
|
@ -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