Total Pageviews

Wednesday, 4 May 2016

一个vpn解决方案-xTun(客户操作系统需为linux桌面系统)

A secure and fast VPN for protect your network traffic。

Features

  • Stateless
  • CCA security
  • Low cost (CPU, RAM and packet overhead)
  • Cross-platform, including PC (Linux, Mobile (Android) and Router (OpenWRT)
  • Parallelization

BUILD

Linux

make && make install

OpenWRT

# At OpenWRT build root
git clone https://github.com/lparam/xTun.git package/xTun
make package/xTun/openwrt/compile

Usage

Server

xTun -I IP/MASK -k PASSWORD -s -P PARALLEL
scripts/server_up.sh
Stop:
xTun --signal stop
scripts/server_down.sh

Client

xTun -I IP/MASK -k PASSWORD -c SERVER
scripts/client_up.sh
Stop:
xTun --signal stop
scripts/client_down.sh

OpenWrt

Modify your SERVER and PASSWORD in /etc/init.d/xTun
/etc/init.d/xTun start
Stop:
/etc/init.d/xTun stop
 
from https://github.com/lparam/xTun

on my mac's ~/xtun dir,the result of "make":
'linux/if.h' file not found
---------------------------------

xtun在安卓下的客户端:
https://github.com/lparam/xTun-android/releases/download/v1.1.0/xTun-v1.1.0.apk
from https://github.com/lparam/xTun-android/releases
-------------------------

xTun for Android

A xTun client for Android.

PREREQUISITES

  • JDK 1.8+
  • Android SDK r22+
  • Android NDK r9+
  • Android Studio 1.0+ (optional)

BUILD

    android {
        signingConfigs {
            release {
                storeFile file('/home/user/keystore/android.key')
                    storePassword "password"
                    keyAlias 'Android App Key'
                    keyPassword "password"
            }
        }
    }
  • Build native binaries
    git submodule update --init
    make

Gradle Build

    gradle clean assembleRelease

Android Studio

  • Import the project in Android Studio
  • Make Project in Android Studio
from  https://github.com/lparam/xTun-android