Revert "Rollback new routing functionality (#1805)" (#1813)

This reverts commit 9f32ccd453.
This commit is contained in:
Maycon Santos
2024-04-09 01:56:52 +09:00
committed by GitHub
parent 9f32ccd453
commit 3875c29f6b
49 changed files with 2982 additions and 367 deletions

21
util/net/dialer.go Normal file
View 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
}