diff --git a/internal/portforward/service/interfaces.go b/internal/portforward/service/interfaces.go index eed258696..df9b91b8b 100644 --- a/internal/portforward/service/interfaces.go +++ b/internal/portforward/service/interfaces.go @@ -17,6 +17,7 @@ type Routing interface { } type Logger interface { + Debug(s string) Info(s string) Warn(s string) Error(s string) diff --git a/internal/provider/protonvpn/portforward.go b/internal/provider/protonvpn/portforward.go index f04d73a80..1002f107c 100644 --- a/internal/provider/protonvpn/portforward.go +++ b/internal/provider/protonvpn/portforward.go @@ -85,6 +85,7 @@ func (p *Provider) KeepPortForward(ctx context.Context, case <-timer.C: } + objects.Logger.Debug("refreshing port forward since 45 seconds have elapsed") networkProtocols := []string{"udp", "tcp"} const internalPort = 0 const lifetime = 60 * time.Second @@ -109,6 +110,8 @@ func (p *Provider) KeepPortForward(ctx context.Context, } } + objects.Logger.Debug(fmt.Sprintf("port forwarded %d maintained", p.portForwarded)) + timer.Reset(refreshTimeout) } } diff --git a/internal/provider/utils/logger.go b/internal/provider/utils/logger.go index d31897604..3a4674ab7 100644 --- a/internal/provider/utils/logger.go +++ b/internal/provider/utils/logger.go @@ -1,6 +1,7 @@ package utils type Logger interface { + Debug(s string) Info(s string) Warn(s string) Error(s string)