mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-09 18:43:14 +00:00
Fix dns outbound
This commit is contained in:
parent
c57ea9e47c
commit
0eed0ca11a
|
@ -82,7 +82,7 @@ func (d *DNS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_responseBuffer := buf.StackNewSize(1024)
|
||||
_responseBuffer := buf.StackNewPacket()
|
||||
defer common.KeepAlive(_responseBuffer)
|
||||
responseBuffer := common.Dup(_responseBuffer)
|
||||
defer responseBuffer.Release()
|
||||
|
@ -133,7 +133,7 @@ func (d *DNS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metada
|
|||
return err
|
||||
}
|
||||
timeout.Update()
|
||||
_responseBuffer := buf.StackNewSize(1024)
|
||||
_responseBuffer := buf.StackNewPacket()
|
||||
defer common.KeepAlive(_responseBuffer)
|
||||
responseBuffer := common.Dup(_responseBuffer)
|
||||
defer responseBuffer.Release()
|
||||
|
|
|
@ -2,13 +2,38 @@
|
|||
"log": {
|
||||
"level": "info"
|
||||
},
|
||||
"dns": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "tls://8.8.8.8"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "shadowsocks",
|
||||
"listen": "::",
|
||||
"listen_port": 8080,
|
||||
"sniff": true,
|
||||
"method": "2022-blake3-aes-128-gcm",
|
||||
"password": "8JCsPssfgS8tiRwiMlhARg=="
|
||||
}
|
||||
]
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "direct"
|
||||
},
|
||||
{
|
||||
"type": "dns",
|
||||
"tag": "dns-out"
|
||||
}
|
||||
],
|
||||
"route": {
|
||||
"rules": [
|
||||
{
|
||||
"protocol": "dns",
|
||||
"outbound": "dns-out"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue