Add compatibility assistant module

This commit is contained in:
Daniel
2021-11-17 14:09:42 +01:00
parent 3193cd35b9
commit 113f37dcab
15 changed files with 557 additions and 6 deletions

36
compat/callbacks.go Normal file
View File

@@ -0,0 +1,36 @@
package compat
import (
"net"
"github.com/safing/portmaster/network/packet"
"github.com/safing/portmaster/process"
)
func SubmitSystemIntegrationCheckPacket(p packet.Packet) {
select {
case systemIntegrationCheckPackets <- p:
default:
}
}
func SubmitDNSCheckDomain(subdomain string) (respondWith net.IP) {
// Submit queried domain.
select {
case dnsCheckReceivedDomain <- subdomain:
default:
}
// Return the answer.
dnsCheckAnswerLock.Lock()
defer dnsCheckAnswerLock.Unlock()
return dnsCheckAnswer
}
func ReportSecureDNSBypassIssue(p *process.Process) {
secureDNSBypassIssue.notify(p)
}
func ReportMultiPeerUDPTunnelIssue(p *process.Process) {
multiPeerUDPTunnelIssue.notify(p)
}