Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
95b13d5b
Commit
95b13d5b
authored
Aug 13, 2021
by
chenhuaqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exit fastly for incorrect token
parent
e6836579
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
3 deletions
+14
-3
core/src/main/java/com/github/shadowsocks/bg/GuardedProcessPool.kt
...main/java/com/github/shadowsocks/bg/GuardedProcessPool.kt
+1
-0
core/src/main/rust/shadowsocks-rust/Cargo.lock
core/src/main/rust/shadowsocks-rust/Cargo.lock
+1
-0
core/src/main/rust/shadowsocks-rust/Cargo.toml
core/src/main/rust/shadowsocks-rust/Cargo.toml
+1
-0
core/src/main/rust/shadowsocks-rust/bin/sslocal.rs
core/src/main/rust/shadowsocks-rust/bin/sslocal.rs
+10
-2
settings.gradle.kts
settings.gradle.kts
+1
-1
No files found.
core/src/main/java/com/github/shadowsocks/bg/GuardedProcessPool.kt
View file @
95b13d5b
...
...
@@ -72,6 +72,7 @@ class GuardedProcessPool(private val onFatal: suspend (IOException) -> Unit) : C
val
exitCode
=
exitChannel
.
receive
()
running
=
false
when
{
exitCode
==
OsConstants
.
ECONNREFUSED
->
throw
IOException
(
"connection refused by server"
)
SystemClock
.
elapsedRealtime
()
-
startTime
<
1000
->
throw
IOException
(
"$cmdName exits too fast (exit code: $exitCode)"
)
exitCode
==
128
+
OsConstants
.
SIGKILL
->
Timber
.
w
(
"$cmdName was killed"
)
...
...
core/src/main/rust/shadowsocks-rust/Cargo.lock
View file @
95b13d5b
...
...
@@ -1537,6 +1537,7 @@ dependencies = [
"env_logger",
"futures",
"jemallocator",
"libc",
"log",
"log4rs",
"mimalloc",
...
...
core/src/main/rust/shadowsocks-rust/Cargo.toml
View file @
95b13d5b
...
...
@@ -118,6 +118,7 @@ aead-cipher-extra = ["shadowsocks-service/aead-cipher-extra"]
[dependencies]
log
=
"0.4"
log4rs
=
{
version
=
"1.0"
,
optional
=
true
}
libc
=
"0.2.94"
clap
=
{
version
=
"2"
,
features
=
[
"wrap_help"
,
"suggestions"
]
}
cfg-if
=
"1"
...
...
core/src/main/rust/shadowsocks-rust/bin/sslocal.rs
View file @
95b13d5b
...
...
@@ -344,7 +344,10 @@ fn main() {
}
}
#[cfg(all(feature
=
"local-dns"
,
any(target_os
=
"android"
,
target_os
=
"macos"
,
target_os
=
"linux"
)))]
#[cfg(all(
feature
=
"local-dns"
,
any(target_os
=
"android"
,
target_os
=
"macos"
,
target_os
=
"linux"
)
))]
if
protocol
!=
ProtocolType
::
Dns
{
// Start a DNS local server binding to DNS_LOCAL_ADDR
//
...
...
@@ -502,7 +505,12 @@ fn main() {
// Server future resolved without an error. This should never happen.
Either
::
Left
((
Ok
(
..
),
..
))
=>
panic!
(
"server exited unexpectly"
),
// Server future resolved with error, which are listener errors in most cases
Either
::
Left
((
Err
(
err
),
..
))
=>
panic!
(
"aborted with {}"
,
err
),
Either
::
Left
((
Err
(
err
),
..
))
=>
{
if
err
.kind
()
==
std
::
io
::
ErrorKind
::
ConnectionRefused
{
std
::
process
::
exit
(
libc
::
ECONNREFUSED
)
}
panic!
(
"aborted with {}"
,
err
)
}
// The abort signal future resolved. Means we should just exit.
Either
::
Right
(
_
)
=>
(),
}
...
...
settings.gradle.kts
View file @
95b13d5b
include
(
":core"
,
":plugin"
,
":mobile"
,
":tv"
)
include
(
":core"
,
":plugin"
,
":mobile"
)
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