协议枚举调整,维护协议关联的下层基础协议

This commit is contained in:
aoshiguchen
2023-05-31 22:42:16 +08:00
parent 5a502115b1
commit 2d0b9132e9
2 changed files with 5 additions and 3 deletions
@@ -16,11 +16,12 @@ import java.util.stream.Stream;
@Getter
@AllArgsConstructor
public enum NetworkProtocolEnum {
TCP("TCP"),
UDP("UDP"),
HTTP("HTTP"),
TCP("TCP", "TCP"),
UDP("UDP", "UDP"),
HTTP("HTTP", "TCP"),
;
private String desc;
private String baseProtocol;
private static final Map<String, NetworkProtocolEnum> map = Stream.of(NetworkProtocolEnum.values()).collect(Collectors.toMap(NetworkProtocolEnum::getDesc, Function.identity()));
public static NetworkProtocolEnum of(String desc) {
@@ -218,6 +218,7 @@ public class VisitorChannelService {
}
for (PortMappingDO portMapping : portMappingList) {
// TODO 此处切入,TCP/UDP代理
try {
proxyMutualService.bindServerPort(cmdChannelAttachInfo, portMapping.getServerPort());
tcpServerBootstrap.bind(portMapping.getServerPort()).get();