From 52bc66c5553e41218358ffb7c4792c29e5a67649 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 10 Sep 2020 11:16:24 -0400 Subject: [PATCH] fix readme and perms --- README.md | 3 ++- main.go | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 862d456..4f123dc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A simple service to proxy unix sockets to http. Useful for containerizing web services that don't natively support listening on unix sockets. -Usage of unixproxy: +```Usage of unixproxy: -log Log requests to stdout -strip string @@ -11,3 +11,4 @@ Usage of unixproxy: Unix socket to listen on -url string URL to proxy to +``` \ No newline at end of file diff --git a/main.go b/main.go index 851e148..cd7ab73 100644 --- a/main.go +++ b/main.go @@ -66,7 +66,9 @@ func main() { srv.Handler = http.StripPrefix(c.Strip, frontendProxy) } } + unixListener, err := net.Listen("unix", c.MySock) + os.Chmod(c.MySock, 0777) if err != nil { log.Fatal(err)