Add http2http plugin

Adds support for a new "http2http" plugin in the configuration and implementation.

- Introduces a new constant `PluginHTTP2HTTP` to represent the "http2http" plugin in the plugin configuration.
- Adds `HTTP2HTTPPluginOptions` struct to define the options available for the "http2http" plugin, including local address binding, host header rewrite, and custom request headers.
- Implements the `http2http` plugin in `http2http.go`, which includes the setup of a reverse proxy server that forwards HTTP requests to another HTTP server based on the specified plugin options.
- Registers the "http2http" plugin with the plugin system, allowing it to be utilized in client configurations.


---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/fatedier/frp/pull/4275?shareId=a866fdb3-e40a-4d40-9326-546dc4efce63).
This commit is contained in:
fatedier 2024-06-12 14:40:12 +08:00
parent 39295292f1
commit 561132f867

View File

@ -1,9 +1,3 @@
### Fixes
### Features
* Fixed an issue where HTTP/2 was not enabled for https2http and https2https plugins.
* Fixed the issue where the default values of INI configuration parameters are inconsistent with other configuration formats.
### Changes
* Updated the default value of `transport.tcpMuxKeepaliveInterval` from 60 to 30.
* On the Android platform, the Google DNS server is used only when the default DNS server cannot be obtained.
* Added a new plugin "http2http" which allows forwarding HTTP requests to another HTTP server, supporting options like local address binding, host header rewrite, and custom request headers.