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 @@ |
|||||||
#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 $@ |
||||||
|
@ -1,7 +1,33 @@ |
|||||||
[IRC] |
[IRC] |
||||||
type = client |
type = client |
||||||
|
address = 127.0.0.1 |
||||||
port = 6668 |
port = 6668 |
||||||
destination = irc.postman.i2p |
destination = irc.postman.i2p |
||||||
|
destinationport = 6667 |
||||||
keys = irc-keys.dat |
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 |
# see more examples in /usr/share/doc/i2pd/configuration.md.gz |
||||||
|
Loading…
Reference in new issue