JSON REST API stream editor.
Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.markdown
confsed.go
confsed_test.go
jsed.go
jsed_test.go

README.markdown

rewriting REST

confsed is a tool that proxies HTTP requests to a REST API that returns JSON, allowing rewrites of string responses.

I wrote this because I'm NATting a service that self-describes, but doesn't know how to address itself when sending clients off to different ports.

I'm using this currently with a double-natted service (couchbase server in docker in virtualbox via vagrant) successfully.

Usage

Write a JSON rewrite rule thing:

{
    "original": "rewritten",
    "1.2.3.4": "5.6.7.8"
}

Then run

confsed -rewriteconf myconf.json http://origin/

Now, make all requests to the confsed server (default port is 7081) and the magic happens.