mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-27 10:33:11 +01:00
8eca83f3cb
* Fix ebpf free call * Add debug logs
21 lines
304 B
Go
21 lines
304 B
Go
package wgproxy
|
|
|
|
type Factory struct {
|
|
wgPort int
|
|
ebpfProxy Proxy
|
|
}
|
|
|
|
func (w *Factory) GetProxy() Proxy {
|
|
if w.ebpfProxy != nil {
|
|
return w.ebpfProxy
|
|
}
|
|
return NewWGUserSpaceProxy(w.wgPort)
|
|
}
|
|
|
|
func (w *Factory) Free() error {
|
|
if w.ebpfProxy != nil {
|
|
return w.ebpfProxy.Free()
|
|
}
|
|
return nil
|
|
}
|