feat: add Proxy channel type and relay mode

Add the Proxy channel type and relay mode to support proxying requests to custom upstream services.
This commit is contained in:
Laisky.Cai
2024-07-21 03:28:22 +00:00
parent 2a892c1937
commit d4703dfd97
17 changed files with 292 additions and 106 deletions

View File

@@ -140,6 +140,12 @@ func TokenAuth() func(c *gin.Context) {
return
}
}
// set channel id for proxy relay
if channelId := c.Param("channelid"); channelId != "" {
c.Set(ctxkey.SpecificChannelId, channelId)
}
c.Next()
}
}