Improve DNS caching

This commit is contained in:
世界
2023-06-07 20:56:55 +08:00
parent f949ddc0ab
commit 6f1b258501
9 changed files with 55 additions and 30 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"io"
"net"
"github.com/sagernet/sing/common/bufio"
"github.com/sagernet/sing/common/x/list"
)
@@ -42,7 +43,7 @@ func (c *PacketConn) Close() error {
}
func (c *PacketConn) Upstream() any {
return c.PacketConn
return bufio.NewPacketConn(c.PacketConn)
}
func (c *PacketConn) ReaderReplaceable() bool {