mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-16 14:59:56 +00:00
refactor
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