Skip to content

Commit

Permalink
Fixed #450
Browse files Browse the repository at this point in the history
  • Loading branch information
tobychui committed Dec 31, 2024
1 parent d1e5581 commit 0d4c71d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/def.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
19 changes: 18 additions & 1 deletion src/mod/dynamicproxy/dynamicproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

}

}
Expand Down

0 comments on commit 0d4c71d

Please sign in to comment.