From c51b6d8887c38d538c0e2db2adfe0848fc662986 Mon Sep 17 00:00:00 2001 From: James Mills Date: Fri, 30 Sep 2016 19:40:24 -0700 Subject: Migrated to a Library structure with gopherproxy cmd for reuse by gopherclient --- cmd/gopherproxy/main.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cmd/gopherproxy/main.go (limited to 'cmd') 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 @@ +package main + +import ( + "flag" + "log" + + "github.com/prologic/gopherproxy" +) + +var ( + bind = flag.String("bind", ":80", "[int]:port to bind to") + uri = flag.String("uri", "127.0.0.1:70", ":[port] to proxy to") +) + +func main() { + flag.Parse() + + log.Fatal(gopherproxy.ListenAndServe(*bind, *uri)) +} -- cgit v1.2.3-70-g09d2