http.sys代理Delegation net 反向代理应用层
winserver
端口转发:可以使用netsh命令行进行;(管理员权限)
类似于nginx的七层转发,好像没有;
微软的文章:
提出这个特征:要求winserver 2019 和win10以上
Http.sys delegation requires:
- ASP.NET Core 6+
- ASP.NET Core’s Http.sys server
- Windows Server 2019 or Windows 10 (build number 1809) or newer.
基于这个特性:微软出了一个 YARP: Yet Another Reverse Proxy
支持net core
path匹配
好像重写url功能?
https://microsoft.github.io/reverse-proxy/articles/transforms.html
启用log进行诊断
Diagnosing YARP-based proxiesDiagnosing YARP-based proxies
1 | "Urls": "http://localhost:80",//在以exe运行时是不能绑定同一端口的;在iis上是由http.sys进行绑定的 |
Http.sys delegation 委托只能目的地?
它好像使用的是Kestrel这个是各平台;
https.sys这个只能在window平台使用
HTTP.sys isn’t compatible with the ASP.NET Core Module and can’t be used with IIS or IIS Express. 就是不能在IIS上用;
自己实现:
DelegatingHandler
了解一下
1 | X-Forwarded-Host标头 |
ASP.NET Core高性能服务器HTTP.SYS - Artech - 博客园
参考范例
得先注册,使用netsh, 程序以管理员权限启动时会自动注册,但好像查不到
netsh只能查到这里的HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters

