Port forwards 1 second after openvpn connects
@@ -120,6 +120,7 @@ func main() {
err = streamMerger.CollectLines(func(line string) {
logger.Info(line)
if strings.Contains(line, "Initialization Sequence Completed") {
+ time.AfterFunc(time.Second, func() {
onConnected(ctx, logger, routingConf, fileManager, piaConf,
defaultInterface,
allSettings.VPNSP,
@@ -128,6 +129,7 @@ func main() {
allSettings.System.IPStatusFilepath,
allSettings.System.UID,
allSettings.System.GID)
+ })
}
})
e.FatalOnError(err)
