Add dns client

This commit is contained in:
世界 committed 2022-07-06 23:14:19 +08:00
1 parent 651c4b539a
commit 8a761d7e3b
23 files changed
+582 -145

No files matched your search

+8
View File
@@ -191,6 +191,14 @@ func (r *Router) Outbound(tag string) (adapter.Outbound, bool) {
return outbound, loaded
}
func (r *Router) DefaultOutbound(network string) adapter.Outbound {
if network == C.NetworkTCP {
return r.defaultOutboundForConnection
} else {
return r.defaultOutboundForPacketConnection
}
}
func (r *Router) RouteConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
if metadata.SniffEnabled {
_buffer := buf.StackNew()