Skip to content

Commit

Permalink
fix unauthorized bug
Browse files Browse the repository at this point in the history
  • Loading branch information
uoosef committed Nov 21, 2023
1 parent e513720 commit b9b6a95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"host": "<YOUR_HOST>",
"domains": {
"youtube": "<YOUR_IP>"
"youtube": "<YOUR_IP>",
"google": "<YOUR_IP>"
}
}
5 changes: 0 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ func handleConnection(clientConn net.Conn) {

targetHost := strings.ToLower(clientHello.ServerName)

if !strings.HasSuffix(targetHost, ".internal.example.com") {
log.Print("Blocking connection to unauthorized backend")
return
}

if targetHost == config.Host {
targetHost = net.JoinHostPort(targetHost, "8443")
} else {
Expand Down

0 comments on commit b9b6a95

Please sign in to comment.