kerryjiang / SuperSocket

SuperSocket is a light weight, cross platform and extensible socket server application framework.
Apache License 2.0
3.95k stars 1.15k forks source link

有ip段过滤的功能吗?比如过滤掉内网ip段 #519

Open ich-wangxf opened 3 years ago

ich-wangxf commented 3 years ago

如题,需要过滤掉非法ip访问,k8s集群部署时,有很多来自内网的ip不停的连接,希望能过滤掉这些ip

kerryjiang commented 3 years ago

Try IMiddleware.RegisterSession()

https://github.com/kerryjiang/SuperSocket/blob/eae81950caaff6e7b5f56d8db06b6542afe607d3/src/SuperSocket.Primitives/IMiddleware.cs#L14