Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kilemonn/socketforwarder
A TCP and UDP forwarder that accepts socket connections and registers them into designated group. Messages received from registered sockets will be forwarded to other sockets in the same group.
https://github.com/kilemonn/socketforwarder
cpp docker-image forwarder group-id multithreading socket-programming tcp udp
Last synced: about 5 hours ago
JSON representation
A TCP and UDP forwarder that accepts socket connections and registers them into designated group. Messages received from registered sockets will be forwarded to other sockets in the same group.
- Host: GitHub
- URL: https://github.com/kilemonn/socketforwarder
- Owner: Kilemonn
- License: apache-2.0
- Created: 2024-07-07T01:18:03.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-16T06:20:25.000Z (about 1 month ago)
- Last Synced: 2024-10-17T17:46:30.100Z (about 1 month ago)
- Topics: cpp, docker-image, forwarder, group-id, multithreading, socket-programming, tcp, udp
- Language: C++
- Homepage:
- Size: 133 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SocketForwarder
A TCP and UDP forwarder that creates common sessions and forwards incoming packets to all sockets registered for that session.Please review the [Wiki](https://github.com/Kilemonn/SocketForwarder/wiki) for more specific argument and configuration notes.
## Quick Start
### From Command-line
On commandline the application is accepting 2 `unsigned short` arguments as the listening port numbers for TCP and UDP forwarders respectively.
**NOTE:** At the moment from the command line, you must provide a valid TCP port in order to provide and start up the UDP forwarder. This is due to the ordering of the commandline arguments without any flags.
Example command structure:
``` bash
./SocketForwarder
```Example command:
``` bash
./SocketForwarder 6753 33345
```*Please review the Docker Image section to understand the available environment variables.*
### From Docker Image
Image available at: https://hub.docker.com/r/kilemon/socket-forwarder
**Make sure you `EXPOSE` the required ports that you wish to use as listener ports. By default the image exposes no ports.**
Running the container allows you to customise the forwarder in specific ways as per the environment variables that you provide on startup to the application.
Please see the [Wiki](https://github.com/Kilemonn/SocketForwarder/wiki) for more detail on the arguments and configuration options.
For quick start you need to match the exposed TCP and UDP ports respectively to the environment variables:
- `socketforwarder.tcp.port`
- `socketforwarder.udp.port`This will tell the application which ports to list on for new connections. More information about the underlying workings of the forwarder and its groups are in the wiki.
E.g. Dockerfile:
```dockerfile
FROM kilemon/socket-forwarder:latest# Matches exposed ports below
ENV socketforwarder.tcp.port=34765
ENV socketforwarder.udp.port=11234EXPOSE 34765/tcp
EXPOSE 11234/udp
```