Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ClashForAndroid
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
ClashForAndroid
Commits
eeea9d0f
There was an error fetching the commit references. Please try again later.
Commit
eeea9d0f
authored
3 years ago
by
kr328
Browse files
Options
Downloads
Patches
Plain Diff
Fix: add zhihu to http proxy black list
parent
4b1f7a76
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
service/src/main/java/com/github/kr328/clash/service/TunService.kt
+18
-18
18 additions, 18 deletions
...rc/main/java/com/github/kr328/clash/service/TunService.kt
with
18 additions
and
18 deletions
service/src/main/java/com/github/kr328/clash/service/TunService.kt
+
18
−
18
View file @
eeea9d0f
...
...
@@ -193,23 +193,7 @@ class TunService : VpnService(), CoroutineScope by CoroutineScope(Dispatchers.De
ProxyInfo
.
buildDirectProxy
(
it
.
address
.
hostAddress
,
it
.
port
,
if
(
store
.
bypassPrivateNetwork
)
listOf
(
"localhost"
,
"*.local"
,
"127.*"
,
"10.*"
,
"172.16.*"
,
"172.17.*"
,
"172.18.*"
,
"172.19.*"
,
"172.2*"
,
"172.30.*"
,
"172.31.*"
,
"192.168.*"
)
else
emptyList
()
HTTP_PROXY_BLACK_LIST
+
if
(
store
.
bypassPrivateNetwork
)
HTTP_PROXY_LOCAL_LIST
else
emptyList
()
)
)
}
...
...
@@ -239,5 +223,21 @@ class TunService : VpnService(), CoroutineScope by CoroutineScope(Dispatchers.De
private
const
val
TUN_DNS
=
"172.19.0.2"
private
const
val
NET_ANY
=
"0.0.0.0"
private
const
val
NET_SUBNET_LOOPBACK
=
"127.0.0.0/8"
private
val
HTTP_PROXY_LOCAL_LIST
:
List
<
String
>
=
listOf
(
"localhost"
,
"*.local"
,
"127.*"
,
"10.*"
,
"172.16.*"
,
"172.17.*"
,
"172.18.*"
,
"172.19.*"
,
"172.2*"
,
"172.30.*"
,
"172.31.*"
,
"192.168.*"
)
private
val
HTTP_PROXY_BLACK_LIST
:
List
<
String
>
=
listOf
(
"*zhihu.com"
,
"*zhimg.com"
)
}
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment