mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-08 23:05:28 +02:00
This reverts commit 9f32ccd453
.
This commit is contained in:
21
util/net/dialer.go
Normal file
21
util/net/dialer.go
Normal file
@ -0,0 +1,21 @@
|
||||
package net
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
|
||||
// Dialer extends the standard net.Dialer with the ability to execute hooks before
|
||||
// and after connections. This can be used to bypass the VPN for connections using this dialer.
|
||||
type Dialer struct {
|
||||
*net.Dialer
|
||||
}
|
||||
|
||||
// NewDialer returns a customized net.Dialer with overridden Control method
|
||||
func NewDialer() *Dialer {
|
||||
dialer := &Dialer{
|
||||
Dialer: &net.Dialer{},
|
||||
}
|
||||
dialer.init()
|
||||
|
||||
return dialer
|
||||
}
|
Reference in New Issue
Block a user