Skip to content

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.

License

Notifications You must be signed in to change notification settings

Kilemonn/SocketForwarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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:

./SocketForwarder <TCP-PORT> <UDP-PORT>

Example command:

./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 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:

FROM kilemon/socket-forwarder:latest

# Matches exposed ports below
ENV socketforwarder.tcp.port=34765
ENV socketforwarder.udp.port=11234

EXPOSE 34765/tcp
EXPOSE 11234/udp

About

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.

Topics

Resources

License

Stars

Watchers

Forks