diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/gopherproxy/main.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cmd/gopherproxy/main.go b/cmd/gopherproxy/main.go new file mode 100644 index 0000000..bc5050e --- /dev/null +++ b/cmd/gopherproxy/main.go | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | package main | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "flag" | ||
| 5 | "log" | ||
| 6 | |||
| 7 | "github.com/prologic/gopherproxy" | ||
| 8 | ) | ||
| 9 | |||
| 10 | var ( | ||
| 11 | bind = flag.String("bind", ":80", "[int]:port to bind to") | ||
| 12 | uri = flag.String("uri", "127.0.0.1:70", "<host>:[port] to proxy to") | ||
| 13 | ) | ||
| 14 | |||
| 15 | func main() { | ||
| 16 | flag.Parse() | ||
| 17 | |||
| 18 | log.Fatal(gopherproxy.ListenAndServe(*bind, *uri)) | ||
| 19 | } | ||
