Skip to content

mirstack/ufwd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ufwd

Build Status

UDP Forwarding Daemon.

This is super simple (~ 100 loc) and reliable UDP forwarder/proxy written in Golang.

Installation

To install ufwd go to releases page and pick latest package. Download it and unpack with desired prefix:

$ unzip -d /usr/local ufwd-*.zip

Installing from source

The package has no external dependencies and is easily go-installable:

$ go install gitbub.com/mirstack/ufwd

You can also download it and build manually.

$ git clone https://github.com/mirstack/ufwd.git
$ cd ufwd
$ go build . && go install .

Usage

Here's an example of a forwarding server:

$ ufwd :514 syslog.domain.com:514

In this example all the local UDP connections on port 514 will be passed through to a syslog server running on port 514 of syslog.domain.com host.

Check ufwd -h for list of all available options.

Disclaimer

Of course, saying that ufwd is a daemon is quite too much. It's mechanism is the simplest possible - if any error encountered, then exit and start over (via external supervisor). The app is intend to run as a daemon, thus the d suffix in the name.

Hacking

Not much to say. If you wanna hack on ufwd just clone the repo and play with the code. You can run the tests at any time with standard go test tool:

$ go test .

Releasing

To build a new release use bundled make target called pack:

$ make pack

It will wrap the binary and other needed files into a zip archive and save it to pkg/ufwd-x.y.z-{os}-{arch}.zip.

Contribute

  1. Fork the project.
  2. Write awesome code (in a feature branch).
  3. Test, test, test...!
  4. Commit, push and send Pull Request.