trafficd

command
v0.0.0-...-4faee56 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2016 License: MIT Imports: 3 Imported by: 0

README

trafficd License

License

The MIT License (MIT)

Install

go get github.com/mkideal/tools/trafficd

Usage

using trafficd -h show help information.

trafficda -h | --help
trafficd [--host] [--port=8080] [-M...]

Opts

--host
	local host, default is empty same as 0.0.0.0.

--port
	trafficd listening port, default is 8080.

-M<DN>=<PORT>
	define map rules. e.g.
	`-M www.example.com=9090 example.com=9090`

Examples

sudo trafficd --port=80 -M 127.0.0.1=8080
sudo trafficd --port=80 -M www.a.com=8080 -M www.b.com=9090

Now, "www.a.com" will redirect to "www.a.com:8080", "www.b.com" will redirect to "www.b.com:9090"

So, you can build many web sites in a same host(binding same IP for all domains).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL