From: Nishi Date: Sun, 22 Sep 2024 16:40:40 +0000 (+0000) Subject: adding proxy module X-Git-Url: https://git.chaotic.ninja/gitweb/nishi/?a=commitdiff_plain;h=558ccb50e540730e0a3d6d06d1b4244d7586f5dc;p=tewi.git adding proxy module git-svn-id: file:///raid/svn-personal/tewi/trunk@126 8739d7e6-ffea-ec47-b151-bdff447c6205 --- diff --git a/Module/Makefile b/Module/Makefile index 48c192d..3c24b72 100644 --- a/Module/Makefile +++ b/Module/Makefile @@ -5,7 +5,7 @@ include $(PWD)/Platform/$(PLATFORM).mk .PHONY: all clean .SUFFIXES: .c .o $(LIB) -all: mod_cgi$(LIB) +all: mod_cgi$(LIB) mod_proxy$(LIB) .o$(LIB): $(CC) $(LDFLAGS) -shared -o $@ $< ../Common/common.a $(LIBS) diff --git a/Module/mod_proxy.c b/Module/mod_proxy.c new file mode 100644 index 0000000..932db7a --- /dev/null +++ b/Module/mod_proxy.c @@ -0,0 +1,15 @@ +/* $Id$ */ + +#include "../Server/tw_module.h" + +#include + +int mod_init(struct tw_config* config, struct tw_tool* tools) { + tools->log("CGI", "Initializing Proxy module"); + tools->add_version("Proxy/1.0"); + return 0; +} + +int mod_config(struct tw_tool* tools, char** argv, int argc) { return TW_CONFIG_NOTME; } + +int mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) { return TW_MODULE_PASS; }