yanbolan
文章282
標籤199
類別26
http.sys代理Delegation net 反向代理应用层

http.sys代理Delegation net 反向代理应用层

winserver

端口转发:可以使用netsh命令行进行;(管理员权限)

类似于nginx的七层转发,好像没有;

微软的文章:

Http.sys Delegation

提出这个特征:要求winserver 2019 和win10以上

Http.sys delegation requires:

基于这个特性:微软出了一个 YARP: Yet Another Reverse Proxy

支持net core

path匹配

https://microsoft.github.io/reverse-proxy/articles/header-routing.htmlhttps://microsoft.github.io/reverse-proxy/articles/header-routing.html

好像重写url功能?

https://microsoft.github.io/reverse-proxy/articles/transforms.html

启用log进行诊断

Diagnosing YARP-based proxiesDiagnosing YARP-based proxies

GitHub - microsoft/reverse-proxy: A toolkit for developing high-performance HTTP reverse proxy applications.

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上用;

asp.net - C# web application -> proxy all requests -> return content from another web application (Reverse proxy) - Stack Overflow

自己实现:

DelegatingHandler

了解一下

1
X-Forwarded-Host标头

ASP.NET Core高性能服务器HTTP.SYS - Artech - 博客园

参考范例

AspNetCore.Docs/aspnetcore/fundamentals/servers/httpsys/samples at main · dotnet/AspNetCore.Docs · GitHub

得先注册,使用netsh, 程序以管理员权限启动时会自动注册,但好像查不到

netsh只能查到这里的HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters

博主:yanbolan
文章連結:https://yuris.site/2022/11_06_820ce945.html
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可
×