mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-07 20:40:13 +02:00
Port forwards 1 second after openvpn connects
This commit is contained in:
+10
-8
@@ -120,14 +120,16 @@ func main() {
|
||||
err = streamMerger.CollectLines(func(line string) {
|
||||
logger.Info(line)
|
||||
if strings.Contains(line, "Initialization Sequence Completed") {
|
||||
onConnected(ctx, logger, routingConf, fileManager, piaConf,
|
||||
defaultInterface,
|
||||
allSettings.VPNSP,
|
||||
allSettings.PIA.PortForwarding.Enabled,
|
||||
allSettings.PIA.PortForwarding.Filepath,
|
||||
allSettings.System.IPStatusFilepath,
|
||||
allSettings.System.UID,
|
||||
allSettings.System.GID)
|
||||
time.AfterFunc(time.Second, func() {
|
||||
onConnected(ctx, logger, routingConf, fileManager, piaConf,
|
||||
defaultInterface,
|
||||
allSettings.VPNSP,
|
||||
allSettings.PIA.PortForwarding.Enabled,
|
||||
allSettings.PIA.PortForwarding.Filepath,
|
||||
allSettings.System.IPStatusFilepath,
|
||||
allSettings.System.UID,
|
||||
allSettings.System.GID)
|
||||
})
|
||||
}
|
||||
})
|
||||
e.FatalOnError(err)
|
||||
|
||||
Reference in New Issue
Block a user