diff options
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/config.go b/config.go index cd315c0..b4e0754 100644 --- a/config.go +++ b/config.go @@ -1,4 +1,4 @@ -package main +package portgate import "fmt" @@ -37,3 +37,9 @@ func (c *Config) PortgateAddress() string { func (c *Config) TargetAddress(port int) string { return fmt.Sprintf("%s:%d", c.targetHost, port) } + +// MakeUrl creates the URL on the destination host that the user wants to access. +func (c *Config) MakeUrl(p Path) string { + // TODO: Figure out what to do with TLS + return fmt.Sprintf("http://%s:%d%s", c.targetHost, p.DestinationIdentifier, p.ResourcePath) +} |
