【fix】 so nice serve proxy client is easy

This commit is contained in:
wujiawei
2025-04-07 21:50:05 +08:00
parent b1b329aae1
commit 3444e90d3d
10 changed files with 142 additions and 5 deletions

View File

@ -99,6 +99,11 @@ public class NettyHttpProxyHandler extends ChannelInboundHandlerAdapter {
proxyMsg.setType(TcpMessageType.HTTP_CLIENT_PROXY_CLIENT_);
}else if (RouteType.CLIENT_PROXY_SEVER.equals(route.getRouteType())){
proxyMsg.setType(TcpMessageType.HTTP_CLIENT_PROXY_SERVER_);
}else if (RouteType.SERVER_PROXY_CLIENT.equals(route.getRouteType())){
ClientProxyRoute clientProxyRoute= (ClientProxyRoute) route;
String clientId = clientProxyRoute.getClientId();
proxyMsg.setClientId(clientId);
proxyMsg.setType(TcpMessageType.HTTP_SERVER_PROXY_CLIENT_);
}
}
channelTypeAdapter.handler(ctx.channel(), proxyMsg);

View File

@ -8,7 +8,8 @@ import lombok.Getter;
public enum RouteType {
LOCAL("本地路由"),
CLIENT_PROXY_CLIENT("客户端远程客户端路由"),
CLIENT_PROXY_SEVER("客户端远程服务端路由");
CLIENT_PROXY_SEVER("客户端远程服务端路由"),
SERVER_PROXY_CLIENT("服务端远程客户端路由");
private final String desc;