Commit 4a53be93 authored by huangjiamin's avatar huangjiamin

购买后将海外的IP添加KCP端口号

parent ebab4176
......@@ -273,6 +273,11 @@ public class IpResourceServiceImpl implements IpResourceService {
// 只要 申请的 ip 地域不是在 大陆,则一定会执行下面 if 中的代码块
boolean condition1 = StringUtils.isNotBlank(ipResource.getRegion()) && region.contains(ipResource.getRegion());
boolean condition2 = ipResourceRequestDto.getVendor().equals("own") && ipResource.isSpecialLine();
if(condition1){
ipResource.setSecondaryProxyPort("20020");
}
if (condition1 || condition2) {
ipResource.setProxyUsername(ipResource.getAddr());
ipResource.setProxyPassword(genRandom(3, 12));
......@@ -639,9 +644,6 @@ public class IpResourceServiceImpl implements IpResourceService {
return ipOperationResultDto;
}
/**********************************************************************************
* todo - D E V E L O P M E N T *
**********************************************************************************/
@Override
public IpPageResultDto getIpList(String username, int groupType, int page, int amount, IpFilterDto ipFilterDto) {
// 获取当前用户的账户
......@@ -826,9 +828,7 @@ public class IpResourceServiceImpl implements IpResourceService {
return false;
}
/**********************************************************************************
* todo - D E V E L O P M E N T *
**********************************************************************************/
@Override
public IpResourceDto queryIp(String username, IpResourceRequestDto ipResourceRequestDto) {
Account account = accountRepository.findByName(username).orElseThrow(() -> new ClientRequestException(AccountErrorCode.NAMENOTEXIST));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment