BohdanLevchenko / wax

Minimalistic http redirector written in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wax

Wax is a simple and minimalistic http redirector.

The main idea was to create compact crossplatform http server which redirects http requests according to own configuration.

Jumpstart with:

  ./build.sh
  bin/wax

Configuration is dead simple:

{
  "mappings": [{
      "source": "/yandex",
      "target": "http://www.yandex.ru"
    }, {
      "source": "/google",
      "target": "http://www.google.com"
    }, {
      "source": "/space",
      "target": "http://www.nasa.gov"
    }
  ]
}

It's enables the following redirections:

  http://localhost:8001/yandex => http://www.yandex.ru
  http://localhost:8001/google => http://www.google.com
  http://localhost:8001/space => http://www.nasa.gov

By default wax respond with 301 Moved permanently status code and listen on 8001 port, but this can be overridden with -code and -port command line parameters.

See wax -help for details.

About

Minimalistic http redirector written in Go

License:Apache License 2.0


Languages

Language:Go 69.3%Language:Shell 30.7%