mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-27 12:00:07 +00:00
Outbounds: Avoid circular dependencies with the built-in DNS (#7425)
https://github.com/XTLS/Xray-core/pull/7425#issuecomment-6900056768 https://github.com/XTLS/Xray-core/pull/7425#issuecomment-6953371666 https://github.com/XTLS/Xray-core/pull/7425#issuecomment-7023506796
This commit is contained in:
@@ -77,6 +77,11 @@ func ContentFromContext(ctx context.Context) *Content {
|
||||
return nil
|
||||
}
|
||||
|
||||
func SkipDNSResolveFromContext(ctx context.Context) bool {
|
||||
content := ContentFromContext(ctx)
|
||||
return content != nil && content.SkipDNSResolve
|
||||
}
|
||||
|
||||
func ContextWithIsReverseMux(ctx context.Context, isReverseMux bool) context.Context {
|
||||
return context.WithValue(ctx, isReverseMuxKey, isReverseMux)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user