2014-09-18 22:21:10 +08:00
# zjunet
Command Line Scripts for ZJU (VPN / WLAN / DNS)
2014-09-28 21:42:50 +08:00
## Features
2014-09-18 22:21:10 +08:00
2014-09-28 21:42:50 +08:00
- ZJU VPN (l2tp)
2014-09-18 22:55:22 +08:00
- ZJU WLAN
2014-09-19 23:36:35 +08:00
- 路由器支持( written in Bourne Shell)
2014-09-18 22:55:22 +08:00
- 多拨支持(多账户负载均衡)
2014-09-28 21:42:50 +08:00
- ZJUWLAN 与 ZJUVPN 带宽叠加( 1 WLAN + N VPN, 在 ZJUWLAN 下)
- DNS 自动测试设置(适用于 DNS 坏掉的情况)
2014-09-19 23:19:16 +08:00
2014-09-28 21:46:50 +08:00
## Requirements
- xl2tpd
- curl
2014-09-29 20:02:45 +08:00
## Install
2015-02-08 23:19:16 +08:00
### Debian / Ubuntu (deb)
2014-10-02 13:44:47 +08:00
2015-02-08 20:28:10 +08:00
Use only one of the methods below:
#### 1. From QSC website's linux repository
2015-02-08 20:37:08 +08:00
wget -qO - https://dl.zjuqsc.com/linux/qsc.public.key | sudo apt-key add -
sudo wget https://dl.zjuqsc.com/linux/debian/qsc.list -O /etc/apt/sources.list.d/qsc.list
2015-02-08 20:28:10 +08:00
sudo apt-get update
sudo apt-get install zjunet
#### 2. Download deb
2014-10-15 16:24:20 +08:00
https://github.com/QSCTech/zjunet/releases
2014-10-02 13:47:16 +08:00
下载 deb, 双击安装就是。
2014-10-02 13:44:47 +08:00
2015-02-08 23:19:16 +08:00
### Fedora / CentOS (rpm)
在 Releases 中下载安装方法如上。注意 CentOS 7 中需要 epel 源提供 xl2tpd
#### Install from QSC website's linux repository
sudo wget https://dl.zjuqsc.com/linux/qsc.public.key -O /etc/pki/rpm-gpg/RPM-GPG-KEY-QSC-COMP66
sudo wget https://dl.zjuqsc.com/linux/qsc.repo -O /etc/yum.repos.d/qsc.repo
sudo yum install zjunet
2014-10-02 13:44:47 +08:00
### Openwrt
2014-10-15 16:24:20 +08:00
https://github.com/QSCTech/zjunet/releases
2014-10-02 13:47:16 +08:00
下载 opk, 然后 `opkg install` 就是。
2014-10-02 13:44:47 +08:00
2014-09-30 18:11:45 +08:00
### From source
2014-11-12 20:30:00 +08:00
master分支是开发分支, 请直接从 release 那里获取源码。
2014-10-02 13:47:16 +08:00
2014-09-29 20:02:45 +08:00
```bash
cd zjunet
sudo ./install.sh
```
2014-10-01 04:10:17 +08:00
## Known Issues
2014-11-12 20:22:49 +08:00
### 丢包
在有的机子上会丢包(因为用的是 nexthop )。
等有空了也许会换成 iptables 来解决这个问题。
2014-10-01 04:10:17 +08:00
### ppp0 may disappear on openwrt
make /etc/ppp/options's lcp-echo-failure larger.
see also https://github.com/QSCTech/zjunet/issues/39
2014-09-30 18:11:45 +08:00
## Openwrt
Install xl2tpd:
https://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/packages/
2014-09-29 20:02:45 +08:00
## Dev
2014-09-29 18:44:10 +08:00
QSCer 可以直接向这个 repo push 而不用发 pull request。
有什么疑虑可以提 issue 问一下,
或者直接来办公室找我(zenozeng)。
2014-11-12 20:22:49 +08:00
master分支就是开发分支。
但是请保证bump version的时候要稳定。
2014-09-29 18:44:10 +08:00
2014-09-29 21:11:49 +08:00
### Build
2014-09-30 15:46:57 +08:00
#### Debian
2014-09-29 21:11:49 +08:00
```bash
sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder
```
2014-09-30 20:07:18 +08:00
##### see also
2014-09-30 15:46:57 +08:00
- http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html
- http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/
2014-09-29 21:11:49 +08:00
2014-09-30 20:07:18 +08:00
#### Openwrt
##### see also
- http://lists.openmoko.org/pipermail/devel/2008-July/000496.html
2014-09-19 23:19:16 +08:00
## Links
- [Array in unix Bourne Shell ](http://unix.stackexchange.com/questions/137566/array-in-unix-bourne-shell )
2014-09-20 18:13:40 +08:00
- [How do you tell if a string contains another string in Unix shell scripting? ](http://stackoverflow.com/questions/2829613/how-do-you-tell-if-a-string-contains-another-string-in-unix-shell-scripting )