---
cmd/soju/main.go | 20 ++++++++++++++++++++
doc/soju.1.scd | 4 ++++
2 files changed, 24 insertions(+)
diff --git a/cmd/soju/main.go b/cmd/soju/main.go
index 04de78b..9f254e2 100644
--- a/cmd/soju/main.go
+++ b/cmd/soju/main.go
@@ -275,6 +275,16 @@ func main() {
log.Fatalf("serving %q: %v", listen, err)
}
}()
+ case "ws+unix":
+ ln, err := net.Listen("unix", u.Path)
+ if err != nil {
+ log.Fatalf("failed to start listener on %q: %v", listen, err)
+ }
+ go func() {
+ if err := http.Serve(ln, srv); err != nil {
+ log.Fatalf("serving %q: %v", listen, err)
+ }
+ }()
case "ident":
if srv.Identd == nil {
srv.Identd = identd.New()
@@ -366,6 +376,16 @@ func main() {
log.Fatalf("serving %q: %v", listen, err)
}
}()
+ case "http+unix":
+ ln, err := net.Listen("unix", u.Path)
+ if err != nil {
+ log.Fatalf("failed to start listener on %q: %v", listen, err)
+ }
+ go func() {
+ if err := http.Serve(ln, httpMux); err != nil {
+ log.Fatalf("serving %q: %v", listen, err)
+ }
+ }()
default:
log.Fatalf("failed to listen on %q: unsupported scheme", listen)
}
diff --git a/doc/soju.1.scd b/doc/soju.1.scd
index 26827d2..f06d5f8 100644
--- a/doc/soju.1.scd
+++ b/doc/soju.1.scd
@@ -92,10 +92,14 @@ The following directives are supported:
and handles WebSocket requests at endpoint _/socket_
- _http+insecure://[host][:port]_ listens for plain-text HTTP connections
(default port: 80) and handles WebSocket requests at endpoint _/socket_
+ - _http+unix://<path>_ listens for plain-text HTTP connections on a Unix
+ domain socket and handles WebSocket requests at endpoint _/socket_
- _wss://[host][:port]_ listens for WebSocket connections over TLS (default
port: 443)
- _ws+insecure://[host][:port]_ listens for plain-text WebSocket
connections (default port: 80)
+ - _ws+unix://<path>_ listens for plain-text WebSocket connections on a Unix
+ domain socket
- _ident://[host][:port]_ listens for plain-text ident connections (default
port: 113)
- _http+prometheus://localhost:<port>_ listens for plain-text HTTP
--
2.39.2