summary refs log tree commit diff
path: root/config.go
diff options
context:
space:
mode:
authorMelonai <einebeere@gmail.com>2021-09-10 23:40:49 +0200
committerMelonai <einebeere@gmail.com>2021-09-10 23:43:57 +0200
commita32b9fe723c633cf5349bb0479d97e1f6d04445d (patch)
treef45869da615f5efcd0b2dd8d1baade6831dd3f4f /config.go
parent175da8f22cd791e81338fe61e6099125868cf5a0 (diff)
downloadportgate-a32b9fe723c633cf5349bb0479d97e1f6d04445d.tar.zst
portgate-a32b9fe723c633cf5349bb0479d97e1f6d04445d.zip
Refactor path into destination
Diffstat (limited to 'config.go')
-rw-r--r--config.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.go b/config.go
index 7630e87..f5fec33 100644
--- a/config.go
+++ b/config.go
@@ -45,9 +45,9 @@ func (c *Config) TargetAddress(port int) string {
 }
 
 // MakeUrl creates the URL on the destination host that the user wants to access.
-func (c *Config) MakeUrl(p Path) string {
+func (c *Config) MakeUrl(p Destination) string {
 	// TODO: Figure out what to do with TLS
-	return fmt.Sprintf("http://%s:%d%s", c.targetHost, p.DestinationIdentifier, p.ResourcePath)
+	return fmt.Sprintf("http://%s:%d%s", c.targetHost, p.Port, p.Path)
 }
 
 // CheckKey checks whether the givenKey matches the one in the config.