feat: add pprof for debuging
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m51s

This commit is contained in:
2025-12-18 18:30:49 +07:00
parent 6451304ed7
commit 7bc5a01ba7
9 changed files with 150 additions and 23 deletions

View File

@@ -179,9 +179,9 @@ func (s *SSHSession) HandleHTTPForward(req *ssh.Request, portToBind uint16) {
}
log.Printf("HTTP forwarding approved on port: %d", portToBind)
domain := utils.Getenv("domain")
domain := utils.Getenv("DOMAIN", "localhost")
protocol := "http"
if utils.Getenv("tls_enabled") == "true" {
if utils.Getenv("TLS_ENABLED", "false") == "true" {
protocol = "https"
}
@@ -261,7 +261,7 @@ func (s *SSHSession) HandleTCPForward(req *ssh.Request, addr string, portToBind
s.Forwarder.SetForwardedPort(portToBind)
s.Interaction.SendMessage("\033[H\033[2J")
s.Interaction.ShowWelcomeMessage()
s.Interaction.SendMessage(fmt.Sprintf("Forwarding your traffic to tcp://%s:%d \r\n", utils.Getenv("domain"), s.Forwarder.GetForwardedPort()))
s.Interaction.SendMessage(fmt.Sprintf("Forwarding your traffic to tcp://%s:%d \r\n", utils.Getenv("DOMAIN", "localhost"), s.Forwarder.GetForwardedPort()))
s.Lifecycle.SetStatus(types.RUNNING)
go s.Forwarder.AcceptTCPConnections()
s.Interaction.HandleUserInput()