mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
Put 6in4 support in an other package
This commit is contained in:
parent
3652b85cef
commit
fe39ad4d90
4 changed files with 68 additions and 7 deletions
37
omr-6in4/Makefile
Normal file
37
omr-6in4/Makefile
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=omr-6in4
|
||||||
|
PKG_VERSION:=0.1
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
MY_DEPENDS := \
|
||||||
|
6in4
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)
|
||||||
|
SECTION:=OMR
|
||||||
|
CATEGORY:=OpenMPTCProuter
|
||||||
|
DEPENDS:=$(foreach p,$(MY_DEPENDS),+$(p))
|
||||||
|
TITLE:=OpenMPTCProuter 6in4
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)/description
|
||||||
|
OpenMPTCProuter 6in4 package
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|
27
omr-6in4/files/etc/init.d/omr-6in4
Executable file
27
omr-6in4/files/etc/init.d/omr-6in4
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2010-2014 OpenWrt.org
|
||||||
|
|
||||||
|
START=99
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
service_triggers() {
|
||||||
|
procd_add_network_trigger "glorytun"
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
addr=$(ifstatus glorytun | jsonfilter -e '@["ipv4-address"][0].address')
|
||||||
|
peer=$(ifstatus glorytun | jsonfilter -e '@["route"][0].nexthop')
|
||||||
|
if [ "$addr" != "$(uci -q get network.omr6in4.ipaddr)" ] || [ "$peer" != "$(uci -q get network.omr6in4.peeraddr)" ]; then
|
||||||
|
uci -q batch <<-EOF
|
||||||
|
set network.omr6in4.ipaddr=$addr
|
||||||
|
set network.omr6in4.peeraddr=$peer
|
||||||
|
EOF
|
||||||
|
if [ "$(uci -q get glorytun.vpn.proto)" = "udp" ]; then
|
||||||
|
uci -q set network.omr6in4.gateway=fe80::a00:101
|
||||||
|
elif [ "$(uci -q get glorytun.vpn.proto)" = "tcp" ]; then
|
||||||
|
uci -q set network.omr6in4.gateway=fe80::a00:1
|
||||||
|
fi
|
||||||
|
uci -q commit network
|
||||||
|
ifup omr6in4
|
||||||
|
fi
|
||||||
|
}
|
|
@ -26,10 +26,7 @@ MY_DEPENDS := \
|
||||||
iperf3 \
|
iperf3 \
|
||||||
arptables \
|
arptables \
|
||||||
bind-dig \
|
bind-dig \
|
||||||
conntrack conntrackd \
|
conntrack conntrackd ebtables ebtables-utils ip-full \
|
||||||
ebtables ebtables-utils \
|
|
||||||
ip-full \
|
|
||||||
iputils-traceroute6 \
|
|
||||||
iptables-mod-iface iptables-mod-ipmark iptables-mod-hashlimit iptables-mod-condition iptables-mod-trace iptables-mod-conntrack-extra \
|
iptables-mod-iface iptables-mod-ipmark iptables-mod-hashlimit iptables-mod-condition iptables-mod-trace iptables-mod-conntrack-extra \
|
||||||
wireless-tools \
|
wireless-tools \
|
||||||
libiwinfo-lua \
|
libiwinfo-lua \
|
||||||
|
@ -38,11 +35,11 @@ MY_DEPENDS := \
|
||||||
luci-app-nginx-ha luci-app-omr-tracker luci-app-qos \
|
luci-app-nginx-ha luci-app-omr-tracker luci-app-qos \
|
||||||
luci-app-vnstat omr-quota luci-app-omr-quota \
|
luci-app-vnstat omr-quota luci-app-omr-quota \
|
||||||
luci-app-mptcp luci-app-openmptcprouter luci-app-omr-bypass \
|
luci-app-mptcp luci-app-openmptcprouter luci-app-omr-bypass \
|
||||||
speedtestc \
|
omr-6in4 ip6tables-mod-nat luci-proto-ipv6 6to4 6in4 6rd iputils-traceroute6 \
|
||||||
ip6tables-mod-nat luci-proto-ipv6 6to4 6in4 6rd ethtool \
|
speedtestc ethtool \
|
||||||
kmod-rtl8xxxu kmod-rtl8192cu kmod-net-rtl8192su comgt kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan usb-modeswitch uqmi adb-enablemodem umbim kmod-mii kmod-usb-net kmod-usb-wdm kmod-usb-net-qmi-wwan kmod-usb-net-cdc-mbim
|
kmod-rtl8xxxu kmod-rtl8192cu kmod-net-rtl8192su comgt kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan usb-modeswitch uqmi adb-enablemodem umbim kmod-mii kmod-usb-net kmod-usb-wdm kmod-usb-net-qmi-wwan kmod-usb-net-cdc-mbim
|
||||||
|
|
||||||
OMR_SUPPORTED_LANGS := ca zh_cn en fr de el he hu it ja ms no pl pt_br pt ro ru es sv uk vi
|
OMR_SUPPORTED_LANGS := ca zh-cn en fr de el he hu it ja ms no pl pt-br pt ro ru es sv uk vi
|
||||||
|
|
||||||
define Package/$(PKG_NAME)
|
define Package/$(PKG_NAME)
|
||||||
SECTION:=OMR
|
SECTION:=OMR
|
||||||
|
|
Loading…
Reference in a new issue