Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
luozijun committed Jan 10, 2018
1 parent d7a1d9d commit b3ebfbf
Show file tree
Hide file tree
Showing 18 changed files with 1,886 additions and 796 deletions.
16 changes: 4 additions & 12 deletions Cargo.toml
Expand Up @@ -14,15 +14,12 @@ members = [

[[bin]]
name = "vpn"
path = "src/bin/vpn.rs"
path = "src/vpn.rs"

[[bin]]
name = "proxy"
path = "src/bin/proxy.rs"
name = "vpnd"
path = "src/vpnd.rs"

[[bin]]
name = "crypto"
path = "src/crypto.rs"

[dependencies]
logging = { path = "./logging" }
Expand All @@ -42,6 +39,7 @@ ctrlc = { version = "3.0.3", default-features = false, features = ["terminati
hwaddr = { version = "0.1.3", default-features = false, features = [] }
futures = { version = "0.1.17", default-features = false, features = ["use_std"] }
mio = { version = "0.6.11", default-features = false, features = [] }
tun = { version = "0.4.2", default-features = false, features = ["mio"] }

[dependencies.smoltcp]
git = "https://github.com/m-labs/smoltcp.git"
Expand All @@ -53,12 +51,6 @@ features = [
"socket-raw", "socket-icmp", "socket-udp", "socket-tcp"
]

[target.'cfg(unix)'.dependencies.tun]
git = "https://github.com/LuoZijun/rust-tun.git"
branch = "patch-1"
default-features = false
features = ["mio"]

[target.'cfg(unix)'.dependencies.libc]
git = "https://github.com/rust-lang/libc.git"
branch = "master"
Expand Down
71 changes: 18 additions & 53 deletions README.rst
Expand Up @@ -13,73 +13,28 @@ Exodus: Ciphertext and plaintext
.. contents::


项目
--------

* `netproxy <https://github.com/LuoZijun/exodus/tree/master/netproxy>`_ , 一个 全局TCP/UDP 代理实现
* `nettunnel <https://github.com/LuoZijun/exodus/tree/master/nettunnel>`_ , 一个 VPN 实现


组件
---------

* `iana <https://github.com/LuoZijun/exodus/tree/master/iana>`_ , 一个 IANA IP/DOMAIN 数据库实现
* `netpacket <https://github.com/LuoZijun/exodus/tree/master/netpacket>`_ , 一个简单的网络包解析器实现
* `netstack <https://github.com/LuoZijun/exodus/tree/master/netstack>`_ , 一个简单的网络栈实现
* `taptun <https://github.com/LuoZijun/exodus/tree/master/taptun>`_ , 一个跨平台的 TAP/TUN 实现

编译
Build
---------

macOS:

.. code:: bash
brew install rustup-init
brew install FiloSottile/musl-cross/musl-cross
brew install openssl
rustup-init --default-toolchain nightly -y
rustup toolchain install nightly
rustup default nightly
rustup show
rustup target list
# Unix
rustup target add x86_64-apple-darwin
rustup target add x86_64-apple-ios
rustup target add armv7-apple-ios
rustup target add armv7s-apple-ios
rustup target add aarch64-apple-ios
rustup target add x86_64-sun-solaris
rustup target add x86_64-unknown-freebsd
rustup target add x86_64-unknown-netbsd
# Linux
rustup target add x86_64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-musl
rustup target add x86_64-linux-android
rustup target add x86_64-unknown-fuchsia
rustup target add armv7-linux-androideabi
rustup target add aarch64-linux-android
# Windows
rustup target add x86_64-pc-windows-gnu
# Other
rustup target add x86_64-unknown-redox
git clone https://github.com/LuoZijun/exodus.git
cd exodus
cd nettunnel
cargo build
cd ../
cargo build --bin vpn --release
# Run VPN server
target/debug/nettunnel-server
# Run VPN Client
target/debug/nettunnel-client
cp target/release/vpn .
ifconfig
Debian 9:

Expand All @@ -93,10 +48,20 @@ Debian 9:
git clone https://github.com/LuoZijun/exodus.git
cd exodus
cargo build
cargo build --bin vpnd --release
ip addr
cp target/release/vpnd .
Run
-------

.. code:: bash
cd exodus
# VPN Server
sudo ./vpnd --tun-network 172.16.0.0/16
# VPN Client
sudo ./vpn --server-addr YOUR_VPN_SERVER_IPV4_ADDR:YOUR_VPN_SERVER_UDP_PORT --disable-crypto

0 comments on commit b3ebfbf

Please sign in to comment.