multiwan package

This commit is contained in:
Sukru Senli 2016-07-14 15:56:54 +02:00
parent 36fb967b80
commit 3153a1d93c
4 changed files with 1214 additions and 0 deletions

47
multiwan/Makefile Normal file
View file

@ -0,0 +1,47 @@
#
# Copyright (C) 2010-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=multiwan
PKG_VERSION:=1.0.22
PKG_RELEASE:=2
include $(INCLUDE_DIR)/package.mk
define Package/multiwan
SECTION:=net
CATEGORY:=Network
DEPENDS:=+ip +iptables +kmod-ipt-conntrack +iptables-mod-conntrack-extra +iptables-mod-ipopt
TITLE:=Simple multi WAN configuration
URL:=ftp://ftp.netlab7.com/
MAINTAINER:=Craig M. Coffee <craigc@netlab7.com>
endef
define Package/multiwan/description
An agent script that makes Multi-WAN configuration simple,
easy and manageable. Complete with load balancing, failover and an easy
to manage traffic ruleset.
endef
define Package/multiwan/conffiles
/etc/config/multiwan
endef
define Build/Compile
endef
define Package/multiwan/install
$(CP) ./files/* $(1)
endef
define Package/multiwan/postinst
[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/multiwan enable
exit 0
endef
$(eval $(call BuildPackage,multiwan))

View file

@ -0,0 +1,57 @@
config 'multiwan' 'config'
# REMOVE THIS LINE OR PUT TO 1 TO ENABLE MULTIWAN
option 'enabled' '0'
option 'default_route' 'balancer'
# health_monitor below is defaulted to parallel, and can be set to
# serial to save system resources.
# option 'health_monitor' 'serial'
# option 'debug' '1'
config 'interface' 'wan'
option 'weight' '10'
option 'health_interval' '10'
option 'icmp_hosts' 'dns'
# icmp_count is defaulted to 1, and can be increased to reduce
# false positives.
# option 'icmp_count' '3'
option 'timeout' '3'
option 'health_fail_retries' '3'
option 'health_recovery_retries' '5'
option 'failover_to' 'wwan'
option 'dns' 'auto'
config 'interface' 'wwan'
option 'weight' '10'
option 'health_interval' '10'
option 'icmp_hosts' 'gateway'
option 'timeout' '3'
option 'health_fail_retries' '3'
option 'health_recovery_retries' '5'
option 'failover_to' 'balancer'
option 'dns' '208.67.222.222 208.67.220.220'
#config 'mwanfw'
# option 'src' '192.168.1.0/24'
# option 'dst' 'ftp.netlab7.com'
# option 'proto' 'tcp'
# option 'ports' '21'
# option 'wanrule' 'wan2'
# VoIP traffic goes through wan
# config 'mwanfw'
# option 'src' '192.168.1.0/24'
# option 'proto' 'udp'
# option 'port_type' 'source-ports'
# option 'ports' '5060,16384:16482'
# option 'wanrule' 'wan'
#config 'mwanfw'
# option 'src' '192.168.0.3'
# option 'proto' 'icmp'
# option 'wanrule' 'balancer'
#config 'mwanfw'
# option 'dst' 'www.whatismyip.com'
# option 'wanrule' 'fastbalancer'

View file

@ -0,0 +1,25 @@
#!/bin/sh /etc/rc.common
START=99
EXTRA_COMMANDS="single"
USE_PROCD=1
start_service () {
/usr/bin/multiwan agent &
}
stop_service () {
sh /usr/bin/multiwan stop
}
reload_service () {
/usr/bin/multiwan restart &
}
single () {
/usr/bin/multiwan single &
}
service_triggers() {
procd_add_reload_trigger multiwan
}

1085
multiwan/files/usr/bin/multiwan Executable file

File diff suppressed because it is too large Load diff