1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 11:31:51 +00:00

Glorytun UDP support and fix 6in4

This commit is contained in:
Ycarus 2018-05-30 14:33:12 +02:00
parent e11e60bc5d
commit af8dc743c2
8 changed files with 22 additions and 15 deletions

View file

@ -10,7 +10,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=6in4
PKG_VERSION:=27
PKG_VERSION:=270
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0

View file

@ -80,6 +80,11 @@ start_service() {
config_foreach start_instance glorytun
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger glorytun network
}

View file

@ -7,10 +7,10 @@ require("luci.model.uci")
local basicParams = {
--
--
-- Widget, Name, Default(s), Description
--
{ Flag,"enable",0, translate("Enable") },
{ Value,"port",65001, translate("TCP port # for both local and remote") },
{ Value,"dev","tun0", translate("Interface name") },

View file

@ -15,15 +15,20 @@ uci -q batch <<-EOF >/dev/null
delete network.glorytun=interface
set network.glorytun=interface
set network.glorytun.ifname=tun0
set network.glorytun.proto=static
set network.glorytun.ipaddr=10.0.0.2
set network.glorytun.netmask=255.255.255.0
set network.glorytun.gateway=10.0.0.1
# set network.glorytun.proto=static
# set network.glorytun.ipaddr=10.0.0.2
# set network.glorytun.netmask=255.255.255.0
# set network.glorytun.gateway=10.0.0.1
set network.glorytun.ip4table=vpn
set network.glorytun.multipath=off
set network.glorytun.leasetime=12h
commit network
EOF
# set network.glorytun.proto=static
# set network.glorytun.ipaddr=10.0.0.2
# set network.glorytun.netmask=255.255.255.0
# set network.glorytun.gateway=10.0.0.1
if [ "$(uci -q show firewall | grep vpn)" = "" ]; then
uci -q batch <<-EOF >/dev/null
add firewall zone

View file

@ -113,7 +113,8 @@ if [ "$multipath_config" = "master" ]; then
fi
multipath_config="on"
fi
[ "$multipath_config" = "on" ] && glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up > /dev/null 2>&1
[ "$multipath_config" = "backup" ] && glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 backup > /dev/null 2>&1
[ "$multipath_status" = "$multipath_config" ] && exit 0
_log "Multipath $OMR_TRACKER_DEVICE switched to $multipath_config"
multipath "$OMR_TRACKER_DEVICE" "$multipath_config"
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up > /dev/null 2>&1

View file

@ -8,18 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=omr-6in4
PKG_VERSION:=0.1
PKG_VERSION:=0.2
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

View file

@ -12,7 +12,7 @@ reload_service() {
iface=$(uci -q get glorytun.vpn.dev)
[ -z "$iface" ] && exit 0
addr=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f1 | tr -d "\n")
peer=$(ip -4 r list dev $iface | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n")
peer=$(ip -4 r list dev $iface | grep kernel | awk '/proto kernel/ {print $1}' | tr -d "\n")
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

View file

@ -35,7 +35,7 @@ MY_DEPENDS := \
luci-app-nginx-ha luci-app-omr-tracker luci-app-qos \
luci-app-vnstat omr-quota luci-app-omr-quota \
luci-app-mptcp luci-app-openmptcprouter luci-app-omr-bypass \
omr-6in4 ip6tables-mod-nat luci-proto-ipv6 6to4 6in4 6rd iputils-traceroute6 \
omr-ipv6 ip6tables-mod-nat luci-proto-ipv6 6to4 6in4 6rd iputils-traceroute6 \
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