summaryrefslogtreecommitdiff
path: root/pkg/vpn/openvpn.go
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-07-09 20:29:45 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-07-12 19:47:49 +0200
commit26092db4ca2ad9972c5c275d1fcfb262ac7573ac (patch)
treea9b64d3b3c95f024ab27afbceebe1496615d1036 /pkg/vpn/openvpn.go
parent0d1d4116eb283a684b93bd432cb1f3b8331b2d4d (diff)
[ui] give feedback about gateway selection
-Resolves: #524
Diffstat (limited to 'pkg/vpn/openvpn.go')
-rw-r--r--pkg/vpn/openvpn.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go
index 6682094..3df5a23 100644
--- a/pkg/vpn/openvpn.go
+++ b/pkg/vpn/openvpn.go
@@ -121,6 +121,7 @@ func (b *Bitmask) listenShapeErr() {
func (b *Bitmask) startOpenVPN() error {
arg := []string{}
+ b.statusCh <- Starting
if b.GetTransport() == "obfs4" {
gateways, err := b.bonafide.GetGateways("obfs4")
if err != nil {
@@ -251,8 +252,9 @@ func (b *Bitmask) Reconnect() error {
if err != nil {
return err
}
- log.Println("reconnect")
+ log.Println("DEBUG Reconnecting")
if status != Off {
+ b.statusCh <- Stopping
if b.shapes != nil {
b.shapes.Close()
b.shapes = nil
@@ -264,6 +266,7 @@ func (b *Bitmask) Reconnect() error {
}
err = b.launch.firewallStop()
+ // FIXME - there's a window in which we might leak traffic here!
if err != nil {
return err
}