|
|
@@ -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)
|
|
|
}
|