From 334ca9946ed9bcc768f0f9007fd59d8c18cd6424 Mon Sep 17 00:00:00 2001 From: Jan Kuri Date: Sun, 30 May 2021 15:47:33 +0200 Subject: [PATCH] fix(http): return URLs without port --- server/ssh.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/server/ssh.go b/server/ssh.go index eb4f96e..9697927 100644 --- a/server/ssh.go +++ b/server/ssh.go @@ -171,15 +171,8 @@ func (s *SSHServer) handleChannels(client *client, chans <-chan ssh.NewChannel) } client.ch = chconn - _, port, _ := net.SplitHostPort(s.opts.HTTPAddr) - if port == "80" { - port = "" - } else { - port = fmt.Sprintf(":%s", port) - } - - client.write(fmt.Sprintf("Generated HTTP URL: http://%s.%s%s\n", client.id, s.domain, port)) - client.write(fmt.Sprintf("Generated HTTPS URL: https://%s.%s%s\n", client.id, s.domain, port)) + client.write(fmt.Sprintf("Generated HTTP URL: http://%s.%s\n", client.id, s.domain)) + client.write(fmt.Sprintf("Generated HTTPS URL: https://%s.%s\n", client.id, s.domain)) } }