set
github.com/fastest963/settimeout
go get github.com/fastest963/settimeout
set

github.com/fastest963/settimeout

setTimeout as a Service

by James Hartig

v0.4.0 (see all)License:MIT
go get github.com/fastest963/settimeout
Readme

settimeout

HTTP server that allows a client to specify how long the server should sleep before responding. A live demo is at http://settimeout.io/

Building

To build settimeout you just need to run:

go build

Usage

settimeout

Other stuff

If you're getting an error such as:

Failed to start HTTP server: listen tcp :80: bind: permission denied

you're not running settimeout as root and therefore you need to make it listen on a higher port number. You can then use iptables to redirect port 80 to your new port (example uses port 1080):

iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 1080

If you want to run settimeout behind nginx you need to setup settimeout to listen on a different port such as 1080. The addr can be 127.0.0.1:1080 then you just need to add the following to your nginx conf:

proxy_pass http://127.0.0.1:1080;
proxy_pass_header Server;

proxy_pass_header is optional and just tells nginx to not overwrite the Server header with "nginx".

GitHub Stars

11

LAST COMMIT

3yrs ago

MAINTAINERS

0

CONTRIBUTORS

3

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.4.1-0.20190107203510-cbbd81bf88b7
1yr ago
v0.4.0
1yr ago
No alternatives found
No tutorials found
Add a tutorial