kREproxy Code
Brought to you by:
marcintom
# # GPL vRelease licence # # kREproxy project (C) Marcin Tomasik 2009 # # <marcin.tomasik.priv[onserver]gmail.com> # # http://kreproxy.sourceforge.net/ # 1. About 2. Configuration 2.1 Configuration entry 2.2 Default entry 2.2 Main configuration 3. Installation 3.1 Requiments 3.2 Compilation 3.3 Info 3.4 Starting/Stopping 4. Responsibility 1. About ======== kREproxy - kernel reverse proxy server. This is very simple proxy server of http protocol which use simple configuration to deciding where pass the http requests. kREproxy server works in linux kernel spaca as kernel module. 2. Configuration ================ To configuring kREproxy server we must change his code. This state is not so confortable but at now this must be enough. Some configuration is in kre_options.h file, and kre_main.c. 2.1 Configuration entry ======================= Configuration entry is somethig as pattern which kREproxy can interpret and bind with appropriate destination server. Example of one entry. URI hostname destination ip port "/*" "example.com" => 127.0.0.1 8080 This tell kREproxy that if client send request GET/POST GET /example HTTP/1.1 Host: example.com kREproxy pass this request to HTTP server on 127.0.0.1:8080 host 2.2 Default entry ================= Default entry consists only of *) destination ip addres *) destination port Example of default entry "" "" => 192.168.0.2 80 2.3 Main configuration ====================== Main configuration of kREproxy consists of minimum default entry. This tells to server that all request must be pass to default destination server. In most popular case we must add some "Configuration entries" and one "Default entry". Example of main configuration "/*" "example-one.com" => 127.0.0.1 8080 "/some/path" "example-one.com" => 192.168.0.2 80 "/*" "example-two.org" => 192.168.0.3 80 "/image/*" "image.examp.org" => 192.168.0.4 80 "/video/*" "example-two.org" => 192.168.0.4 80 "" "" => 192.168.0.10 80 We can add configuration entry in kre_main.c file. There are some examples how can you do this in kre_main.c 3. Installation =============== 3.1 Requirments =============== This software should be work on 2.6.* kernels but it tested only on 2.6.18 3.2 Compilation =============== Compilation is as simple as posible. You must type # make 3.3 Info ======== Display avalible make parameters. # make about 3.3 Starting/Stopping ===================== # make start # make stop 4. Responsibility ================= The author does not take any responsibility for any problem or errors which can damage system or hardware. You are using this software in your own responsibility.