diff options
-rw-r--r-- | tcpproxy.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tcpproxy.go b/tcpproxy.go index 321ac88..6d32137 100644 --- a/tcpproxy.go +++ b/tcpproxy.go @@ -18,14 +18,14 @@ // // Typical usage: // -// var p tcpproxy.Proxy -// p.AddHTTPHostRoute(":80", "foo.com", tcpproxy.To("10.0.0.1:8081")) -// p.AddHTTPHostRoute(":80", "bar.com", tcpproxy.To("10.0.0.2:8082")) -// p.AddRoute(":80", tcpproxy.To("10.0.0.1:8081")) // fallback -// p.AddSNIRoute(":443", "foo.com", tcpproxy.To("10.0.0.1:4431")) -// p.AddSNIRoute(":443", "bar.com", tcpproxy.To("10.0.0.2:4432")) -// p.AddRoute(":443", tcpproxy.To("10.0.0.1:4431")) // fallback -// log.Fatal(p.Run()) +// var p tcpproxy.Proxy +// p.AddHTTPHostRoute(":80", "foo.com", tcpproxy.To("10.0.0.1:8081")) +// p.AddHTTPHostRoute(":80", "bar.com", tcpproxy.To("10.0.0.2:8082")) +// p.AddRoute(":80", tcpproxy.To("10.0.0.1:8081")) // fallback +// p.AddSNIRoute(":443", "foo.com", tcpproxy.To("10.0.0.1:4431")) +// p.AddSNIRoute(":443", "bar.com", tcpproxy.To("10.0.0.2:4432")) +// p.AddRoute(":443", tcpproxy.To("10.0.0.1:4431")) // fallback +// log.Fatal(p.Run()) // // Calling Run (or Start) on a proxy also starts all the necessary // listeners. |