diff --git a/src/def.go b/src/def.go index 0ebeb5a..91a491b 100644 --- a/src/def.go +++ b/src/def.go @@ -42,7 +42,7 @@ import ( const ( /* Build Constants */ SYSTEM_NAME = "Zoraxy" - SYSTEM_VERSION = "3.1.6" + SYSTEM_VERSION = "3.1.7" DEVELOPMENT_BUILD = false /* Development: Set to false to use embedded web fs */ /* System Constants */ diff --git a/src/mod/dynamicproxy/dynamicproxy.go b/src/mod/dynamicproxy/dynamicproxy.go index 773910d..8e45be4 100644 --- a/src/mod/dynamicproxy/dynamicproxy.go +++ b/src/mod/dynamicproxy/dynamicproxy.go @@ -191,7 +191,24 @@ func (router *Router) StartProxyService() error { w.Write([]byte("400 - Bad Request")) } else { //No defined sub-domain - http.NotFound(w, r) + if router.Root.DefaultSiteOption == DefaultSite_NoResponse { + //No response. Just close the connection + hijacker, ok := w.(http.Hijacker) + if !ok { + w.Header().Set("Connection", "close") + return + } + conn, _, err := hijacker.Hijack() + if err != nil { + w.Header().Set("Connection", "close") + return + } + conn.Close() + } else { + //Default behavior + http.NotFound(w, r) + } + } }