Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
browser-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
browser-backend
Commits
8f3956e7
Commit
8f3956e7
authored
Sep 29, 2020
by
huangjiamin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购买后将海外的IP添加KCP端口号
parent
4a53be93
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
IpResourceServiceImpl.java
...erbackend/browser/service/Impl/IpResourceServiceImpl.java
+0
-4
ShopServiceImpl.java
.../browserbackend/browser/service/Impl/ShopServiceImpl.java
+11
-0
No files found.
src/main/java/com/edgec/browserbackend/browser/service/Impl/IpResourceServiceImpl.java
View file @
8f3956e7
...
@@ -274,10 +274,6 @@ public class IpResourceServiceImpl implements IpResourceService {
...
@@ -274,10 +274,6 @@ public class IpResourceServiceImpl implements IpResourceService {
boolean
condition1
=
StringUtils
.
isNotBlank
(
ipResource
.
getRegion
())
&&
region
.
contains
(
ipResource
.
getRegion
());
boolean
condition1
=
StringUtils
.
isNotBlank
(
ipResource
.
getRegion
())
&&
region
.
contains
(
ipResource
.
getRegion
());
boolean
condition2
=
ipResourceRequestDto
.
getVendor
().
equals
(
"own"
)
&&
ipResource
.
isSpecialLine
();
boolean
condition2
=
ipResourceRequestDto
.
getVendor
().
equals
(
"own"
)
&&
ipResource
.
isSpecialLine
();
if
(
condition1
){
ipResource
.
setSecondaryProxyPort
(
"20020"
);
}
if
(
condition1
||
condition2
)
{
if
(
condition1
||
condition2
)
{
ipResource
.
setProxyUsername
(
ipResource
.
getAddr
());
ipResource
.
setProxyUsername
(
ipResource
.
getAddr
());
ipResource
.
setProxyPassword
(
genRandom
(
3
,
12
));
ipResource
.
setProxyPassword
(
genRandom
(
3
,
12
));
...
...
src/main/java/com/edgec/browserbackend/browser/service/Impl/ShopServiceImpl.java
View file @
8f3956e7
...
@@ -363,6 +363,13 @@ public class ShopServiceImpl implements ShopService {
...
@@ -363,6 +363,13 @@ public class ShopServiceImpl implements ShopService {
}
}
}
}
public
static
List
<
String
>
region
=
Arrays
.
asList
(
"asiapa"
,
"hongkong"
,
"japan"
,
"s-korea"
,
"us"
,
"malaysia"
,
"yajiada"
,
"singapore"
,
"australia"
,
"germany"
,
"uk"
,
"brazil"
,
"moscow"
,
"canada"
,
"france"
,
"sweden"
,
"s-korea"
,
"india"
,
"meast"
,
"brazil"
,
"virginia"
,
"ohio"
,
"california"
,
"oregon"
,
"ireland"
,
"london"
,
"ireland"
);
@Override
@Override
public
ShopResultDto
queryShop
(
String
username
,
String
shopId
)
{
public
ShopResultDto
queryShop
(
String
username
,
String
shopId
)
{
// 1. 校验 账户、商铺、IP资源、usershop 信息
// 1. 校验 账户、商铺、IP资源、usershop 信息
...
@@ -387,6 +394,10 @@ public class ShopServiceImpl implements ShopService {
...
@@ -387,6 +394,10 @@ public class ShopServiceImpl implements ShopService {
ipResourceDto
=
new
IpResourceDto
(
ipResource
,
null
,
false
);
ipResourceDto
=
new
IpResourceDto
(
ipResource
,
null
,
false
);
}
}
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
ipResource
.
getRegion
())
&&
region
.
contains
(
ipResource
.
getRegion
())){
ipResourceDto
.
setSecondaryProxyPort
(
"20020"
);
}
// 3. 封装 ShopResultDto 信息并返回
// 3. 封装 ShopResultDto 信息并返回
return
ShopResultDto
.
of
(
shop
,
userShop
.
getGroupId
(),
ipResourceDto
);
return
ShopResultDto
.
of
(
shop
,
userShop
.
getGroupId
(),
ipResourceDto
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment