GithubHelp home page GithubHelp logo

youcaihuaf / outline-go-tun2socks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jigsaw-code/outline-go-tun2socks

0.0 0.0 0.0 68.47 MB

学习

License: Apache License 2.0

Shell 0.43% Go 97.87% Makefile 1.70%

outline-go-tun2socks's Introduction

outline-go-tun2socks

Go package for building go-tun2socks-based clients for Outline and Intra (now with support for Choir metrics). For macOS, iOS, and Android, the output is a library; for Linux and Windows it is a command-line executable.

Prerequisites

  • macOS host (iOS, macOS)
  • make
  • Go >= 1.18
  • A C compiler (e.g.: clang, gcc)

Android

Set up

  • sdkmanager
    1. Download the command line tools from https://developer.android.com/studio.
    2. Unzip the pacakge as ~/Android/Sdk/cmdline-tools/latest/. Make sure sdkmanager is located at ~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager
  • Android NDK 23
    1. Install the NDK with ~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-30" "ndk;23.1.7779620" (platform from outline-client, exact NDK 23 version obtained from sdkmanager --list)
    2. Set up the environment variables:
      export ANDROID_NDK_HOME=~/Android/Sdk/ndk/23.1.7779620 ANDROID_HOME=~/Android/Sdk
      
  • gomobile (installed as needed by make)

Build

make clean && make android

This will create build/android/{tun2socks.aar,tun2socks-sources.jar}

If needed, you can extract the jni files into build/android/jni with:

unzip build/android/tun2socks.aar 'jni/*' -d build/android

Apple (iOS and macOS)

Set up

  • Xcode
  • gomobile (installed as needed by make)

Build

make clean && make apple

This will create build/apple/Tun2socks.xcframework.

Linux and Windows

We build binaries for Linux and Windows from source without any custom integrations. xgo and Docker are required to support cross-compilation.

Set up

Build

For Linux:

make clean && make linux

This will create build/linux/tun2socks.

For Windows:

make clean && make windows

This will create build/windows/tun2socks.exe.

Intra (Android)

Same set up as for the Outline Android library.

Build with:

make clean && make intra

This will create build/intra/{tun2socks.aar,tun2socks-sources.jar}

outline-go-tun2socks's People

Contributors

alalamav avatar dmcardle avatar elenadoty avatar fortuna avatar ignoramous avatar jyyi1 avatar sbruens avatar seanburford 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.