@@ -112,6 +112,8 @@ func TestGetRemoteIP(t *testing.T) {
112112 errString string
113113 expectedIP net.IP
114114 }{
115+ // Unix domain sockets set RemoteAddr to "@"
116+ {"@", "", nil},
115117 {"", "unable to get ip and port from http.RemoteAddr ()", nil},
116118 {"nil", "unable to get ip and port from http.RemoteAddr (nil)", nil},
117119 {"235.28.129.186", "unable to get ip and port from http.RemoteAddr (235.28.129.186)", nil},
@@ -155,6 +157,8 @@ func TestGetClientString(t *testing.T) {
155157 }{
156158 // Should fail quietly, only printing warnings to the log
157159 {nil, "", "", "", ""},
160+ // Unix domain socket — no IP available
161+ {nil, "@", "", "", ""},
158162 {p, "127.0.0.1:11950", "", "127.0.0.1", "127.0.0.1"},
159163 {p, "[::1]:28660", "99.103.56.12", "99.103.56.12", "::1 (99.103.56.12)"},
160164 {nil, "10.254.244.165:62750", "", "10.254.244.165", "10.254.244.165"},