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
a5d620ab
Commit
a5d620ab
authored
Aug 12, 2016
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace OpenSSL with mbedTLS
parent
0e7dbde4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
62 deletions
+62
-62
.gitmodules
.gitmodules
+3
-3
src/main/AndroidManifest.xml
src/main/AndroidManifest.xml
+2
-2
src/main/jni/Android.mk
src/main/jni/Android.mk
+24
-14
src/main/jni/include/shadowsocks-libev/config.h
src/main/jni/include/shadowsocks-libev/config.h
+31
-31
src/main/jni/libevent
src/main/jni/libevent
+1
-1
src/main/jni/mbedtls
src/main/jni/mbedtls
+1
-0
src/main/jni/openssl
src/main/jni/openssl
+0
-1
src/main/res/values/arrays.xml
src/main/res/values/arrays.xml
+0
-10
No files found.
.gitmodules
View file @
a5d620ab
...
...
@@ -9,9 +9,6 @@
path = src/main/jni/libancillary
url = https://github.com/shadowsocks/libancillary.git
branch = shadowsocks-android
[submodule "src/main/jni/openssl"]
path = src/main/jni/openssl
url = https://github.com/shadowsocks/openssl-android.git
[submodule "src/main/jni/libevent"]
path = src/main/jni/libevent
url = https://github.com/shadowsocks/libevent.git
...
...
@@ -30,3 +27,6 @@
[submodule "kcptun/go"]
path = kcptun/go
url = https://github.com/shadowsocks/go
[submodule "src/main/jni/mbedtls"]
path = src/main/jni/mbedtls
url = https://github.com/shadowsocks/mbedtls
src/main/AndroidManifest.xml
View file @
a5d620ab
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"com.github.shadowsocks"
android:versionCode=
"14
5
"
android:versionName=
"3.0.
3
"
>
android:versionCode=
"14
6
"
android:versionName=
"3.0.
4
"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
...
...
src/main/jni/Android.mk
View file @
a5d620ab
...
...
@@ -222,7 +222,7 @@ include $(CLEAR_VARS)
LIBEVENT_SOURCES
:=
\
buffer.c
\
bufferevent.c bufferevent_filter.c
\
bufferevent_
openssl.c bufferevent_
pair.c bufferevent_ratelim.c
\
bufferevent_pair.c bufferevent_ratelim.c
\
bufferevent_sock.c epoll.c
\
epoll_sub.c evdns.c event.c
\
event_tagging.c evmap.c
\
...
...
@@ -236,7 +236,6 @@ LOCAL_MODULE := event
LOCAL_SRC_FILES
:=
$(
addprefix
libevent/,
$(LIBEVENT_SOURCES)
)
LOCAL_CFLAGS
:=
-O2
-I
$(LOCAL_PATH)
/libevent
\
-I
$(LOCAL_PATH)
/libevent/include
\
-I
$(LOCAL_PATH)
/openssl/include
include
$(BUILD_STATIC_LIBRARY)
...
...
@@ -387,11 +386,11 @@ SHADOWSOCKS_SOURCES := local.c cache.c udprelay.c encrypt.c utils.c netutils.c j
LOCAL_MODULE
:=
ss-local
LOCAL_SRC_FILES
:=
$(
addprefix
shadowsocks-libev/src/,
$(SHADOWSOCKS_SOURCES)
)
LOCAL_CFLAGS
:=
-Wall
-O2
-fno-strict-aliasing
-DMODULE_LOCAL
\
-DUSE_CRYPTO_
OPENSSL
-DANDROID
-DHAVE_CONFIG_H
\
-DUSE_CRYPTO_
MBEDTLS
-DANDROID
-DHAVE_CONFIG_H
\
-DCONNECT_IN_PROGRESS
=
EINPROGRESS
\
-I
$(LOCAL_PATH)
/include
\
-I
$(LOCAL_PATH)
/libancillary
\
-I
$(LOCAL_PATH)
/
openssl
/include
\
-I
$(LOCAL_PATH)
/
mbedtls
/include
\
-I
$(LOCAL_PATH)
/shadowsocks-libev/libudns
\
-I
$(LOCAL_PATH)
/shadowsocks-libev/libcork/include
\
-I
$(LOCAL_PATH)
/shadowsocks-libev/libsodium/src/libsodium/include
\
...
...
@@ -400,7 +399,7 @@ LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DMODULE_LOCAL \
-I
$(LOCAL_PATH)
/shadowsocks-libev/libev
\
-I
$(LOCAL_PATH)
/include/shadowsocks-libev
LOCAL_STATIC_LIBRARIES
:=
libev lib
crypto
libipset libcork libudns libsodium libancillary
LOCAL_STATIC_LIBRARIES
:=
libev lib
mbedtls
libipset libcork libudns libsodium libancillary
LOCAL_LDLIBS
:=
-llog
...
...
@@ -417,7 +416,7 @@ SHADOWSOCKS_SOURCES := tunnel.c cache.c udprelay.c encrypt.c utils.c netutils.c
LOCAL_MODULE
:=
ss-tunnel
LOCAL_SRC_FILES
:=
$(
addprefix
shadowsocks-libev/src/,
$(SHADOWSOCKS_SOURCES)
)
LOCAL_CFLAGS
:=
-Wall
-O2
-fno-strict-aliasing
-DMODULE_TUNNEL
\
-DUSE_CRYPTO_
OPENSSL
-DANDROID
-DHAVE_CONFIG_H
-DSSTUNNEL_JNI
\
-DUSE_CRYPTO_
MBEDTLS
-DANDROID
-DHAVE_CONFIG_H
-DSSTUNNEL_JNI
\
-DCONNECT_IN_PROGRESS
=
EINPROGRESS
\
-I
$(LOCAL_PATH)
/libancillary
\
-I
$(LOCAL_PATH)
/include
\
...
...
@@ -425,11 +424,11 @@ LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DMODULE_TUNNEL \
-I
$(LOCAL_PATH)
/shadowsocks-libev/libcork/include
\
-I
$(LOCAL_PATH)
/shadowsocks-libev/libsodium/src/libsodium/include
\
-I
$(LOCAL_PATH)
/shadowsocks-libev/libsodium/src/libsodium/include/sodium
\
-I
$(LOCAL_PATH)
/
openssl
/include
\
-I
$(LOCAL_PATH)
/
mbedtls
/include
\
-I
$(LOCAL_PATH)
/shadowsocks-libev/libev
\
-I
$(LOCAL_PATH)
/include/shadowsocks-libev
LOCAL_STATIC_LIBRARIES
:=
libev lib
crypto
libsodium libcork libudns libancillary
LOCAL_STATIC_LIBRARIES
:=
libev lib
mbedtls
libsodium libcork libudns libancillary
LOCAL_LDLIBS
:=
-llog
...
...
@@ -546,12 +545,23 @@ LOCAL_SRC_FILES := $(addprefix badvpn/, $(TUN2SOCKS_SOURCES))
include
$(BUILD_EXECUTABLE)
# OpenSSL
openssl_subdirs
:=
$(
addprefix
$(LOCAL_PATH)
/openssl/,
$(
addsuffix
/Android.mk,
\
crypto
\
ssl
\
))
include
$(openssl_subdirs)
########################################################
## mbed TLS
########################################################
include
$(CLEAR_VARS)
LOCAL_MODULE
:=
mbedtls
LOCAL_C_INCLUDES
:=
$(LOCAL_PATH)
/mbedtls/include
MBEDTLS_SOURCES
:=
$(
wildcard
$(LOCAL_PATH)
/mbedtls/library/
*
.c
)
LOCAL_SRC_FILES
:=
$
(
MBEDTLS_SOURCES:
$(LOCAL_PATH)
/%
=
%
)
LOCAL_LDLIBS
:=
-ldl
-llog
include
$(BUILD_STATIC_LIBRARY)
# Import cpufeatures
$(call
import-module,android/cpufeatures)
src/main/jni/include/shadowsocks-libev/config.h
View file @
a5d620ab
...
...
@@ -26,7 +26,7 @@
/* #undef HAVE_CCCRYPTORCREATEWITHMODE */
/* Define to 1 if you have the `clock_gettime' function. */
#define HAVE_CLOCK_GETTIME 1
/* #undef HAVE_CLOCK_GETTIME */
/* Define to 1 to use the syscall interface for clock_gettime */
/* #undef HAVE_CLOCK_SYSCALL */
...
...
@@ -42,13 +42,13 @@
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `epoll_ctl' function. */
#define HAVE_EPOLL_CTL 1
/* #undef HAVE_EPOLL_CTL */
/* Define to 1 if you have the `eventfd' function. */
#define HAVE_EVENTFD 1
/* #undef HAVE_EVENTFD */
/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
#define HAVE_EVP_ENCRYPTINIT_EX 1
/* #undef HAVE_EVP_ENCRYPTINIT_EX */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
...
...
@@ -66,7 +66,7 @@
/* #undef HAVE_INET_NTOP */
/* Define to 1 if you have the `inotify_init' function. */
#define HAVE_INOTIFY_INIT 1
/* #undef HAVE_INOTIFY_INIT */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
...
...
@@ -75,7 +75,7 @@
#define HAVE_IPv6 1
/* Define to 1 if you have the `kqueue' function. */
/* #undef HAVE_KQUEUE */
#define HAVE_KQUEUE 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
...
...
@@ -90,14 +90,14 @@
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/if.h> header file. */
#define HAVE_LINUX_IF_H 1
/* #undef HAVE_LINUX_IF_H */
/* Define to 1 if you have the <linux/netfilter_ipv4.h> header file. */
#define HAVE_LINUX_NETFILTER_IPV4_H 1
/* #undef HAVE_LINUX_NETFILTER_IPV4_H */
/* Define to 1 if you have the <linux/netfilter_ipv6/ip6_tables.h> header
file. */
#define HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H 1
/* #undef HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
...
...
@@ -124,25 +124,25 @@
#define HAVE_NET_IF_H 1
/* Define to 1 if you have the <openssl/engine.h> header file. */
#define HAVE_OPENSSL_ENGINE_H 1
/* #undef HAVE_OPENSSL_ENGINE_H */
/* Define to 1 if you have the <openssl/err.h> header file. */
#define HAVE_OPENSSL_ERR_H 1
/* #undef HAVE_OPENSSL_ERR_H */
/* Define to 1 if you have the <openssl/evp.h> header file. */
#define HAVE_OPENSSL_EVP_H 1
/* #undef HAVE_OPENSSL_EVP_H */
/* Define to 1 if you have the <openssl/pem.h> header file. */
#define HAVE_OPENSSL_PEM_H 1
/* #undef HAVE_OPENSSL_PEM_H */
/* Define to 1 if you have the <openssl/rand.h> header file. */
#define HAVE_OPENSSL_RAND_H 1
/* #undef HAVE_OPENSSL_RAND_H */
/* Define to 1 if you have the <openssl/rsa.h> header file. */
#define HAVE_OPENSSL_RSA_H 1
/* #undef HAVE_OPENSSL_RSA_H */
/* Define to 1 if you have the <openssl/sha.h> header file. */
#define HAVE_OPENSSL_SHA_H 1
/* #undef HAVE_OPENSSL_SHA_H */
/* Define to 1 if you have the `poll' function. */
#define HAVE_POLL 1
...
...
@@ -160,13 +160,13 @@
#define HAVE_PTHREAD_PRIO_INHERIT 1
/* Define to 1 if you have the `RAND_pseudo_bytes' function. */
#define HAVE_RAND_PSEUDO_BYTES 1
/* #undef HAVE_RAND_PSEUDO_BYTES */
/* Define to 1 if you have the 'select' function. */
#define HAVE_SELECT 1
/* Define to 1 if you have the `setresuid' function. */
#define HAVE_SETRESUID 1
/* #undef HAVE_SETRESUID */
/* Define to 1 if you have the `setreuid' function. */
#define HAVE_SETREUID 1
...
...
@@ -175,7 +175,7 @@
#define HAVE_SETRLIMIT 1
/* Define to 1 if you have the `signalfd' function. */
#define HAVE_SIGNALFD 1
/* #undef HAVE_SIGNALFD */
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
...
...
@@ -196,16 +196,16 @@
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/epoll.h> header file. */
#define HAVE_SYS_EPOLL_H 1
/* #undef HAVE_SYS_EPOLL_H */
/* Define to 1 if you have the <sys/eventfd.h> header file. */
#define HAVE_SYS_EVENTFD_H 1
/* #undef HAVE_SYS_EVENTFD_H */
/* Define to 1 if you have the <sys/event.h> header file. */
/* #undef HAVE_SYS_EVENT_H */
#define HAVE_SYS_EVENT_H 1
/* Define to 1 if you have the <sys/inotify.h> header file. */
#define HAVE_SYS_INOTIFY_H 1
/* #undef HAVE_SYS_INOTIFY_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
...
...
@@ -214,7 +214,7 @@
#define HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/signalfd.h> header file. */
#define HAVE_SYS_SIGNALFD_H 1
/* #undef HAVE_SYS_SIGNALFD_H */
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
...
...
@@ -253,10 +253,10 @@
/* #undef HAVE_WS2TCPIP_H */
/* have zlib compression support */
#define HAVE_ZLIB 1
/* #undef HAVE_ZLIB */
/* Define to 1 if you have the <zlib.h> header file. */
#define HAVE_ZLIB_H 1
/* #undef HAVE_ZLIB_H */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
...
...
@@ -275,7 +275,7 @@
#define PACKAGE_NAME "shadowsocks-libev"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "shadowsocks-libev 2.4.
7
"
#define PACKAGE_STRING "shadowsocks-libev 2.4.
8
"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "shadowsocks-libev"
...
...
@@ -284,7 +284,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "2.4.
7
"
#define PACKAGE_VERSION "2.4.
8
"
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
...
...
@@ -315,10 +315,10 @@
/* #undef USE_CRYPTO_APPLECC */
/* Use mbed TLS library */
/* #undef USE_CRYPTO_MBEDTLS */
#define USE_CRYPTO_MBEDTLS 1
/* Use OpenSSL library */
#define USE_CRYPTO_OPENSSL 1
/* #undef USE_CRYPTO_OPENSSL */
/* Use PolarSSL library */
/* #undef USE_CRYPTO_POLARSSL */
...
...
@@ -346,7 +346,7 @@
/* Version number of package */
#define VERSION "2.4.
7
"
#define VERSION "2.4.
8
"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
...
...
libevent
@
5d5914f0
Subproject commit 5
74f6b81c90883cc8e6174d4cf57c6feab28cdcd
Subproject commit 5
d5914f00b8adefd383f66b8b352855ece22a1d7
mbedtls
@
1e4ec667
Subproject commit 1e4ec667a4dd5f06ccc41d69cdef3e07f92fa242
openssl
@
c51144d7
Subproject commit c51144d76d0a0bbaf3117df6c0f1a97e11ebf661
src/main/res/values/arrays.xml
View file @
a5d620ab
...
...
@@ -14,11 +14,6 @@
<item>
CAMELLIA-128-CFB
</item>
<item>
CAMELLIA-192-CFB
</item>
<item>
CAMELLIA-256-CFB
</item>
<item>
CAST5-CFB
</item>
<item>
DES-CFB
</item>
<item>
IDEA-CFB
</item>
<item>
RC2-CFB
</item>
<item>
SEED-CFB
</item>
<item>
SALSA20
</item>
<item>
CHACHA20
</item>
<item>
CHACHA20-IETF
</item>
...
...
@@ -38,11 +33,6 @@
<item>
camellia-128-cfb
</item>
<item>
camellia-192-cfb
</item>
<item>
camellia-256-cfb
</item>
<item>
cast5-cfb
</item>
<item>
des-cfb
</item>
<item>
idea-cfb
</item>
<item>
rc2-cfb
</item>
<item>
seed-cfb
</item>
<item>
salsa20
</item>
<item>
chacha20
</item>
<item>
chacha20-ietf
</item>
...
...
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