TUN-3548, TUN-3547: Bastion mode can be specified as a service, doesn't

require URL.
This commit is contained in:
Adam Chalmers
2020-11-15 12:47:51 -06:00
parent c40cb7dc56
commit 7613410855
3 changed files with 52 additions and 4 deletions

View File

@@ -96,8 +96,7 @@ func (o *localService) start(wg *sync.WaitGroup, log logger.Service, shutdownC <
o.transport = transport
// Start a proxy if one is needed
staticHost := o.staticHost()
if originRequiresProxy(staticHost, cfg) {
if staticHost := o.staticHost(); originRequiresProxy(staticHost, cfg) {
if err := o.startProxy(staticHost, wg, log, shutdownC, errC, cfg); err != nil {
return err
}