chore(protonvpn): add debug logs for keeping port forwarded
This commit is contained in:
@@ -21,6 +21,7 @@ type PortAllower interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Logger interface {
|
type Logger interface {
|
||||||
|
Debug(s string)
|
||||||
Info(s string)
|
Info(s string)
|
||||||
Warn(s string)
|
Warn(s string)
|
||||||
Error(s string)
|
Error(s string)
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ type Routing interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Logger interface {
|
type Logger interface {
|
||||||
|
Debug(s string)
|
||||||
Info(s string)
|
Info(s string)
|
||||||
Warn(s string)
|
Warn(s string)
|
||||||
Error(s string)
|
Error(s string)
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ func (p *Provider) KeepPortForward(ctx context.Context,
|
|||||||
case <-timer.C:
|
case <-timer.C:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
objects.Logger.Debug("refreshing port forward since 45 seconds have elapsed")
|
||||||
networkProtocols := []string{"udp", "tcp"}
|
networkProtocols := []string{"udp", "tcp"}
|
||||||
const internalPort = 0
|
const internalPort = 0
|
||||||
const lifetime = 60 * time.Second
|
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)
|
timer.Reset(refreshTimeout)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
type Logger interface {
|
type Logger interface {
|
||||||
|
Debug(s string)
|
||||||
Info(s string)
|
Info(s string)
|
||||||
Warn(s string)
|
Warn(s string)
|
||||||
Error(s string)
|
Error(s string)
|
||||||
|
|||||||
Reference in New Issue
Block a user