Merge chained proxy with transport support

This commit is contained in:
Shelikhoo
2021-03-03 23:27:26 +00:00
12 changed files with 199 additions and 61 deletions
+22
View File
@@ -84,3 +84,25 @@ func SockoptFromContext(ctx context.Context) *Sockopt {
}
return nil
}
func GetTransportLayerProxyTagFromContext(ctx context.Context) string {
if ContentFromContext(ctx) == nil {
return ""
}
return ContentFromContext(ctx).Attribute("transportLayerOutgoingTag")
}
func SetTransportLayerProxyTagToContext(ctx context.Context, tag string) {
ContentFromContext(ctx).SetAttribute("transportLayerOutgoingTag", tag)
}
func GetForcedOutboundTagFromContext(ctx context.Context) string {
if ContentFromContext(ctx) == nil {
return ""
}
return ContentFromContext(ctx).Attribute("forcedOutboundTag")
}
func SetForcedOutboundTagToContext(ctx context.Context, tag string) {
ContentFromContext(ctx).SetAttribute("forcedOutboundTag", tag)
}