OpenWrt extension packages for special applications。
Network accelerating extensions for OpenWrt (valuable Pull Requests are welcomed)
Components
ipset-lists: 'ipset' lists with China IP assignments (data from apnic.net)
proto-bridge: Protocol-filtered ethernet bridging drivers and a VLAN implementation with compressed VLAN header (YaVLAN)
shadowsocks-libev: Shadowsocks binaries
shadowsocks-tools: Shadowsocks configuration toolset for OpenWrt
minivtun-tools: Fast secure VPN in a custom protocol for rapidly deploying VPN services or getting through firewalls (refer to: https://github.com/rssnsj/minivtun)
file-storage: Toolset for auto-setup Samba file shares with attached USB storages and SD cards
How to install
mkdir -p /etc/opkg
# Run the following two lines according to the architecture of your router (DON'T run both)
echo "src/gz rssnsj http://rssn.cn/roms/feeds/ar71xx" > /etc/opkg/rssnsj.conf # ar71xx-based
echo "src/gz rssnsj http://rssn.cn/roms/feeds/ramips" > /etc/opkg/rssnsj.conf # ramips-based
opkg update
opkg install dnsmasq-full --force-overwrite
opkg install ipset-lists shadowsocks-libev shadowsocks-tools minivtun file-storage
rm -f /etc/opkg/rssnsj.conf
OpenWrt firmwares with this toolset integrated (only for the major "smart" models)
A fast, secure and reliable VPN service based on non-standard protocol.
A fast secure and reliable VPN service in non-standard protocol for rapidly deploying VPN servers/clients or getting through firewalls
Key features
Fast: direct UDP-encapsulated without complex authentication handshakes.
Secure: both header and tunnel data are encrypted, which is impossible to be tracked by protocol characteristics and blocked, unless all UDP ports are blocked by your firewall; spoofed packets from unauthorized peer are dropped immediately.
Reliable: communication recovers immediately from next received packet from client after the previous session was dead, which makes the connection extremely reliable.
Rapid to deploy: a standalone program to run; all configuration are specified in command line with very few options.
Installation for Linux
Install required development components
sudo apt-get install build-essential libssl-dev # for Ubuntu / Debian
sudo yum install make gcc openssl-devel # for CentOS / Fedora / RedHat
Installation for Mac OS X
Install TUNTAP driver for Mac OS X: http://tuntaposx.sourceforge.net
git clone https://github.com/rssnsj/minivtun cd minivtun/src make (这步会在当前目录下,生成可执行文件minivtun.)
./minivtun -h
Usage
Mini virtual tunneller in non-standard protocol.
Usage:
minivtun [options]
Options:
-l, --local <ip:port> IP:port for server to listen
-r, --remote <ip:port> IP:port of server to connect
-a, --ipv4-addr <tun_lip/tun_rip> pointopoint IPv4 pair of the virtual interface
<tun_lip/pfx_len> IPv4 address/prefix length pair
-A, --ipv6-addr <tun_ip6/pfx_len> IPv6 address/prefix length pair
-m, --mtu <mtu> set MTU size, default: 1300.
-t, --keepalive <keepalive_timeo> interval of keep-alive packets, default: 13
-n, --ifname <ifname> virtual interface name
-p, --pidfile <pid_file> PID file of the daemon
-e, --key <encryption_key> shared password for data encryption
-v, --route <network/prefix=gateway>
route a network to a client address, can be multiple
-w, --wait-dns wait for DNS resolve ready after service started.
-d, --daemon run as daemon process
-h, --help print this help
Examples
Server: Run a VPN server on port 1414, with local virtual address 10.7.0.1, client address space 10.7.0.0/24, encryption password 'Hello':
/usr/sbin/minivtun -l 0.0.0.0:1414 -a 10.7.0.1/24 -e Hello -d
Client: Connect VPN to the above server (assuming address vpn.abc.com), with local virtual address 10.7.0.33:
/usr/sbin/minivtun -r vpn.abc.com:1414 -a 10.7.0.33/24 -e Hello -d
Multiple clients on different devices can be connected to the same server:
/usr/sbin/minivtun -r vpn.abc.com:1414 -a 10.7.0.34/24 -e Hello -d
/usr/sbin/minivtun -r vpn.abc.com:1414 -a 10.7.0.35/24 -e Hello -d
/usr/sbin/minivtun -r vpn.abc.com:1414 -a 10.7.0.36/24 -e Hello -d
from https://github.com/rssnsj/minivtun
-------------
我的补充说明
登陆Linux vps(最好是kvm vps.若是openvz vps,容易遇错)
git clone https://github.com/rssnsj/minivtun
cd minivtun/src
make (这步会在当前目录下,生成可执行文件minivtun.)
./minivtun -l 0.0.0.0:1414 -a 10.7.0.1/24 --key my-key -d
会显示:
Mini virtual tunneling server on 0.0.0.0:1414, interface: mv0.
(会在vps中,生成虚拟网卡mv0)
在客户机器mac上。
安装TUNTAP driver for Mac OS X: http://tuntaposx.sourceforge.net,然后,
git clone https://github.com/rssnsj/minivtun
cd minivtun/src
make (这步会在当前目录下,生成可执行文件minivtun.)
sudo ./minivtun -r my-vps-ip:1414 -a 10.7.0.2/24 --key my-key
Password:
会显示:
Mini virtual tunnelling client to my-vps-ip:1414, interface: tun0.
(会在mac机器中,生成虚拟网卡tun0)
保持该terminal窗口不要关闭。
然后新开一个terminal窗口,
ping 10.7.0.1
显示:
PING 10.7.0.1 (10.7.0.1): 56 data bytes
64 bytes from 10.7.0.1: icmp_seq=0 ttl=64 time=26.829 ms
64 bytes from 10.7.0.1: icmp_seq=1 ttl=64 time=22.975 ms
64 bytes from 10.7.0.1: icmp_seq=2 ttl=64 time=23.071 ms
64 bytes from 10.7.0.1: icmp_seq=3 ttl=64 time=23.547 ms
64 bytes from 10.7.0.1: icmp_seq=4 ttl=64 time=23.713 ms
64 bytes from 10.7.0.1: icmp_seq=5 ttl=64 time=23.456 ms
64 bytes from 10.7.0.1: icmp_seq=6 ttl=64 time=23.693 ms
64 bytes from 10.7.0.1: icmp_seq=7 ttl=64 time=25.982 ms
^C
--- 10.7.0.1 ping statistics ---
8 packets transmitted, 8 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 22.975/24.158/26.829/1.338 ms
可见,可以成功ping通vps的内网ip:10.7.0.1,
不过光能ping通vps的内网ip是不够的,mac机器依然不能翻墙。
(可以把sudo ./minivtun -r my-vps-ip:1414 -a 10.7.0.2/24 --key my-key保存为:
The minivtun is a tiny layer 3 vpn service on posix platform. And this is a windows client for it.
No IPv6 tunnel and point-to-point mode due to limitation of driver
Installation:
Install windows tap driver
site: https://github.com/OpenVPN/tap-windows https://github.com/OpenVPN/tap-windows6
precompiled binary:
NIDS 5 (windows xp and above) https://swupdate.openvpn.org/community/releases/tap-windows-9.9.2_3.exe
NIDS 6 (windows vista and above) https://swupdate.openvpn.org/community/releases/tap-windows-9.21.1.exe
Usage
Mini virtual tunneller in non-standard protocol.
Usage:
minivtun [options]
Options:
-r, --remote <ip:port> IP:port of server to connect
-a, --ipv4-addr <tun_lip/pfx_len> IPv4 address/prefix length pair
-k, --keepalive <keepalive_timeo> seconds between sending keep-alive packets, default: 13
-t, --type <encryption_type> encryption type, default: aes_128_cbc
-e, --key <encrypt_key> shared password for data encryption (if this option is missing, turn off encryption)
-d run as daemon process
-h, --help print this help
Supported encryption types:
rc4, des, desx, aes-256, aes-128
Examples
Client: Connect VPN to the server (assuming address vpn.abc.com), with local virtual address 10.7.0.33, encryption with password "Hello":
python tun.py -r vpn.abc.com:1414 -a 10.7.0.33/24 -e Hello
Client: Connect VPN to the server (assuming address vpn.abc.com), with local virtual address 10.7.0.33, no encryption:
python tun.py -r vpn.abc.com:1414 -a 10.7.0.33/24
from https://github.com/boytm/minivtun-win
https://libraries.io/github/boytm/minivtun-win
---------------
从路由器C浏览器地址栏输入http://172.16.0.3:800即可访问路由A的800端口。
from http://lixingcong.github.io/2016/10/03/openwrt-port-forward/
---------- A simple tunnel for Linux. This repo is an unoffical port of minivtun for openwrt.
minivtun-openwrt
A fast secure and reliable VPN service in non-standard protocol for rapidly deploying VPN servers/clients or getting through firewall. Created by @rssnsj.
It's a very simple point-to-point tunnel client/server. only less than 20kB size.
This repo is an unoffical port for openwrt, if you prefer the offical one, please visit minivtun-tools.
The default route and init.d files was copied from openwrt-shadowvpn. I am so lazy!
git clone https://github.com/rssnsj/minivtun.git minivtun
cd minivtun/src
make
sudo make install
Run and listen(my script copied from shadowvpn, not offical)
# modify your listenig port and password, etc
cd minivtun/linux-server
vi run.sh
# use bash to run, not sh
bash run.sh
if your want to run as linux-client, do the same as linux-server but under linux-client folders. You could turn the China-route mode on, just set isUseRouteFile to True
Enjoy it!
Complie for Openwrt (Client-side)
# ar71xx platform
tar xjf OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2
cd OpenWrt-SDK-ar71xx-*
cd openwrt
git clone https://github.com/lixingcong/minivtun-openwrt package/minivtun-openwrt
# Select Network -> minivtun
make menuconfig
make package/minivtun-openwrt/compile V=99
Configuration for Openwrt
Change password or port
vi /etc/config/minivtun
# Switch: enable = 1 or 0
Restart service
/etc/init.d/minivtun restart
Use Chnroute.txt
Same as ShadowVPN or Shadowsocks, the chnroute.txt is available for Chinese user to change route.
minivtun-rs 0.1
Mini virtual tunneller in non-standard protocol
USAGE:
minivtun-rs [FLAGS] [OPTIONS]
FLAGS:
-d, --daemon run as daemon process
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-F, --fwmark <fwmark_num> fwmark set on vpn traffic
-n, --ifname <ifname> virtual interface name
-a, --ipv4-addr <tun_lip/prf_len> pointopoint IPv4 pair of the virtual interface
-A, --ipv6-addr <tun_ip6/pfx_len>
-K, --keepalive <N> seconds between keep-alive tests, default:7
-e, --key <encryption_key> shared password for data encryption
-l, --local <ip:port> local IP:port for server to listen
-M, --metric <metric> metric of attached routes
-m, --mtu <mtu> set MTU size, default:1300
-R, --reconnect-timeo <N> maximum inactive time (seconds) before reconnect, default:47
-r, --remote <host:port> host:port of server to connect (brace with [] for bare IPv6)
-v, --route <network/prefix[=gw>... attached IPv4/IPv6 route on this link, can be multiple
-T, --table <table_name> route table of the attached routes
-t, --type <encryption_type> encryption type(aes-128, aes-256), default:aes-128
swapfilepath swap swap defaults 0 0
8. In file included from /usr/include/semaphore.h:22:0,
from cts/suite/audio_quality/lib/include/Semaphore.h:21,
from cts/suite/audio_quality/lib/src/Semaphore.cpp:17:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make: In file included from /usr/include/stdlib.h:25:0,
from cts/suite/audio_quality/lib/src/Adb.cpp:16:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
方法:sudo apt-get install libc6-dev:i386
sudo apt-get install build-essential
sudo apt-get install gcc-multilib
9./bin/sh: gcc: not found
方法:sudo apt-get install gcc,gcc是C的编译器
10.gccgcc: error trying to exec 'cc1plus': execvp: gcc: error trying to exec 'No such file or directory
方法:sudo apt-get install g++,g++是C++的编译器
11. /bin/bash: xmllint: command not found
方法:sudo apt-get install libxml2-utils