上游服务器需要一个短暂或临时端口请求下游服务器,测试端口分配方式。
框架为
<dependency>
<groupId>org.mitre.dsmiley.httpproxy</groupId>
<artifactId>smiley-http-proxy-servlet</artifactId>
<version>1.7</version>
</dependency>
其他代理方式类似。
当两次先后通过代理服务器访问时,代理服务器复用同一端口:
当两次先后通过代理服务器访问时,代理服务器使用两个端口:
注意http请求头X-Forwarded-For标识的源请求的地址,但没有标识源请求的端口