A network proxy that lets you easily load and unload modules at runtime. All you have to do is put them in a directory.
The program uses CMake, so this compiles the program:
cmake -B build/
cmake --build build/
To run, just execute the generated binary with the required arguments:
./build/mproxy -d <modules_dir> -o <outbound_port>
Check out the example module at modules/hello_world.c
.
To compile a module, just use the -shared
flag and output to a file with the extension .so
.
- Allow for multiple clients on the same proxy;
- Improve the "closing the program" case;
- Console instead of getchar() on main thread while running.