GithubHelp home page GithubHelp logo

tchigher / shadowsocksr-v2ray-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xxf098/shadowsocksr-v2ray-trojan-android

0.0 0.0 0.0 86.71 MB

A ShadowsocksR and V2Ray client for Android

License: GNU General Public License v3.0

Scala 79.32% Shell 0.48% Perl 0.06% Python 0.08% HTML 1.99% Java 4.81% Makefile 5.13% C 7.09% C++ 1.05%

shadowsocksr-v2ray-android's Introduction

A ShadowsocksR and V2Ray Client for Android

A shadowsocksR and V2Ray client for Android, integrate SSR and V2Ray in one application, written in Scala.

build GitHub release GitHub issues Gitter

PREREQUISITES

  • JDK 1.8
  • SBT 0.13.8
  • Android SDK
    • Build Tools 29+
    • Android Support Repository and Google Repository (see build.sbt for version)
  • Android NDK r12b High version may case something build fail

BUILD with Android Studio

Warnning: Cannot build in windows

  • Download Android Studio

  • Download Android NDK r12b

  • Set proxy for sbt in Android Studio: open Settings -> Build, Execution, Deployment -> Build Tool -> sbt, in VM parameters input:

      -Dhttp.proxyHost=127.0.0.1
      -Dhttp.proxyPort=8080
      -Dhttps.proxyHost=127.0.0.1
      -Dhttps.proxyPort=8080
    
  • Set environment variable ANDROID_HOME to /path/to/Android/Sdk

  • Set environment variable ANDROID_NDK_HOME to /path/to/Android/android-ndk-r12b

  • Set environment variable TERM to xterm-color

  • Create your key following the instructions at https://developer.android.com/studio/publish/app-signing.html

  • Put your key in ~/.keystore or any other place

  • Create local.properties from local.properties.example with your own key information

      key.alias: abc
      key.store: /path/to/Android/abc.jks
      key.store.password: abc
    
  • if you installed multiple versions of Java, use sudo update-alternatives --config java to select Java 8

  • Before build apk, make sure inside ./project/build.properties, sbt.version=0.13.18

  • Invoke the building like this

    export https_proxy=http://127.0.0.1:8080
    export ANDROID_HOME=/path/to/Android/Sdk
    export ANDROID_NDK_HOME=/path/to/Android/android-ndk-r12b
    export TERM=xterm-color
    # install and update all git submodule
    git submodule update --init
    # Build the App
    sbt native-build clean android:package-release
    # run app
    sbt android:run
    # use Archlinux x86_64 as example
    
    # install ncurses x64 and x86 version
    sudo pacman -S lib32-ncurses ncurses
    
    # link the version-6 ncurses to version-5
    sudo ln -s /usr/lib/libncursesw.so /usr/lib/libncurses.so.5
    sudo ln -s /usr/lib32/libncursesw.so /usr/lib32/libncurses.so.5
    
    # link libncurses to libtinfo
    sudo ln -s /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5
    sudo ln -s /usr/lib32/libncurses.so.5 /usr/lib32/libtinfo.so.5

Integration with Android Studio

Checkout this link

  • rm -rf ~/.android/sbt/exploded-aars/*
  • In Project Settings -> Modules -> shadowsocksr, change manifest file path
  • In Run/Debug Configuration -> Before launch, replace Gradle-aware Make with android:run

BUILD on Mac OS X (with HomeBrew)

  • Install Android SDK and NDK by run brew install android-ndk android-sdk
  • Add export ANDROID_HOME=/usr/local/Cellar/android-sdk/$version to your .bashrc , then reopen the shell to load it.
  • Add export ANDROID_NDK_HOME=/usr/local/Cellar/android-ndk/$version to your .bashrc , then reopen the shell to load it.
  • echo "y" | android update sdk --filter tools,platform-tools,build-tools-23.0.2,android-23,extra-google-m2repository --no-ui -a
  • echo "y" | android update sdk --filter extra-android-m2repository --no-ui --no-https -a
  • Create your key following the instructions at http://developer.android.com/guide/publishing/app-signing.html#cert
  • Put your key in ~/.keystore
  • Create local.properties from local.properties.example with your own key information .
  • Invoke the building like this
    git submodule update --init

    # Build native binaries
    ./build.sh

    # Build the apk
    sbt clean android:package-release

OPEN SOURCE LICENSES

LICENSE

Copyright (C) 2016 by Max Lv <[email protected]>
Copyright (C) 2016 by Mygod Studio <[email protected]>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

shadowsocksr-v2ray-android's People

Contributors

akkariiin avatar anyofyou avatar athurg avatar ayanamist avatar cloudtrends avatar clowwindy avatar czbix avatar esdeathlove avatar glzjin avatar haobug avatar hexhu avatar hghwng avatar huihuimoe avatar jllk avatar jlund avatar justsoos avatar kaneawk avatar lozen130 avatar madeye avatar milkice233 avatar mygod avatar prihlop avatar sunsysjp avatar vmlinz avatar winer632 avatar wongsyrone avatar wyzegob avatar xxf098 avatar yyxida avatar zhaofengli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.