mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
remove session firewall, this can't prevent memory use so it's better to just use OS native tools
This commit is contained in:
parent
838bca083d
commit
e7da3d72c4
5 changed files with 3 additions and 100 deletions
|
@ -43,16 +43,9 @@ type TunAdapter struct {
|
|||
iface tun.Device
|
||||
phony.Inbox // Currently only used for _handlePacket from the reader, TODO: all the stuff that currently needs a mutex below
|
||||
//mutex sync.RWMutex // Protects the below
|
||||
isOpen bool
|
||||
isEnabled bool // Used by the writer to drop sessionTraffic if not enabled
|
||||
gatekeeper func(pubkey ed25519.PublicKey, initiator bool) bool
|
||||
proto protoHandler
|
||||
}
|
||||
|
||||
func (tun *TunAdapter) SetSessionGatekeeper(gatekeeper func(pubkey ed25519.PublicKey, initiator bool) bool) {
|
||||
phony.Block(tun, func() {
|
||||
tun.gatekeeper = gatekeeper
|
||||
})
|
||||
isOpen bool
|
||||
isEnabled bool // Used by the writer to drop sessionTraffic if not enabled
|
||||
proto protoHandler
|
||||
}
|
||||
|
||||
// Gets the maximum supported MTU for the platform based on the defaults in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue