From 27fa0bbafd151742755fb7ed547c8b5398dd5150 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 2 Dec 2021 16:10:11 +0100 Subject: [pkg] transition certs for riseup ca --- pkg/vpn/openvpn.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pkg/vpn/openvpn.go') 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...) } -- cgit v1.2.3