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
3997896a
Commit
3997896a
authored
Jan 27, 2019
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructure packages
parent
1ec62ae7
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
24 additions
and
15 deletions
+24
-15
core/src/androidTest/java/com/github/shadowsocks/net/SubnetTest.kt
...androidTest/java/com/github/shadowsocks/net/SubnetTest.kt
+2
-2
core/src/main/java/com/github/shadowsocks/Core.kt
core/src/main/java/com/github/shadowsocks/Core.kt
+1
-0
core/src/main/java/com/github/shadowsocks/acl/Acl.kt
core/src/main/java/com/github/shadowsocks/acl/Acl.kt
+1
-1
core/src/main/java/com/github/shadowsocks/bg/TrafficMonitor.kt
...src/main/java/com/github/shadowsocks/bg/TrafficMonitor.kt
+1
-0
core/src/main/java/com/github/shadowsocks/bg/VpnService.kt
core/src/main/java/com/github/shadowsocks/bg/VpnService.kt
+3
-1
core/src/main/java/com/github/shadowsocks/net/DefaultNetworkListener.kt
...java/com/github/shadowsocks/net/DefaultNetworkListener.kt
+1
-1
core/src/main/java/com/github/shadowsocks/net/HttpsTest.kt
core/src/main/java/com/github/shadowsocks/net/HttpsTest.kt
+3
-1
core/src/main/java/com/github/shadowsocks/net/LocalSocketListener.kt
...in/java/com/github/shadowsocks/net/LocalSocketListener.kt
+1
-1
core/src/main/java/com/github/shadowsocks/net/Subnet.kt
core/src/main/java/com/github/shadowsocks/net/Subnet.kt
+2
-1
core/src/main/java/com/github/shadowsocks/net/TcpFastOpen.kt
core/src/main/java/com/github/shadowsocks/net/TcpFastOpen.kt
+1
-1
core/src/main/java/com/github/shadowsocks/preference/DataStore.kt
.../main/java/com/github/shadowsocks/preference/DataStore.kt
+1
-1
core/src/main/java/com/github/shadowsocks/utils/Utils.kt
core/src/main/java/com/github/shadowsocks/utils/Utils.kt
+2
-2
mobile/src/main/java/com/github/shadowsocks/GlobalSettingsPreferenceFragment.kt
...om/github/shadowsocks/GlobalSettingsPreferenceFragment.kt
+1
-1
mobile/src/main/java/com/github/shadowsocks/acl/CustomRulesFragment.kt
...in/java/com/github/shadowsocks/acl/CustomRulesFragment.kt
+1
-1
mobile/src/main/java/com/github/shadowsocks/widget/StatsBar.kt
...e/src/main/java/com/github/shadowsocks/widget/StatsBar.kt
+1
-1
tv/src/main/java/com/github/shadowsocks/tv/MainPreferenceFragment.kt
.../java/com/github/shadowsocks/tv/MainPreferenceFragment.kt
+2
-0
No files found.
core/src/androidTest/java/com/github/shadowsocks/
utils
/SubnetTest.kt
→
core/src/androidTest/java/com/github/shadowsocks/
net
/SubnetTest.kt
View file @
3997896a
package
com.github.shadowsocks.
utils
package
com.github.shadowsocks.
net
import
java.net.InetAddress
import
org.junit.Assert
import
org.junit.Assert
import
org.junit.Test
import
org.junit.Test
import
java.net.InetAddress
class
SubnetTest
{
class
SubnetTest
{
@Test
@Test
...
...
core/src/main/java/com/github/shadowsocks/Core.kt
View file @
3997896a
...
@@ -44,6 +44,7 @@ import com.github.shadowsocks.aidl.ShadowsocksConnection
...
@@ -44,6 +44,7 @@ import com.github.shadowsocks.aidl.ShadowsocksConnection
import
com.github.shadowsocks.core.R
import
com.github.shadowsocks.core.R
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.database.ProfileManager
import
com.github.shadowsocks.database.ProfileManager
import
com.github.shadowsocks.net.TcpFastOpen
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.utils.*
import
com.github.shadowsocks.utils.*
import
com.google.firebase.FirebaseApp
import
com.google.firebase.FirebaseApp
...
...
core/src/main/java/com/github/shadowsocks/acl/Acl.kt
View file @
3997896a
...
@@ -25,8 +25,8 @@ import android.util.Log
...
@@ -25,8 +25,8 @@ import android.util.Log
import
androidx.recyclerview.widget.SortedList
import
androidx.recyclerview.widget.SortedList
import
com.crashlytics.android.Crashlytics
import
com.crashlytics.android.Crashlytics
import
com.github.shadowsocks.Core
import
com.github.shadowsocks.Core
import
com.github.shadowsocks.net.Subnet
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.utils.Subnet
import
com.github.shadowsocks.utils.asIterable
import
com.github.shadowsocks.utils.asIterable
import
java.io.File
import
java.io.File
import
java.io.IOException
import
java.io.IOException
...
...
core/src/main/java/com/github/shadowsocks/bg/TrafficMonitor.kt
View file @
3997896a
...
@@ -23,6 +23,7 @@ package com.github.shadowsocks.bg
...
@@ -23,6 +23,7 @@ package com.github.shadowsocks.bg
import
android.net.LocalSocket
import
android.net.LocalSocket
import
android.os.SystemClock
import
android.os.SystemClock
import
com.github.shadowsocks.aidl.TrafficStats
import
com.github.shadowsocks.aidl.TrafficStats
import
com.github.shadowsocks.net.LocalSocketListener
import
java.io.File
import
java.io.File
import
java.io.IOException
import
java.io.IOException
import
java.nio.ByteBuffer
import
java.nio.ByteBuffer
...
...
core/src/main/java/com/github/shadowsocks/bg/VpnService.kt
View file @
3997896a
...
@@ -34,9 +34,11 @@ import com.github.shadowsocks.Core
...
@@ -34,9 +34,11 @@ import com.github.shadowsocks.Core
import
com.github.shadowsocks.VpnRequestActivity
import
com.github.shadowsocks.VpnRequestActivity
import
com.github.shadowsocks.acl.Acl
import
com.github.shadowsocks.acl.Acl
import
com.github.shadowsocks.core.R
import
com.github.shadowsocks.core.R
import
com.github.shadowsocks.net.DefaultNetworkListener
import
com.github.shadowsocks.net.LocalSocketListener
import
com.github.shadowsocks.net.Subnet
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.utils.Key
import
com.github.shadowsocks.utils.Key
import
com.github.shadowsocks.utils.Subnet
import
com.github.shadowsocks.utils.parseNumericAddress
import
com.github.shadowsocks.utils.parseNumericAddress
import
com.github.shadowsocks.utils.printLog
import
com.github.shadowsocks.utils.printLog
import
kotlinx.coroutines.*
import
kotlinx.coroutines.*
...
...
core/src/main/java/com/github/shadowsocks/
bg
/DefaultNetworkListener.kt
→
core/src/main/java/com/github/shadowsocks/
net
/DefaultNetworkListener.kt
View file @
3997896a
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
* *
* *
*******************************************************************************/
*******************************************************************************/
package
com.github.shadowsocks.
bg
package
com.github.shadowsocks.
net
import
android.annotation.TargetApi
import
android.annotation.TargetApi
import
android.net.ConnectivityManager
import
android.net.ConnectivityManager
...
...
core/src/main/java/com/github/shadowsocks/
utils
/HttpsTest.kt
→
core/src/main/java/com/github/shadowsocks/
net
/HttpsTest.kt
View file @
3997896a
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
* *
* *
*******************************************************************************/
*******************************************************************************/
package
com.github.shadowsocks.
utils
package
com.github.shadowsocks.
net
import
android.os.SystemClock
import
android.os.SystemClock
import
androidx.lifecycle.MutableLiveData
import
androidx.lifecycle.MutableLiveData
...
@@ -28,6 +28,8 @@ import com.github.shadowsocks.Core.app
...
@@ -28,6 +28,8 @@ import com.github.shadowsocks.Core.app
import
com.github.shadowsocks.acl.Acl
import
com.github.shadowsocks.acl.Acl
import
com.github.shadowsocks.core.R
import
com.github.shadowsocks.core.R
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.utils.Key
import
com.github.shadowsocks.utils.responseLength
import
kotlinx.coroutines.*
import
kotlinx.coroutines.*
import
java.io.IOException
import
java.io.IOException
import
java.net.HttpURLConnection
import
java.net.HttpURLConnection
...
...
core/src/main/java/com/github/shadowsocks/
bg
/LocalSocketListener.kt
→
core/src/main/java/com/github/shadowsocks/
net
/LocalSocketListener.kt
View file @
3997896a
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
* *
* *
*******************************************************************************/
*******************************************************************************/
package
com.github.shadowsocks.
bg
package
com.github.shadowsocks.
net
import
android.net.LocalServerSocket
import
android.net.LocalServerSocket
import
android.net.LocalSocket
import
android.net.LocalSocket
...
...
core/src/main/java/com/github/shadowsocks/
utils
/Subnet.kt
→
core/src/main/java/com/github/shadowsocks/
net
/Subnet.kt
View file @
3997896a
...
@@ -18,8 +18,9 @@
...
@@ -18,8 +18,9 @@
* *
* *
*******************************************************************************/
*******************************************************************************/
package
com.github.shadowsocks.
utils
package
com.github.shadowsocks.
net
import
com.github.shadowsocks.utils.parseNumericAddress
import
java.net.InetAddress
import
java.net.InetAddress
import
java.util.*
import
java.util.*
...
...
core/src/main/java/com/github/shadowsocks/
utils
/TcpFastOpen.kt
→
core/src/main/java/com/github/shadowsocks/
net
/TcpFastOpen.kt
View file @
3997896a
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
* *
* *
*******************************************************************************/
*******************************************************************************/
package
com.github.shadowsocks.
utils
package
com.github.shadowsocks.
net
import
kotlinx.coroutines.runBlocking
import
kotlinx.coroutines.runBlocking
import
kotlinx.coroutines.withTimeoutOrNull
import
kotlinx.coroutines.withTimeoutOrNull
...
...
core/src/main/java/com/github/shadowsocks/preference/DataStore.kt
View file @
3997896a
...
@@ -27,7 +27,7 @@ import com.github.shadowsocks.database.PrivateDatabase
...
@@ -27,7 +27,7 @@ import com.github.shadowsocks.database.PrivateDatabase
import
com.github.shadowsocks.database.PublicDatabase
import
com.github.shadowsocks.database.PublicDatabase
import
com.github.shadowsocks.utils.DirectBoot
import
com.github.shadowsocks.utils.DirectBoot
import
com.github.shadowsocks.utils.Key
import
com.github.shadowsocks.utils.Key
import
com.github.shadowsocks.
utils
.TcpFastOpen
import
com.github.shadowsocks.
net
.TcpFastOpen
import
com.github.shadowsocks.utils.parsePort
import
com.github.shadowsocks.utils.parsePort
import
java.net.NetworkInterface
import
java.net.NetworkInterface
import
java.net.SocketException
import
java.net.SocketException
...
...
core/src/main/java/com/github/shadowsocks/utils/Utils.kt
View file @
3997896a
...
@@ -49,8 +49,8 @@ private val parseNumericAddress by lazy {
...
@@ -49,8 +49,8 @@ private val parseNumericAddress by lazy {
*
*
* Bug: https://issuetracker.google.com/issues/123456213
* Bug: https://issuetracker.google.com/issues/123456213
*/
*/
fun
String
?.
parseNumericAddress
():
InetAddress
?
=
Os
.
inet_pton
(
OsConstants
.
AF_INET
,
this
)
?:
fun
String
?.
parseNumericAddress
():
InetAddress
?
=
Os
.
inet_pton
(
OsConstants
.
AF_INET
,
this
)
Os
.
inet_pton
(
OsConstants
.
AF_INET6
,
this
)
?.
let
{
parseNumericAddress
.
invoke
(
null
,
this
)
as
InetAddress
}
?:
Os
.
inet_pton
(
OsConstants
.
AF_INET6
,
this
)
?.
let
{
parseNumericAddress
.
invoke
(
null
,
this
)
as
InetAddress
}
fun
parsePort
(
str
:
String
?,
default
:
Int
,
min
:
Int
=
1025
):
Int
{
fun
parsePort
(
str
:
String
?,
default
:
Int
,
min
:
Int
=
1025
):
Int
{
val
value
=
str
?.
toIntOrNull
()
?:
default
val
value
=
str
?.
toIntOrNull
()
?:
default
...
...
mobile/src/main/java/com/github/shadowsocks/GlobalSettingsPreferenceFragment.kt
View file @
3997896a
...
@@ -28,7 +28,7 @@ import com.github.shadowsocks.bg.BaseService
...
@@ -28,7 +28,7 @@ import com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.utils.DirectBoot
import
com.github.shadowsocks.utils.DirectBoot
import
com.github.shadowsocks.utils.Key
import
com.github.shadowsocks.utils.Key
import
com.github.shadowsocks.
utils
.TcpFastOpen
import
com.github.shadowsocks.
net
.TcpFastOpen
import
com.github.shadowsocks.utils.remove
import
com.github.shadowsocks.utils.remove
import
com.takisoft.preferencex.PreferenceFragmentCompat
import
com.takisoft.preferencex.PreferenceFragmentCompat
...
...
mobile/src/main/java/com/github/shadowsocks/acl/CustomRulesFragment.kt
View file @
3997896a
...
@@ -42,7 +42,7 @@ import com.github.shadowsocks.MainActivity
...
@@ -42,7 +42,7 @@ import com.github.shadowsocks.MainActivity
import
com.github.shadowsocks.R
import
com.github.shadowsocks.R
import
com.github.shadowsocks.ToolbarFragment
import
com.github.shadowsocks.ToolbarFragment
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.
utils
.Subnet
import
com.github.shadowsocks.
net
.Subnet
import
com.github.shadowsocks.utils.asIterable
import
com.github.shadowsocks.utils.asIterable
import
com.github.shadowsocks.utils.resolveResourceId
import
com.github.shadowsocks.utils.resolveResourceId
import
com.github.shadowsocks.widget.UndoSnackbarManager
import
com.github.shadowsocks.widget.UndoSnackbarManager
...
...
mobile/src/main/java/com/github/shadowsocks/widget/StatsBar.kt
View file @
3997896a
...
@@ -33,7 +33,7 @@ import androidx.lifecycle.get
...
@@ -33,7 +33,7 @@ import androidx.lifecycle.get
import
com.github.shadowsocks.MainActivity
import
com.github.shadowsocks.MainActivity
import
com.github.shadowsocks.R
import
com.github.shadowsocks.R
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.
utils
.HttpsTest
import
com.github.shadowsocks.
net
.HttpsTest
import
com.google.android.material.bottomappbar.BottomAppBar
import
com.google.android.material.bottomappbar.BottomAppBar
class
StatsBar
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
class
StatsBar
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
...
...
tv/src/main/java/com/github/shadowsocks/tv/MainPreferenceFragment.kt
View file @
3997896a
...
@@ -50,6 +50,8 @@ import com.github.shadowsocks.bg.BaseService
...
@@ -50,6 +50,8 @@ import com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.bg.Executable
import
com.github.shadowsocks.bg.Executable
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.database.ProfileManager
import
com.github.shadowsocks.database.ProfileManager
import
com.github.shadowsocks.net.HttpsTest
import
com.github.shadowsocks.net.TcpFastOpen
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.preference.OnPreferenceDataStoreChangeListener
import
com.github.shadowsocks.preference.OnPreferenceDataStoreChangeListener
import
com.github.shadowsocks.utils.*
import
com.github.shadowsocks.utils.*
...
...
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