feat: add pprof for debuging
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m51s
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m51s
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -208,7 +208,7 @@ func (i *Interaction) appendToSlug(char byte) {
|
||||
}
|
||||
|
||||
func (i *Interaction) refreshSlugDisplay() {
|
||||
domain := utils.Getenv("domain")
|
||||
domain := utils.Getenv("DOMAIN", "localhost")
|
||||
i.SendMessage(clearToLineEnd)
|
||||
i.SendMessage("➤ " + i.EditSlug + "." + domain)
|
||||
}
|
||||
@@ -238,7 +238,7 @@ func (i *Interaction) updateSlug() {
|
||||
return
|
||||
}
|
||||
|
||||
domain := utils.Getenv("domain")
|
||||
domain := utils.Getenv("DOMAIN", "localhost")
|
||||
i.SendMessage("\r\n\r\n✅ SUBDOMAIN UPDATED ✅\r\n\r\n")
|
||||
i.SendMessage("Your new address is: " + newSlug + "." + domain + "\r\n\r\n")
|
||||
i.SendMessage("Press any key to continue...\r\n")
|
||||
@@ -340,16 +340,16 @@ func (i *Interaction) handleSlugCommand() {
|
||||
i.SendMessage(clearScreen)
|
||||
i.DisplaySlugEditor()
|
||||
|
||||
domain := utils.Getenv("domain")
|
||||
domain := utils.Getenv("DOMAIN", "localhost")
|
||||
i.SendMessage("➤ " + i.EditSlug + "." + domain)
|
||||
}
|
||||
|
||||
func (i *Interaction) ShowForwardingMessage() {
|
||||
domain := utils.Getenv("domain")
|
||||
domain := utils.Getenv("DOMAIN", "localhost")
|
||||
|
||||
if i.Forwarder.GetTunnelType() == types.HTTP {
|
||||
protocol := "http"
|
||||
if utils.Getenv("tls_enabled") == "true" {
|
||||
if utils.Getenv("TLS_ENABLED", "false") == "true" {
|
||||
protocol = "https"
|
||||
}
|
||||
i.SendMessage(fmt.Sprintf("Forwarding your traffic to %s://%s.%s \r\n", protocol, i.SlugManager.Get(), domain))
|
||||
@@ -384,7 +384,7 @@ func (i *Interaction) ShowWelcomeMessage() {
|
||||
}
|
||||
|
||||
func (i *Interaction) DisplaySlugEditor() {
|
||||
domain := utils.Getenv("domain")
|
||||
domain := utils.Getenv("DOMAIN", "localhost")
|
||||
fullDomain := i.SlugManager.Get() + "." + domain
|
||||
|
||||
contentLine := " ║ Current: " + fullDomain
|
||||
|
||||
Reference in New Issue
Block a user