Skip to content

Commit

Permalink
Remove Wireguard peer in no-proxy mode on Close (#247)
Browse files Browse the repository at this point in the history
When connection is closed the wireguard peer should be gone.
It wasn't happening until this fix.
  • Loading branch information
braginini authored Mar 2, 2022
1 parent b72ed91 commit 430e041
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/internal/proxy/noproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ func NewNoProxy(config Config) *NoProxy {
}

func (p *NoProxy) Close() error {
// noop
err := p.config.WgInterface.RemovePeer(p.config.RemoteKey)
if err != nil {
return err
}
return nil
}

Expand Down

0 comments on commit 430e041

Please sign in to comment.