mirror of https://github.com/v2ray/v2ray-core
remove unused functions
parent
27b0401c20
commit
f99bd8b8b2
|
@ -14,10 +14,7 @@ const (
|
|||
originalDestinationKey
|
||||
inboundDestinationKey
|
||||
inboundTagKey
|
||||
outboundTagKey
|
||||
resolvedIPsKey
|
||||
allowPassiveConnKey
|
||||
dispatcherKey
|
||||
)
|
||||
|
||||
func ContextWithSource(ctx context.Context, src net.Destination) context.Context {
|
||||
|
@ -80,18 +77,6 @@ func InboundTagFromContext(ctx context.Context) string {
|
|||
return v.(string)
|
||||
}
|
||||
|
||||
func ContextWithOutboundTag(ctx context.Context, tag string) context.Context {
|
||||
return context.WithValue(ctx, outboundTagKey, tag)
|
||||
}
|
||||
|
||||
func OutboundTagFromContext(ctx context.Context) string {
|
||||
v := ctx.Value(outboundTagKey)
|
||||
if v == nil {
|
||||
return ""
|
||||
}
|
||||
return v.(string)
|
||||
}
|
||||
|
||||
func ContextWithResolveIPs(ctx context.Context, ips []net.Address) context.Context {
|
||||
return context.WithValue(ctx, resolvedIPsKey, ips)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue