mirror of https://github.com/NekoX-Dev/NekoX.git
迁移到 ss-rust
This commit is contained in:
parent
604214b68b
commit
a316b57604
|
@ -0,0 +1,40 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
ssBuild:
|
||||
name: SS-Rust Build
|
||||
runs-on: ubuntu-latest
|
||||
if: "contains(github.event.head_commit.message, '[R]')"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle
|
||||
key: native-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- run: git submodule update --init --recursive
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: install rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
- name: setup rust targets
|
||||
run: rustup target install armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android
|
||||
- name: assemble
|
||||
run: |
|
||||
./gradlew ss-rust:assembleRelease
|
||||
ls ss-rust/build/outputs/aar
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: NekoX-Foss
|
||||
path: ss-rust/build/outputs/aar
|
|
@ -9,7 +9,7 @@ jobs:
|
|||
canaryBuild:
|
||||
name: Canary Build
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, '[D]') && !contains(github.event.head_commit.message, '[RELEASE]') && !contains(github.event.head_commit.message, '[N]')"
|
||||
if: "!contains(github.event.head_commit.message, '[R]') && !contains(github.event.head_commit.message, '[RELEASE]') && !contains(github.event.head_commit.message, '[N]')"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/cache@v1
|
||||
|
|
|
@ -7,28 +7,10 @@
|
|||
[submodule "TMessagesProj/jni/boringssl"]
|
||||
path = TMessagesProj/jni/boringssl
|
||||
url = https://github.com/google/boringssl
|
||||
[submodule "ss-libev/src/main/jni/shadowsocks-libev"]
|
||||
path = ss-libev/src/main/jni/shadowsocks-libev
|
||||
url = https://github.com/shadowsocks/shadowsocks-libev
|
||||
[submodule "ss-libev/src/main/jni/libancillary"]
|
||||
path = ss-libev/src/main/jni/libancillary
|
||||
url = https://github.com/shadowsocks/libancillary.git
|
||||
branch = shadowsocks-android
|
||||
[submodule "ss-libev/src/main/jni/mbedtls"]
|
||||
path = ss-libev/src/main/jni/mbedtls
|
||||
url = https://github.com/ARMmbed/mbedtls
|
||||
[submodule "ss-libev/src/main/jni/pcre"]
|
||||
path = ss-libev/src/main/jni/pcre
|
||||
url = https://android.googlesource.com/platform/external/pcre
|
||||
[submodule "ss-libev/src/main/jni/libsodium"]
|
||||
path = ss-libev/src/main/jni/libsodium
|
||||
url = https://github.com/jedisct1/libsodium.git
|
||||
[submodule "ss-libev/src/main/jni/libev"]
|
||||
path = ss-libev/src/main/jni/libev
|
||||
url = https://git.lighttpd.net/mirrors/libev.git
|
||||
[submodule "ss-libev/src/main/jni/re2"]
|
||||
path = ss-libev/src/main/jni/re2
|
||||
url = https://github.com/google/re2.git
|
||||
|
||||
[submodule "ss-rust/src/main/rust/shadowsocks-rust"]
|
||||
path = ss-rust/src/main/rust/shadowsocks-rust
|
||||
url = https://github.com/shadowsocks/shadowsocks-rust.git
|
||||
|
||||
[submodule "shadowsocksr-libev"]
|
||||
path = ssr-libev/src/main/jni/shadowsocks-libev
|
||||
|
|
|
@ -54,11 +54,13 @@ dependencies {
|
|||
implementation 'org.dizitart:nitrite:3.4.1'
|
||||
implementation 'net.lingala.zip4j:zip4j:2.5.2'
|
||||
|
||||
implementation 'cn.hutool:hutool-all:5.3.2'
|
||||
implementation 'cn.hutool:hutool-core:5.3.2'
|
||||
implementation 'cn.hutool:hutool-crypto:5.3.2'
|
||||
|
||||
implementation 'org.tukaani:xz:1.8'
|
||||
|
||||
implementation files('libs/libv2ray.aar')
|
||||
implementation files('libs/ss-libev-release.aar')
|
||||
implementation files('libs/ss-rust-release.aar')
|
||||
implementation files('libs/ssr-libev-release.aar')
|
||||
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -781,7 +781,6 @@ public class ConnectionsManager extends BaseController {
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
private static class ResolveHostByNameTask extends AsyncTask<Void, Void, ResolvedDomain> {
|
||||
|
||||
private ArrayList<Long> addresses = new ArrayList<>();
|
||||
|
|
|
@ -144,9 +144,9 @@ public class ExternalGcm {
|
|||
|
||||
manager.getAppUpdateInfo().addOnSuccessListener((appUpdateInfo) -> {
|
||||
|
||||
if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE) {
|
||||
if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.availableVersionCode() <= BuildConfig.VERSION_CODE) {
|
||||
|
||||
if (appUpdateInfo.availableVersionCode() <= BuildConfig.VERSION_CODE) return;
|
||||
FileLog.d("update available");
|
||||
|
||||
try {
|
||||
|
||||
|
@ -155,6 +155,10 @@ public class ExternalGcm {
|
|||
} catch (IntentSender.SendIntentException ignored) {
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
FileLog.d("no updates");
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -9,6 +9,7 @@ import okhttp3.Response
|
|||
import okhttp3.internal.closeQuietly
|
||||
import org.json.JSONObject
|
||||
import org.telegram.messenger.BuildConfig
|
||||
import org.telegram.messenger.FileLog
|
||||
import org.telegram.messenger.LocaleController
|
||||
import org.telegram.messenger.R
|
||||
import org.tukaani.xz.XZInputStream
|
||||
|
@ -30,15 +31,19 @@ object UpdateUtil {
|
|||
|
||||
if (ExternalGcm.checkPlayServices()) {
|
||||
|
||||
FileLog.d("checking updates from google play")
|
||||
|
||||
ExternalGcm.checkUpdate(ctx)
|
||||
|
||||
return@runOnIoDispatcher
|
||||
|
||||
}
|
||||
|
||||
FileLog.d("checking updates from repo")
|
||||
|
||||
if (System.currentTimeMillis() - NekoXConfig.preferences.getLong("ignored_update_at", -1) > 1 * 60 * 60 * 1000L) {
|
||||
|
||||
// ignored
|
||||
FileLog.d("ignored")
|
||||
|
||||
return@runOnIoDispatcher
|
||||
|
||||
|
@ -54,6 +59,8 @@ object UpdateUtil {
|
|||
|
||||
if (code > BuildConfig.VERSION_CODE.coerceAtLeast(NekoXConfig.preferences.getInt("ignore_update", -1))) UIUtil.runOnUIThread {
|
||||
|
||||
FileLog.d("update available")
|
||||
|
||||
val builder = BottomBuilder(ctx)
|
||||
|
||||
builder.addTitle(LocaleController.getString("UpdateAvailable", R.string.UpdateAvailable), updateInfo.getString("version"))
|
||||
|
@ -86,10 +93,18 @@ object UpdateUtil {
|
|||
|
||||
builder.show()
|
||||
|
||||
} else {
|
||||
|
||||
FileLog.d("no updates")
|
||||
|
||||
}
|
||||
|
||||
return@runOnIoDispatcher
|
||||
|
||||
}.onFailure {
|
||||
|
||||
FileLog.d(it.toString())
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,12 +4,14 @@ buildscript {
|
|||
jcenter()
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0'
|
||||
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
include ':ssr-libev'
|
||||
include ':ss-libev'
|
||||
include ':TMessagesProj'
|
||||
include ':ss-rust'
|
||||
include ':ssr-libev'
|
|
@ -1,32 +0,0 @@
|
|||
plugins {
|
||||
id 'com.android.library'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.3"
|
||||
ndkVersion "21.0.6113669"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
arguments "NDK_APPLICATION_MK:=src/main/jni/Application.mk", "APP_PLATFORM:=android-21", "--jobs=8"
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
path 'src/main/jni/Android.mk'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,293 +0,0 @@
|
|||
# Copyright (C) 2009 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
ROOT_PATH := $(LOCAL_PATH)
|
||||
|
||||
BUILD_SHARED_EXECUTABLE := $(LOCAL_PATH)/build-shared-executable.mk
|
||||
|
||||
########################################################
|
||||
## libsodium
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
SODIUM_SOURCE := \
|
||||
crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c \
|
||||
crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \
|
||||
crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \
|
||||
crypto_core/ed25519/ref10/ed25519_ref10.c \
|
||||
crypto_core/hchacha20/core_hchacha20.c \
|
||||
crypto_core/salsa/ref/core_salsa_ref.c \
|
||||
crypto_generichash/blake2b/ref/blake2b-compress-ref.c \
|
||||
crypto_generichash/blake2b/ref/blake2b-ref.c \
|
||||
crypto_generichash/blake2b/ref/generichash_blake2b.c \
|
||||
crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \
|
||||
crypto_onetimeauth/poly1305/donna/poly1305_donna.c \
|
||||
crypto_pwhash/crypto_pwhash.c \
|
||||
crypto_pwhash/argon2/argon2-core.c \
|
||||
crypto_pwhash/argon2/argon2.c \
|
||||
crypto_pwhash/argon2/argon2-encoding.c \
|
||||
crypto_pwhash/argon2/argon2-fill-block-ref.c \
|
||||
crypto_pwhash/argon2/blake2b-long.c \
|
||||
crypto_pwhash/argon2/pwhash_argon2i.c \
|
||||
crypto_scalarmult/curve25519/scalarmult_curve25519.c \
|
||||
crypto_scalarmult/curve25519/ref10/x25519_ref10.c \
|
||||
crypto_stream/chacha20/stream_chacha20.c \
|
||||
crypto_stream/chacha20/ref/chacha20_ref.c \
|
||||
crypto_stream/salsa20/stream_salsa20.c \
|
||||
crypto_stream/salsa20/ref/salsa20_ref.c \
|
||||
crypto_verify/sodium/verify.c \
|
||||
randombytes/randombytes.c \
|
||||
randombytes/sysrandom/randombytes_sysrandom.c \
|
||||
sodium/core.c \
|
||||
sodium/runtime.c \
|
||||
sodium/utils.c \
|
||||
sodium/version.c
|
||||
|
||||
LOCAL_MODULE := sodium
|
||||
LOCAL_CFLAGS += -I$(LOCAL_PATH)/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/include \
|
||||
-I$(LOCAL_PATH)/include/sodium \
|
||||
-I$(LOCAL_PATH)/libsodium/src/libsodium/include/sodium \
|
||||
-DPACKAGE_NAME=\"libsodium\" -DPACKAGE_TARNAME=\"libsodium\" \
|
||||
-DPACKAGE_VERSION=\"1.0.15\" -DPACKAGE_STRING=\"libsodium-1.0.15\" \
|
||||
-DPACKAGE_BUGREPORT=\"https://github.com/jedisct1/libsodium/issues\" \
|
||||
-DPACKAGE_URL=\"https://github.com/jedisct1/libsodium\" \
|
||||
-DPACKAGE=\"libsodium\" -DVERSION=\"1.0.15\" \
|
||||
-DHAVE_PTHREAD=1 \
|
||||
-DSTDC_HEADERS=1 \
|
||||
-DHAVE_SYS_TYPES_H=1 \
|
||||
-DHAVE_SYS_STAT_H=1 \
|
||||
-DHAVE_STDLIB_H=1 \
|
||||
-DHAVE_STRING_H=1 \
|
||||
-DHAVE_MEMORY_H=1 \
|
||||
-DHAVE_STRINGS_H=1 \
|
||||
-DHAVE_INTTYPES_H=1 \
|
||||
-DHAVE_STDINT_H=1 \
|
||||
-DHAVE_UNISTD_H=1 \
|
||||
-D__EXTENSIONS__=1 \
|
||||
-D_ALL_SOURCE=1 \
|
||||
-D_GNU_SOURCE=1 \
|
||||
-D_POSIX_PTHREAD_SEMANTICS=1 \
|
||||
-D_TANDEM_SOURCE=1 \
|
||||
-DHAVE_DLFCN_H=1 \
|
||||
-DLT_OBJDIR=\".libs/\" \
|
||||
-DHAVE_SYS_MMAN_H=1 \
|
||||
-DNATIVE_LITTLE_ENDIAN=1 \
|
||||
-DASM_HIDE_SYMBOL=.hidden \
|
||||
-DHAVE_WEAK_SYMBOLS=1 \
|
||||
-DHAVE_ATOMIC_OPS=1 \
|
||||
-DHAVE_ARC4RANDOM=1 \
|
||||
-DHAVE_ARC4RANDOM_BUF=1 \
|
||||
-DHAVE_MMAP=1 \
|
||||
-DHAVE_MLOCK=1 \
|
||||
-DHAVE_MADVISE=1 \
|
||||
-DHAVE_MPROTECT=1 \
|
||||
-DHAVE_NANOSLEEP=1 \
|
||||
-DHAVE_POSIX_MEMALIGN=1 \
|
||||
-DHAVE_GETPID=1 \
|
||||
-DCONFIGURED=1
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix libsodium/src/libsodium/,$(SODIUM_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libancillary
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
ANCILLARY_SOURCE := fd_recv.c fd_send.c
|
||||
|
||||
LOCAL_MODULE := libancillary
|
||||
LOCAL_CFLAGS += -I$(LOCAL_PATH)/libancillary
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix libancillary/, $(ANCILLARY_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libbloom
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
BLOOM_SOURCE := bloom.c murmur2/MurmurHash2.c
|
||||
|
||||
LOCAL_MODULE := libbloom
|
||||
LOCAL_CFLAGS += -I$(LOCAL_PATH)/shadowsocks-libev/libbloom \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libbloom/murmur2
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libbloom/, $(BLOOM_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libipset
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
bdd_src = bdd/assignments.c bdd/basics.c bdd/bdd-iterator.c bdd/expanded.c \
|
||||
bdd/reachable.c bdd/read.c bdd/write.c
|
||||
map_src = map/allocation.c map/inspection.c map/ipv4_map.c map/ipv6_map.c \
|
||||
map/storage.c
|
||||
set_src = set/allocation.c set/inspection.c set/ipv4_set.c set/ipv6_set.c \
|
||||
set/iterator.c set/storage.c
|
||||
|
||||
IPSET_SOURCE := general.c $(bdd_src) $(map_src) $(set_src)
|
||||
|
||||
LOCAL_MODULE := libipset
|
||||
LOCAL_CFLAGS += -I$(LOCAL_PATH)/shadowsocks-libev/libipset/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libcork/include
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libipset/src/libipset/,$(IPSET_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libcork
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
cli_src := cli/commands.c
|
||||
core_src := core/allocator.c core/error.c core/gc.c \
|
||||
core/hash.c core/ip-address.c core/mempool.c \
|
||||
core/timestamp.c core/u128.c
|
||||
ds_src := ds/array.c ds/bitset.c ds/buffer.c ds/dllist.c \
|
||||
ds/file-stream.c ds/hash-table.c ds/managed-buffer.c \
|
||||
ds/ring-buffer.c ds/slice.c
|
||||
posix_src := posix/directory-walker.c posix/env.c posix/exec.c \
|
||||
posix/files.c posix/process.c posix/subprocess.c
|
||||
pthreads_src := pthreads/thread.c
|
||||
|
||||
CORK_SOURCE := $(cli_src) $(core_src) $(ds_src) $(posix_src) $(pthreads_src)
|
||||
|
||||
LOCAL_MODULE := libcork
|
||||
LOCAL_CFLAGS += -I$(LOCAL_PATH)/shadowsocks-libev/libcork/include \
|
||||
-DCORK_API=CORK_LOCAL
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libcork/src/libcork/,$(CORK_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libev
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libev
|
||||
LOCAL_CFLAGS += -DNDEBUG -DHAVE_CONFIG_H \
|
||||
-I$(LOCAL_PATH)/include/libev
|
||||
LOCAL_SRC_FILES := \
|
||||
libev/ev.c \
|
||||
libev/event.c
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## shadowsocks-libev local
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
SHADOWSOCKS_SOURCES := local.c \
|
||||
cache.c udprelay.c utils.c netutils.c json.c jconf.c \
|
||||
acl.c http.c tls.c rule.c \
|
||||
crypto.c aead.c stream.c base64.c \
|
||||
plugin.c ppbloom.c \
|
||||
android.c
|
||||
|
||||
LOCAL_MODULE := ss-local
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/src/, $(SHADOWSOCKS_SOURCES))
|
||||
LOCAL_CFLAGS := -Wall -fno-strict-aliasing -DMODULE_LOCAL \
|
||||
-DUSE_CRYPTO_MBEDTLS -DHAVE_CONFIG_H \
|
||||
-DCONNECT_IN_PROGRESS=EINPROGRESS \
|
||||
-I$(LOCAL_PATH)/include/shadowsocks-libev \
|
||||
-I$(LOCAL_PATH)/include \
|
||||
-I$(LOCAL_PATH)/libancillary \
|
||||
-I$(LOCAL_PATH)/mbedtls/include \
|
||||
-I$(LOCAL_PATH)/pcre \
|
||||
-I$(LOCAL_PATH)/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/libsodium/src/libsodium/include/sodium \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libcork/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libipset/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libbloom \
|
||||
-I$(LOCAL_PATH)/libev
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libev libmbedtls libipset libcork libbloom \
|
||||
libsodium libancillary libpcre
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_SHARED_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## 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)/%=%)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## pcre
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := pcre
|
||||
|
||||
LOCAL_CFLAGS += -DHAVE_CONFIG_H
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/pcre/dist $(LOCAL_PATH)/pcre
|
||||
|
||||
libpcre_src_files := \
|
||||
dist/pcre_byte_order.c \
|
||||
dist/pcre_compile.c \
|
||||
dist/pcre_config.c \
|
||||
dist/pcre_dfa_exec.c \
|
||||
dist/pcre_exec.c \
|
||||
dist/pcre_fullinfo.c \
|
||||
dist/pcre_get.c \
|
||||
dist/pcre_globals.c \
|
||||
dist/pcre_jit_compile.c \
|
||||
dist/pcre_maketables.c \
|
||||
dist/pcre_newline.c \
|
||||
dist/pcre_ord2utf8.c \
|
||||
dist/pcre_refcount.c \
|
||||
dist/pcre_string_utils.c \
|
||||
dist/pcre_study.c \
|
||||
dist/pcre_tables.c \
|
||||
dist/pcre_ucd.c \
|
||||
dist/pcre_valid_utf8.c \
|
||||
dist/pcre_version.c \
|
||||
dist/pcre_xclass.c
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix pcre/, $(libpcre_src_files)) $(LOCAL_PATH)/patch/pcre/pcre_chartables.c
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
|
@ -1 +0,0 @@
|
|||
APP_STL := c++_static
|
|
@ -1,31 +0,0 @@
|
|||
# Copyright (C) 2009 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# this file is included from Android.mk files to build a target-specific
|
||||
# executable program
|
||||
#
|
||||
# Modified by @Mygod, based on:
|
||||
# https://android.googlesource.com/platform/ndk/+/a355a4e/build/core/build-shared-library.mk
|
||||
# https://android.googlesource.com/platform/ndk/+/a355a4e/build/core/build-executable.mk
|
||||
LOCAL_BUILD_SCRIPT := BUILD_EXECUTABLE
|
||||
LOCAL_MAKEFILE := $(local-makefile)
|
||||
$(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT))
|
||||
$(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE))
|
||||
$(call check-LOCAL_MODULE_FILENAME)
|
||||
# we are building target objects
|
||||
my := TARGET_
|
||||
$(call handle-module-filename,lib,$(TARGET_SONAME_EXTENSION))
|
||||
$(call handle-module-built)
|
||||
LOCAL_MODULE_CLASS := EXECUTABLE
|
||||
include $(BUILD_SYSTEM)/build-module.mk
|
|
@ -1,126 +0,0 @@
|
|||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
/* Define to 1 to use the syscall interface for clock_gettime */
|
||||
#define HAVE_CLOCK_SYSCALL 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the `epoll_ctl' function. */
|
||||
#define HAVE_EPOLL_CTL 1
|
||||
|
||||
/* Define to 1 if you have the `eventfd' function. */
|
||||
#define HAVE_EVENTFD 1
|
||||
|
||||
/* Define to 1 if the floor function is available */
|
||||
#define HAVE_FLOOR 1
|
||||
|
||||
/* Define to 1 if you have the `inotify_init' function. */
|
||||
#define HAVE_INOTIFY_INIT 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `kqueue' function. */
|
||||
/* #undef HAVE_KQUEUE */
|
||||
|
||||
/* Define to 1 if you have the `rt' library (-lrt). */
|
||||
/* #undef HAVE_LIBRT */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `nanosleep' function. */
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#define HAVE_POLL 1
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#define HAVE_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the `port_create' function. */
|
||||
/* #undef HAVE_PORT_CREATE */
|
||||
|
||||
/* Define to 1 if you have the <port.h> header file. */
|
||||
/* #undef HAVE_PORT_H */
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the `signalfd' function. */
|
||||
#define HAVE_SIGNALFD 0
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
#define HAVE_SYS_EPOLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/eventfd.h> header file. */
|
||||
#define HAVE_SYS_EVENTFD_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/event.h> header file. */
|
||||
/* #undef HAVE_SYS_EVENT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/inotify.h> header file. */
|
||||
#define HAVE_SYS_INOTIFY_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/signalfd.h> header file. */
|
||||
#define HAVE_SYS_SIGNALFD_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "libev"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT ""
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME ""
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING ""
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME ""
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION ""
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "4.11"
|
|
@ -1,437 +0,0 @@
|
|||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
#ifndef _CONFIG_H_
|
||||
#define _CONFIG_H_
|
||||
|
||||
/* ONLY EDIT acconfig.h, NEVER config.h or config.h.in!
|
||||
* config.h MAY BE OVERWRITTEN BY make, config.h.in by autoheader! */
|
||||
|
||||
/* Define your Target here. Currently defined are TARGET_LINUX (any
|
||||
* architecture), TARGET_BSD (experimental; tested on FreeBSD, hopefully
|
||||
* works for other BSD variants) and TARGET_CYGWIN. */
|
||||
#define TARGET TARGET_LINUX
|
||||
|
||||
/* change the #undef to #define if you do not want to compile with special
|
||||
* ISDN support for Linux. Note that the ISDN support will not compile ok on
|
||||
* unpatched kernerls earlier than 2.2.12 (if you did apply newer isdn patches,
|
||||
* it may work fine). This is not on by default because it will cause compile
|
||||
* problems on some systems */
|
||||
/* #undef ISDN_SUPPORT */
|
||||
|
||||
/* The following regulates the IP Protocol support. Supported types are IPv4
|
||||
* and IPv6 (aka IPng). You may enable either or both of these protocols.
|
||||
* Enabling in this context means that support for the respective protocol
|
||||
* will be in the binary. When running the binary, one of the protocols may
|
||||
* be activated via command line switches. Note that activating both IPv4 and
|
||||
* IPv6 is pointless (and will not work because two UDP and two TCP threads
|
||||
* will be started that concur for ports). Because of that, it is not allowed.
|
||||
* When pdnsd runs with IPv6 activated it should be able to service queries
|
||||
* from IPv6 as well as from IPv4 hosts, provided that you host is configured
|
||||
* properly.
|
||||
* For each of the protocols there are two options: ENABLE_IPV4 and ENABLE_IPV6
|
||||
* control whether support for the respective protocol is available in the
|
||||
* binary. DEFAULT_IPV4 selects which protocol is enabled on pdnsd
|
||||
* startup by default. 1 means IPv4, while 0 means IPv6. If support for
|
||||
* a protocol was included in the executable, you can specify command line
|
||||
* parameters to activate or deactivate that protocol (the options are -4 and
|
||||
* -6), but it makes more sense to use the run_ipv4=on/off option in the
|
||||
* configuration file.
|
||||
* Make your choice. Note that IPv6 support is experimental in pdnsd.
|
||||
* In normal operation, you will currently only need IPv4. */
|
||||
#define ENABLE_IPV4 1
|
||||
#define DEFAULT_IPV4 1
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* In all pdnsd versions before 1.0.6, DNS queries were always done over
|
||||
* TCP. Now, you have the choice. You can control that behaviour using
|
||||
* the -m command line switch, and you can give a preset here. There
|
||||
* are 3 different modes:
|
||||
* UDP_ONLY: This is undoubtedly the fastest query method, because
|
||||
* no TCP negotiation needs to be done.
|
||||
* TCP_ONLY: This is slower than uo, but generally more secure
|
||||
* against DNS spoofing. Note that some name servers on the
|
||||
* internet do not support TCP queries, notably dnscache.
|
||||
* TCP_UDP: TCP, then UDP. If the TCP query fails with a "connection refused"-
|
||||
* error or times out, the query is retried using UDP.
|
||||
* UDP_TCP: UDP, then TCP. If the UDP reply is truncated (i.e. the tc flag is set),
|
||||
* the query is retried using TCP. */
|
||||
#define M_PRESET TCP_ONLY
|
||||
|
||||
/* In addition to choosing the presets, you may also completely disable
|
||||
* one of the protocols (TCP for preset UDP_ONLY and UDP for preset TCP_ONLY).
|
||||
* This saves some executable space. */
|
||||
/* #undef NO_UDP_QUERIES */
|
||||
/* #undef NO_TCP_QUERIES */
|
||||
|
||||
/* With the following option, you can disable the TCP server functionality
|
||||
* of pdnsd. Nearly no program does TCP queries, so you probably can do
|
||||
* this safely and save some executable space and one thread.
|
||||
* You also can turn off the TCP server at runtime with the --notcp option. */
|
||||
/* #undef NO_TCP_SERVER */
|
||||
|
||||
/* By undefining the following, you can disable the UDP source address
|
||||
* discovery code. This is not recommended, but you may need it when
|
||||
* running into compilation problems. */
|
||||
#define SRC_ADDR_DISC 1
|
||||
|
||||
/* NO_POLL specifies not to use poll(2), but select(2) instead. If you are
|
||||
* unsure about what this means, just leave this as it is.*/
|
||||
/* #undef NO_POLL */
|
||||
|
||||
/* Define this for "hard" RFC 2181 compliance: this RFC states that
|
||||
* implementations should discard answers whose RR sets have multiple
|
||||
* different time stamps. While correct answers are generated, incorrect
|
||||
* ones are normally tolerated and corrected. Full RFC compliance is
|
||||
* however only achieved by deactivating this behaviour and thus being
|
||||
* intolerant. */
|
||||
/* #undef RFC2181_ME_HARDER */
|
||||
|
||||
/* Define this to the device you want to use for getting random numbers.
|
||||
* Leave this undefined if you wand to use the standard C library random
|
||||
* function, which basically should be sufficient.
|
||||
* Linux and FreeBSD have two random number devices: /dev/random and
|
||||
* /dev/urandom. /dev/urandom might be less secure in some cases, but
|
||||
* should still be more than sufficient. The use of /dev/random is
|
||||
* discouraged, as reading from this device blocks when new random bits
|
||||
* need to be gathered. */
|
||||
/* #undef RANDOM_DEVICE */
|
||||
#define R_DEFAULT 1
|
||||
/* #undef R_RANDOM */
|
||||
/* #undef R_ARC4RANDOM */
|
||||
/*#define RANDOM_DEVICE "/dev/urandom"*/
|
||||
|
||||
/* Designate which database manager to use for cacheing.
|
||||
* default: native; others: gdbm */
|
||||
#define CACHE_DBM DBM_NATIVE
|
||||
|
||||
#define CONFDIR "/data/data/com.github.shadowsocks"
|
||||
|
||||
#define CACHEDIR "/data/data/com.github.shadowsocks"
|
||||
|
||||
#define TEMPDIR "/data/data/com.github.shadowsocks/cache";
|
||||
|
||||
/* This is for various debugging facilities that produce debug output and
|
||||
* double-check some values. You can enable debug messages with the -g option.
|
||||
* Normally, you can switch this off safely by setting the number after DEBUG
|
||||
* to 0. This will increase speed (although only marginally), save space
|
||||
* in the executable (only about 12kB) and some stack space per thread
|
||||
* (which may be significant if you have many threads running simultaneously).
|
||||
* However, it may be an aid when debugging config files.
|
||||
* The only defined debug levels by now are in the range 0 - 9.
|
||||
* Define this to 9 if you want hex dumps of all the queries and replies pdnsd
|
||||
* receives (you must also call pdnsd with -v9 to actually see the hex dumps).
|
||||
* When in doubt, leave it defined to 1. */
|
||||
#define DEBUG 1
|
||||
|
||||
/* This defines the default verbosity of informational messages you will get.
|
||||
This has nothing to to with the debug option (-g), but may be set with -v
|
||||
option. 0 is for normal operation, up to 3 for debugging.
|
||||
Unlike the debug messages, these messages will also be written to the syslog.*/
|
||||
#define VERBOSITY 0
|
||||
|
||||
/* Redefine this if you want another hash size.
|
||||
* The number of hash buckets is computed as power of two (1<<HASH_SZ);
|
||||
* so e.g. HASH_SZ set to 10 yields 1024 hash rows.
|
||||
* HASH_SZ may not be bigger than 32 (if you set it even close to that value,
|
||||
* you are nuts.) */
|
||||
#define HASH_SZ 10
|
||||
|
||||
/* Set this to debug the hash tables. Turn this off normally, or you will get
|
||||
* flooded with diagnostic messages */
|
||||
/* #undef DEBUG_HASH */
|
||||
|
||||
/* Define if you have working C99 Variadic macro support */
|
||||
#define CPP_C99_VARIADIC_MACROS 1
|
||||
|
||||
/* Define as int if socklen_t typedef is missing */
|
||||
/* #undef socklen_t */
|
||||
|
||||
/* Lock the UDP socket before using it? */
|
||||
/* #undef SOCKET_LOCKING */
|
||||
|
||||
/* Default TCP timeout when receiving queries */
|
||||
#define TCP_TIMEOUT 5
|
||||
|
||||
/* Allow subsequent TCP queries on one connection? */
|
||||
/* #undef TCP_SUBSEQ */
|
||||
|
||||
/* Default value for parallel query number */
|
||||
#define PAR_QUERIES 4
|
||||
|
||||
/* Maximum number of IP addresses used per nameserver obtained from NS records. */
|
||||
#define MAXNAMESERVIPS 3
|
||||
|
||||
/* These are the possible targets. Normally no need to touch these
|
||||
* definitions. */
|
||||
#define TARGET_LINUX 0
|
||||
#define TARGET_BSD 1
|
||||
#define TARGET_CYGWIN 2
|
||||
|
||||
/* Assume the Native POSIX Thread Library instead of LinuxThreads ? */
|
||||
#define THREADLIB_NPTL 1
|
||||
|
||||
/* If we are using LinuxThreads, implement the fix needed for newer glibcs ? */
|
||||
/* #undef THREADLIB_LINUXTHREADS2 */
|
||||
|
||||
/* The following is needed for using LinuxThreads. Better don't touch. */
|
||||
#define _REENTRANT 1
|
||||
#define _THREAD_SAFE 1
|
||||
|
||||
/* It appears the newer versions of gcc won't convert a pointer to char into
|
||||
a pointer to unsigned char and vice versa without complaining.
|
||||
By using casts these warning messages can be suppressed, but at the cost
|
||||
of losing some type safety.
|
||||
Define charp and ucharp to be empty if you are a developer and find type
|
||||
safety more important.
|
||||
Leave the definitions unchanged to avoid distracting warning messages. */
|
||||
#define charp (char *)
|
||||
#define ucharp (unsigned char *)
|
||||
|
||||
|
||||
/* pdnsd version. DO NOT TOUCH THIS! It is replaced automatically by the
|
||||
* contents of ./version */
|
||||
#define VERSION "1.2.9a-par"
|
||||
|
||||
#endif
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
||||
/* Define to 1 if you have the `asprintf' function. */
|
||||
#define HAVE_ASPRINTF 1
|
||||
|
||||
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the `getline' function. */
|
||||
#if defined(__aarch64__) || defined(__x86_64__)
|
||||
#define HAVE_GETLINE 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `getpwnam_r' function. */
|
||||
//#define HAVE_GETPWNAM_R 1
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntop' function. */
|
||||
#define HAVE_INET_NTOP 1
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#define HAVE_INET_PTON 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `pthread' library (-lpthread). */
|
||||
#define HAVE_LIBPTHREAD 1
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mempcpy' function. */
|
||||
//#define HAVE_MEMPCPY 1
|
||||
|
||||
/* Define to 1 if you have the `mkfifo' function. */
|
||||
#define HAVE_MKFIFO 1
|
||||
|
||||
/* Define to 1 if you have the `nanosleep' function. */
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#define HAVE_NET_IF_H 1
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#define HAVE_POLL 1
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define to 1 if the system has the type `socklen_t'. */
|
||||
#define HAVE_SOCKLEN_T 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `stpcpy' function. */
|
||||
#if defined(__aarch64__) || defined(__x86_64__)
|
||||
#define HAVE_STPCPY 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `stpncpy' function. */
|
||||
//#define HAVE_STPNCPY 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
/* #undef HAVE_STRLCPY */
|
||||
|
||||
/* Define to 1 if you have the `strndup' function. */
|
||||
#define HAVE_STRNDUP 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct ifreq'. */
|
||||
#define HAVE_STRUCT_IFREQ 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct in6_addr'. */
|
||||
#define HAVE_STRUCT_IN6_ADDR 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct in_pktinfo'. */
|
||||
#define HAVE_STRUCT_IN_PKTINFO 1
|
||||
|
||||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
#define HAVE_SYSLOG_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#define HAVE_SYS_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#define HAVE_VASPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT ""
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME ""
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING ""
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION ""
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at runtime.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# define _ALL_SOURCE 1
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# define _POSIX_PTHREAD_SEMANTICS 1
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# define _TANDEM_SOURCE 1
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# define __EXTENSIONS__ 1
|
||||
#endif
|
||||
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
/* #undef _POSIX_1_SOURCE */
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
/* #undef _POSIX_SOURCE */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
|
@ -1,428 +0,0 @@
|
|||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
||||
|
||||
/* errno for incomplete non-blocking connect(2) */
|
||||
#define CONNECT_IN_PROGRESS EINPROGRESS
|
||||
|
||||
/* Override libev default fd conversion macro. */
|
||||
/* #undef EV_FD_TO_WIN32_HANDLE */
|
||||
|
||||
/* Override libev default fd close macro. */
|
||||
/* #undef EV_WIN32_CLOSE_FD */
|
||||
|
||||
/* Override libev default handle conversion macro. */
|
||||
/* #undef EV_WIN32_HANDLE_TO_FD */
|
||||
|
||||
/* Reset max file descriptor size. */
|
||||
/* #undef FD_SETSIZE */
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the `CCCryptorCreateWithMode' function. */
|
||||
/* #undef HAVE_CCCRYPTORCREATEWITHMODE */
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
/* Define to 1 to use the syscall interface for clock_gettime */
|
||||
/* #undef HAVE_CLOCK_SYSCALL */
|
||||
|
||||
/* Define to 1 if you have the <CommonCrypto/CommonCrypto.h> header file. */
|
||||
/* #undef HAVE_COMMONCRYPTO_COMMONCRYPTO_H */
|
||||
|
||||
/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_INET_NTOP 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the <linux/tcp.h> header file. */
|
||||
#define HAVE_LINUX_TCP_H 1
|
||||
|
||||
/* Define to 1 if you have the `epoll_ctl' function. */
|
||||
/* #undef HAVE_EPOLL_CTL */
|
||||
|
||||
/* Define to 1 if you have the `eventfd' function. */
|
||||
/* #undef HAVE_EVENTFD */
|
||||
|
||||
/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
|
||||
/* #undef HAVE_EVP_ENCRYPTINIT_EX */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if the floor function is available */
|
||||
#define HAVE_FLOOR 1
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
#define HAVE_FORK 1
|
||||
|
||||
/* Define to 1 if you have the `getpwnam_r' function. */
|
||||
#define HAVE_GETPWNAM_R 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntop' function. */
|
||||
/* #undef HAVE_INET_NTOP */
|
||||
|
||||
/* Define to 1 if you have the `inotify_init' function. */
|
||||
/* #undef HAVE_INOTIFY_INIT */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Enable IPv6 support in libudns */
|
||||
#define HAVE_IPv6 1
|
||||
|
||||
/* Define to 1 if you have the `kqueue' function. */
|
||||
#define HAVE_KQUEUE 1
|
||||
|
||||
/* Define to 1 if you have the <langinfo.h> header file. */
|
||||
#define HAVE_LANGINFO_H 1
|
||||
|
||||
/* Define to 1 if you have the `rt' library (-lrt). */
|
||||
/* #undef HAVE_LIBRT */
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the <linux/if.h> header file. */
|
||||
/* #undef HAVE_LINUX_IF_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/netfilter_ipv4.h> header file. */
|
||||
/* #undef HAVE_LINUX_NETFILTER_IPV4_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/netfilter_ipv6/ip6_tables.h> header
|
||||
file. */
|
||||
/* #undef HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H */
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define to 1 if you have the `malloc' function. */
|
||||
#define HAVE_MALLOC 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
/* Define to 1 if you have the `nanosleep' function. */
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#define HAVE_NET_IF_H 1
|
||||
|
||||
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_ENGINE_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_ERR_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/evp.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_EVP_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/pem.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_PEM_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/rand.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_RAND_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/rsa.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_RSA_H */
|
||||
|
||||
/* Define to 1 if you have the <openssl/sha.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_SHA_H */
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#define HAVE_POLL 1
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#define HAVE_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the `port_create' function. */
|
||||
/* #undef HAVE_PORT_CREATE */
|
||||
|
||||
/* Define to 1 if you have the <port.h> header file. */
|
||||
/* #undef HAVE_PORT_H */
|
||||
|
||||
/* Have PTHREAD_PRIO_INHERIT. */
|
||||
#define HAVE_PTHREAD_PRIO_INHERIT 1
|
||||
|
||||
/* Define to 1 if you have the `RAND_pseudo_bytes' function. */
|
||||
/* #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. */
|
||||
/* #undef HAVE_SETRESUID */
|
||||
|
||||
/* Define to 1 if you have the `setreuid' function. */
|
||||
#define HAVE_SETREUID 1
|
||||
|
||||
/* Define to 1 if you have the `setrlimit' function. */
|
||||
#define HAVE_SETRLIMIT 1
|
||||
|
||||
/* Define to 1 if you have the `signalfd' function. */
|
||||
/* #undef HAVE_SIGNALFD */
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
/* #undef HAVE_SYS_EPOLL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/eventfd.h> header file. */
|
||||
/* #undef HAVE_SYS_EVENTFD_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/event.h> header file. */
|
||||
#define HAVE_SYS_EVENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/inotify.h> header file. */
|
||||
/* #undef HAVE_SYS_INOTIFY_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/signalfd.h> header file. */
|
||||
/* #undef HAVE_SYS_SIGNALFD_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `vfork' function. */
|
||||
#define HAVE_VFORK 1
|
||||
|
||||
/* Define to 1 if you have the <vfork.h> header file. */
|
||||
/* #undef HAVE_VFORK_H */
|
||||
|
||||
/* Define to 1 if you have the <windows.h> header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the <winsock2.h> header file. */
|
||||
/* #undef HAVE_WINSOCK2_H */
|
||||
|
||||
/* Define to 1 if `fork' works. */
|
||||
#define HAVE_WORKING_FORK 1
|
||||
|
||||
/* Define to 1 if `vfork' works. */
|
||||
#define HAVE_WORKING_VFORK 1
|
||||
|
||||
/* Define to 1 if you have the <ws2tcpip.h> header file. */
|
||||
/* #undef HAVE_WS2TCPIP_H */
|
||||
|
||||
/* have zlib compression support */
|
||||
/* #undef HAVE_ZLIB */
|
||||
|
||||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
/* #undef HAVE_ZLIB_H */
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Define to 1 if assertions should be disabled. */
|
||||
/* #undef NDEBUG */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "shadowsocks-libev"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "max.c.lv@gmail.com"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "shadowsocks-libev"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "shadowsocks-libev 2.4.8"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "shadowsocks-libev"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "2.4.8"
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
/* #undef PTHREAD_CREATE_JOINABLE */
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to the type of arg 1 for `select'. */
|
||||
#define SELECT_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select'. */
|
||||
#define SELECT_TYPE_ARG234 (fd_set *)
|
||||
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#define SELECT_TYPE_ARG5 (struct timeval *)
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* If the compiler supports a TLS storage class define it to that here */
|
||||
#define TLS __thread
|
||||
|
||||
/* Use Apple CommonCrypto library */
|
||||
/* #undef USE_CRYPTO_APPLECC */
|
||||
|
||||
/* Use mbed TLS library */
|
||||
#define USE_CRYPTO_MBEDTLS 1
|
||||
|
||||
/* Use OpenSSL library */
|
||||
/* #undef USE_CRYPTO_OPENSSL */
|
||||
|
||||
/* Use PolarSSL library */
|
||||
/* #undef USE_CRYPTO_POLARSSL */
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# define _ALL_SOURCE 1
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# define _POSIX_PTHREAD_SEMANTICS 1
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# define _TANDEM_SOURCE 1
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# define __EXTENSIONS__ 1
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#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). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
/* # undef WORDS_BIGENDIAN */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
/* #undef _POSIX_1_SOURCE */
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
/* #undef _POSIX_SOURCE */
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
/* #undef _UINT8_T */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
||||
nothing if this is not supported. Do not define if restrict is
|
||||
supported directly. */
|
||||
#define restrict __restrict
|
||||
/* Work around a bug in Sun C++: it does not support _Restrict or
|
||||
__restrict__, even though the corresponding Sun C compiler ends up with
|
||||
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
||||
previous line. Perhaps some future version of Sun C++ will work with
|
||||
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
||||
#if defined __SUNPRO_CC && !defined __RESTRICT
|
||||
# define _Restrict
|
||||
# define __restrict__
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef ssize_t */
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 16 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
/* #undef uint16_t */
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 8 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
/* #undef uint8_t */
|
||||
|
||||
/* Define as `fork' if `vfork' does not work. */
|
||||
/* #undef vfork */
|
||||
|
||||
/* Define to 1 if you have the <pcre.h> header file. */
|
||||
#define HAVE_PCRE_H 1
|
||||
|
||||
/* Define to 1 if you have the <pcre/pcre.h> header file. */
|
||||
/* #undef HAVE_PCRE_PCRE_H */
|
|
@ -1,29 +0,0 @@
|
|||
|
||||
#ifndef sodium_version_H
|
||||
#define sodium_version_H
|
||||
|
||||
#include "export.h"
|
||||
|
||||
#define SODIUM_VERSION_STRING "1.0.7"
|
||||
|
||||
#define SODIUM_LIBRARY_VERSION_MAJOR 9
|
||||
#define SODIUM_LIBRARY_VERSION_MINOR 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SODIUM_EXPORT
|
||||
const char *sodium_version_string(void);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int sodium_library_version_major(void);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int sodium_library_version_minor(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 311e5d14f593f16c785bc6605220517eb1f21f6b
|
|
@ -1 +0,0 @@
|
|||
Subproject commit baa59676d65008cfc019fdcebf744b77aa5bb31a
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 3b689a6ab443cb7b467c2cb6c8434d97fd807168
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 9f4f8eec93dd1f32d78e0bcceddbef0ca570e66f
|
|
@ -1,198 +0,0 @@
|
|||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
||||
/* This file contains character tables that are used when no external tables
|
||||
are passed to PCRE by the application that calls it. The tables are used only
|
||||
for characters whose code values are less than 256.
|
||||
|
||||
This is a default version of the tables that assumes ASCII encoding. A program
|
||||
called dftables (which is distributed with PCRE) can be used to build
|
||||
alternative versions of this file. This is necessary if you are running in an
|
||||
EBCDIC environment, or if you want to default to a different encoding, for
|
||||
example ISO-8859-1. When dftables is run, it creates these tables in the
|
||||
current locale. If PCRE is configured with --enable-rebuild-chartables, this
|
||||
happens automatically.
|
||||
|
||||
The following #includes are present because without them gcc 4.x may remove the
|
||||
array definition from the final binary if PCRE is built into a static library
|
||||
and dead code stripping is activated. This leads to link errors. Pulling in the
|
||||
header ensures that the array gets flagged as "someone outside this compilation
|
||||
unit might reference this" and so it will always be supplied to the linker. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "pcre_internal.h"
|
||||
|
||||
const pcre_uint8 PRIV(default_tables)[] = {
|
||||
|
||||
/* This table is a lower casing table. */
|
||||
|
||||
0, 1, 2, 3, 4, 5, 6, 7,
|
||||
8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23,
|
||||
24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39,
|
||||
40, 41, 42, 43, 44, 45, 46, 47,
|
||||
48, 49, 50, 51, 52, 53, 54, 55,
|
||||
56, 57, 58, 59, 60, 61, 62, 63,
|
||||
64, 97, 98, 99,100,101,102,103,
|
||||
104,105,106,107,108,109,110,111,
|
||||
112,113,114,115,116,117,118,119,
|
||||
120,121,122, 91, 92, 93, 94, 95,
|
||||
96, 97, 98, 99,100,101,102,103,
|
||||
104,105,106,107,108,109,110,111,
|
||||
112,113,114,115,116,117,118,119,
|
||||
120,121,122,123,124,125,126,127,
|
||||
128,129,130,131,132,133,134,135,
|
||||
136,137,138,139,140,141,142,143,
|
||||
144,145,146,147,148,149,150,151,
|
||||
152,153,154,155,156,157,158,159,
|
||||
160,161,162,163,164,165,166,167,
|
||||
168,169,170,171,172,173,174,175,
|
||||
176,177,178,179,180,181,182,183,
|
||||
184,185,186,187,188,189,190,191,
|
||||
192,193,194,195,196,197,198,199,
|
||||
200,201,202,203,204,205,206,207,
|
||||
208,209,210,211,212,213,214,215,
|
||||
216,217,218,219,220,221,222,223,
|
||||
224,225,226,227,228,229,230,231,
|
||||
232,233,234,235,236,237,238,239,
|
||||
240,241,242,243,244,245,246,247,
|
||||
248,249,250,251,252,253,254,255,
|
||||
|
||||
/* This table is a case flipping table. */
|
||||
|
||||
0, 1, 2, 3, 4, 5, 6, 7,
|
||||
8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23,
|
||||
24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39,
|
||||
40, 41, 42, 43, 44, 45, 46, 47,
|
||||
48, 49, 50, 51, 52, 53, 54, 55,
|
||||
56, 57, 58, 59, 60, 61, 62, 63,
|
||||
64, 97, 98, 99,100,101,102,103,
|
||||
104,105,106,107,108,109,110,111,
|
||||
112,113,114,115,116,117,118,119,
|
||||
120,121,122, 91, 92, 93, 94, 95,
|
||||
96, 65, 66, 67, 68, 69, 70, 71,
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
80, 81, 82, 83, 84, 85, 86, 87,
|
||||
88, 89, 90,123,124,125,126,127,
|
||||
128,129,130,131,132,133,134,135,
|
||||
136,137,138,139,140,141,142,143,
|
||||
144,145,146,147,148,149,150,151,
|
||||
152,153,154,155,156,157,158,159,
|
||||
160,161,162,163,164,165,166,167,
|
||||
168,169,170,171,172,173,174,175,
|
||||
176,177,178,179,180,181,182,183,
|
||||
184,185,186,187,188,189,190,191,
|
||||
192,193,194,195,196,197,198,199,
|
||||
200,201,202,203,204,205,206,207,
|
||||
208,209,210,211,212,213,214,215,
|
||||
216,217,218,219,220,221,222,223,
|
||||
224,225,226,227,228,229,230,231,
|
||||
232,233,234,235,236,237,238,239,
|
||||
240,241,242,243,244,245,246,247,
|
||||
248,249,250,251,252,253,254,255,
|
||||
|
||||
/* This table contains bit maps for various character classes. Each map is 32
|
||||
bytes long and the bits run from the least significant end of each byte. The
|
||||
classes that have their own maps are: space, xdigit, digit, upper, lower, word,
|
||||
graph, print, punct, and cntrl. Other classes are built from combinations. */
|
||||
|
||||
0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
|
||||
0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
|
||||
0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc,
|
||||
0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
/* This table identifies various classes of character by individual bits:
|
||||
0x01 white space character
|
||||
0x02 letter
|
||||
0x04 decimal digit
|
||||
0x08 hexadecimal digit
|
||||
0x10 alphanumeric or '_'
|
||||
0x80 regular expression metacharacter or binary zero
|
||||
*/
|
||||
|
||||
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
|
||||
0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /* 8- 15 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */
|
||||
0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */
|
||||
0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /* ( - / */
|
||||
0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /* 0 - 7 */
|
||||
0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /* 8 - ? */
|
||||
0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* @ - G */
|
||||
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* H - O */
|
||||
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* P - W */
|
||||
0x12,0x12,0x12,0x80,0x80,0x00,0x80,0x10, /* X - _ */
|
||||
0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* ` - g */
|
||||
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* h - o */
|
||||
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* p - w */
|
||||
0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /* x -127 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */
|
||||
|
||||
/* End of pcre_chartables.c */
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 222bbf4b3fb8e13c21686803e47e31aa3e4ad130
|
|
@ -1 +0,0 @@
|
|||
Subproject commit ca93436e5b1be02f9f4bfca79b8202c400161994
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 72d7d9217ce2a8a59dc647e8f1fbbd77f7cd30aa
|
|
@ -0,0 +1,51 @@
|
|||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.mozilla.rust-android-gradle.rust-android")
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
ndkVersion = "21.0.6113669"
|
||||
|
||||
compileSdkVersion(29)
|
||||
defaultConfig {
|
||||
minSdkVersion(21)
|
||||
targetSdkVersion(28)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
cargo {
|
||||
module = "src/main/rust/shadowsocks-rust"
|
||||
libname = "ss-local"
|
||||
targets = listOf("arm", "arm64", "x86", "x86_64")
|
||||
profile = findProperty("CARGO_PROFILE")?.toString() ?: "release"
|
||||
extraCargoBuildArguments = listOf("--bin", "sslocal")
|
||||
featureSpec.noDefaultBut(arrayOf(
|
||||
"sodium",
|
||||
"rc4",
|
||||
"aes-cfb",
|
||||
"aes-ctr",
|
||||
"camellia-cfb",
|
||||
"openssl-vendored"))
|
||||
exec = { spec, toolchain ->
|
||||
spec.environment("RUST_ANDROID_GRADLE_LINKER_WRAPPER_PY", "$projectDir/$module/../linker-wrapper.py")
|
||||
spec.environment("RUST_ANDROID_GRADLE_TARGET", "target/${toolchain.target}/$profile/lib$libname.so")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.whenTaskAdded {
|
||||
when (name) {
|
||||
"mergeDebugJniLibFolders", "mergeReleaseJniLibFolders" -> dependsOn("cargoBuild")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register<Exec>("cargoClean") {
|
||||
executable("cargo") // cargo.cargoCommand
|
||||
args("clean")
|
||||
workingDir("$projectDir/${cargo.module}")
|
||||
}
|
||||
|
||||
tasks.clean.dependsOn("cargoClean")
|
|
@ -1,4 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.nekohasekai.ss_libev">
|
||||
package="io.nekohasekai.ss_rust">
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,18 @@
|
|||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import os
|
||||
import pipes
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
args = [os.environ['RUST_ANDROID_GRADLE_CC'], os.environ['RUST_ANDROID_GRADLE_CC_LINK_ARG']] + sys.argv[1:]
|
||||
|
||||
# This only appears when the subprocess call fails, but it's helpful then.
|
||||
printable_cmd = ' '.join(pipes.quote(arg) for arg in args)
|
||||
print(printable_cmd)
|
||||
|
||||
code = subprocess.call(args)
|
||||
if code == 0:
|
||||
shutil.copyfile(sys.argv[sys.argv.index('-o') + 1], os.environ['RUST_ANDROID_GRADLE_TARGET'])
|
||||
sys.exit(code)
|
|
@ -0,0 +1 @@
|
|||
Subproject commit b6c3fb0babd621a2fc6749931f3a140e5833a693
|
Loading…
Reference in New Issue