mirror of https://github.com/PurpleI2P/i2pd.git
Jeff Becker
9 years ago
23 changed files with 314 additions and 237 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 $@ |
||||
|
@ -1,7 +1,33 @@
@@ -1,7 +1,33 @@
|
||||
[IRC] |
||||
type = client |
||||
address = 127.0.0.1 |
||||
port = 6668 |
||||
destination = irc.postman.i2p |
||||
destinationport = 6667 |
||||
keys = irc-keys.dat |
||||
|
||||
#[SMTP] |
||||
#type = client |
||||
#address = 127.0.0.1 |
||||
#port = 7659 |
||||
#destination = smtp.postman.i2p |
||||
#destinationport = 25 |
||||
#keys = smtp-keys.dat |
||||
|
||||
#[POP3] |
||||
#type = client |
||||
#address = 127.0.0.1 |
||||
#port = 7660 |
||||
#destination = pop.postman.i2p |
||||
#destinationport = 110 |
||||
#keys = pop3-keys.dat |
||||
|
||||
#[MTN] |
||||
#type = client |
||||
#address = 127.0.0.1 |
||||
#port = 8998 |
||||
#destination = mtn.i2p-projekt.i2p |
||||
#destinationport = 4691 |
||||
#keys = mtn-keys.dat |
||||
|
||||
# see more examples in /usr/share/doc/i2pd/configuration.md.gz |
||||
|
Loading…
Reference in new issue