mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-10-14 01:54:00 +00:00
Refactor UDP DNS hijack
This commit is contained in:
@@ -484,6 +484,10 @@ func (s *ServerEndpoint) JudgeFlow(network uint8, source netip.AddrPort, destina
|
||||
return judgeOpenVPNFlow(s.router, s.Tag(), s.Type(), s.localAddresses, network, source, destination, firstPacket)
|
||||
}
|
||||
|
||||
func (s *ServerEndpoint) NewDNSPacket(payload []byte, source M.Socksaddr, destination M.Socksaddr, writer N.PacketWriter) {
|
||||
s.newDNSPacket(log.ContextWithNewID(s.ctx), s, payload, source, destination, writer)
|
||||
}
|
||||
|
||||
func (s *ServerEndpoint) WritePackets(packets [][]byte) error {
|
||||
if !s.started.Load() {
|
||||
return E.New("OpenVPN server is not ready yet")
|
||||
|
||||
Reference in New Issue
Block a user