diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-12-02 16:10:11 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-12-06 18:19:10 +0100 |
commit | 27fa0bbafd151742755fb7ed547c8b5398dd5150 (patch) | |
tree | 63b9c671045fc6d8cbe0d7ee32ac66e5ba71c552 /pkg | |
parent | abe2541987bacb6528c682fc440d08f152cb4282 (diff) |
[pkg] transition certs for riseup ca
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/vpn/openvpn.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go index e110d45..3a76bd8 100644 --- a/pkg/vpn/openvpn.go +++ b/pkg/vpn/openvpn.go @@ -177,8 +177,13 @@ func (b *Bitmask) startOpenVPN() error { } } } + openvpnVerb := os.Getenv("OPENVPN_VERBOSITY") + verb, err := strconv.Atoi(openvpnVerb) + if err != nil || verb > 6 || verb < 3 { + openvpnVerb = "3" + } arg = append(arg, - "--verb", "3", + "--verb", openvpnVerb, "--management-client", "--management", openvpnManagementAddr, openvpnManagementPort, "--ca", b.getTempCaCertPath(), @@ -186,6 +191,9 @@ func (b *Bitmask) startOpenVPN() error { "--key", b.certPemPath, "--persist-tun", "--float") + if verb > 3 { + arg = append(arg, "--log", "/tmp/leap-vpn.log") + } /* persist-tun is needed for reconnects */ return b.launch.openvpnStart(arg...) } |