Handles multiple simultaneous connections towards a specified address:port
Optionally executes a system service when activity is detected on the listening port
make
Simple as that. The binary file is compiled inside /bin
folder created by make
proxyc [destination address] [destination port] [proxy listening port]
Example ./bin/proxyc 127.0.0.1 22 6969
That's not all!
There's a few more optional accepted arguments
[inactivity timeout] [systemd service name]
Example ./bin/proxyc 127.0.0.1 22 6969 15 magic_server.service
inactivity timeout
is a timer in minutes
starts at last client disconnection, at goal closessystemd service name
(if it was started)systemd service name
is a systemd service name
it's executed throughsystemctl
when activity is detected onproxy listening port
and no client is connected at the moment
- Written and tested on Linux using the GNU C Library
- Behaviour with BSD Library is undefined
Why not! Fun little project to learn a lot about TCP and sockets.
I was searching for something like this. A friend suggested to write it myself and here we are.
It's intended to be used as a daemonized process on a headless server: no more wasted power, run those processes only when actually needed! Very eco-friendly if you ask me!
It patiently waits for a user to show up, then gently executes the process the client was asking for, forwarding the connection
MAGIC
Use it at your own risk or don't use it at all