反向代理Java [英] Reverse Proxy Java
问题描述
我正在使用Java Web应用程序,并且我希望有一个反向代理来掩盖我的一些内部端点。
I am working with a Java web application and I would like to have a reverse proxy masking some of my internal endpoints.
要求
1.反向代理映射需要在运行时进行修改,例如,如果我们将某些组件移至另一台服务器,则我们应该能够进行修改
2.它必须可嵌入到标准servlet容器(如Jetty)中。
Requirements
1. The reverse proxy maps need to be modifiable at runtime e.g if we move some components to another server we should be able to modify the mapping such that new requests are routed to this endpoint.
2. This must be embeddable to a standard servlet container like Jetty.
大多数Java反向代理(例如J2EP)都需要在启动应用程序之前获得可用的映射信息。
Most of the Java Reverse Proxies out there such as J2EP require mapping information available prior to starting the application.
推荐答案
Undertow 提供了可嵌入的反向代理服务器,可以在运行时以编程方式对其进行更改。
Undertow provides an embeddable reverse proxy server that can be changed programatically at runtime.
如果您要通过API在更高级别上进行操作,则有 Backflow 。它支持使用REST调用添加/删除代理后端。
If you want to operate at a higher level via an API then there is Backflow. It supports adding/removing proxy backends using REST calls.
这篇关于反向代理Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!