Skip to content

Commit

Permalink
renamed SetReconnectLimits to RestrictReconnects
Browse files Browse the repository at this point in the history
  • Loading branch information
zolia committed Feb 21, 2018
1 parent 686badc commit 0039575
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion openvpn/config.go
Expand Up @@ -60,7 +60,8 @@ func (c *Config) SetTLSCrypt(cryptFile string) {
c.AddOptions(OptionFile("tls-crypt", cryptFile))
}

func (c *Config) SetReconnectLimits() {
// RestrictReconnects describes conditions which enforces client to close a session in case of failed authentication
func (c *Config) RestrictReconnects() {
c.setParam("connect-retry-max", "2")
c.setParam("remap-usr1", "SIGTERM")
c.setFlag("single-session")
Expand Down
2 changes: 1 addition & 1 deletion openvpn/factory.go
Expand Up @@ -40,7 +40,7 @@ func NewClientConfig(
config.SetClientMode(remote, 1194)
config.SetTLSCACertificate(caCertPath)
config.SetTLSCrypt(tlsCryptKeyPath)
config.SetReconnectLimits()
config.RestrictReconnects()

config.SetDevice("tun")
config.setParam("cipher", "AES-256-GCM")
Expand Down

0 comments on commit 0039575

Please sign in to comment.