mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
commit
5bc8d47300
8 changed files with 272 additions and 35 deletions
97
libmbim/Makefile
Normal file
97
libmbim/Makefile
Normal file
|
@ -0,0 +1,97 @@
|
|||
#
|
||||
# Copyright (C) 2016 Velocloud Inc.
|
||||
# Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
|
||||
# Copyright (C) 2021 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libmbim.git
|
||||
PKG_SOURCE_VERSION:=3d6966640c7c3d11ba1a96577f1ddd4bc1549a78
|
||||
|
||||
PKG_NAME:=libmbim
|
||||
PKG_VERSION:=1.25.3-$(PKG_SOURCE_VERSION)
|
||||
PKG_RELEASE:=10
|
||||
|
||||
PKG_MAINTAINER:=Nicholas Smith <nicholas.smith@telcoantennas.com.au>
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-static \
|
||||
--disable-gtk-doc \
|
||||
--disable-gtk-doc-html \
|
||||
--disable-gtk-doc-pdf \
|
||||
--disable-silent-rules \
|
||||
--enable-more-warnings=yes
|
||||
|
||||
define Package/libmbim
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+glib2
|
||||
TITLE:=Helper library and utils to talk to MBIM enabled modems
|
||||
URL:=https://www.freedesktop.org/wiki/Software/libmbim
|
||||
LICENSE:=LGPL-2.0-or-later
|
||||
LICENSE_FILES:=COPYING.LIB
|
||||
endef
|
||||
|
||||
define Package/libmbim/description
|
||||
Helper library to talk to MBIM enabled modems.
|
||||
Add mbim-utils for extra utilities.
|
||||
endef
|
||||
|
||||
define Package/mbim-utils
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libmbim
|
||||
TITLE:=Utilities to talk to MBIM enabled modems
|
||||
URL:=https://www.freedesktop.org/wiki/Software/libmbim
|
||||
LICENSE:=GPL-2.0-or-later
|
||||
LICENSE_FILES:=COPYING
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--without-udev \
|
||||
--without-udev-base-dir
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/libmbim-glib \
|
||||
$(1)/usr/include/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libmbim*.so* \
|
||||
$(1)/usr/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbim-glib.pc \
|
||||
$(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
define Package/libmbim/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libmbim*.so.* \
|
||||
$(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mbim-proxy $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/mbim-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbimcli $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbim-network $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libmbim))
|
||||
$(eval $(call BuildPackage,mbim-utils))
|
16
libqmi/Config.in
Normal file
16
libqmi/Config.in
Normal file
|
@ -0,0 +1,16 @@
|
|||
menu "Configuration"
|
||||
depends on PACKAGE_libqmi
|
||||
|
||||
config LIBQMI_WITH_MBIM_QMUX
|
||||
bool "Include MBIM QMUX service support"
|
||||
default y
|
||||
help
|
||||
Compile libqmi with QMI-over-MBIM support
|
||||
|
||||
config LIBQMI_WITH_QRTR_GLIB
|
||||
bool "Include QRTR support"
|
||||
default y
|
||||
help
|
||||
Compile libqmi with QRTR support
|
||||
|
||||
endmenu
|
110
libqmi/Makefile
Normal file
110
libqmi/Makefile
Normal file
|
@ -0,0 +1,110 @@
|
|||
#
|
||||
# Copyright (C) 2016 Velocloud Inc.
|
||||
# Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
|
||||
# Copyright (C) 2021 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libqmi.git
|
||||
PKG_SOURCE_VERSION:=0b1906618eb47b8bd37fba61507259ef09584031
|
||||
PKG_NAME:=libqmi
|
||||
PKG_VERSION:=1.29.3-$(PKG_SOURCE_VERSION)
|
||||
PKG_RELEASE:=10
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_MAINTAINER:=Nicholas Smith <nicholas.smith@telcoantennas.com.au>
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/libqmi/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/libqmi
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:= \
|
||||
+glib2 \
|
||||
+LIBQMI_WITH_MBIM_QMUX:libmbim \
|
||||
+LIBQMI_WITH_QRTR_GLIB:libqrtr-glib
|
||||
TITLE:=Helper library to talk to QMI enabled modems
|
||||
URL:=https://www.freedesktop.org/wiki/Software/libqmi
|
||||
LICENSE:=LGPL-2.0-or-later
|
||||
LICENSE_FILES:=COPYING.LIB
|
||||
endef
|
||||
|
||||
define Package/libqmi/description
|
||||
Helper library talk to QMI enabled modems.
|
||||
Add qmi-utils for extra utilities.
|
||||
endef
|
||||
|
||||
define Package/qmi-utils
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libqmi
|
||||
TITLE:=Utilities to talk to QMI enabled modems
|
||||
URL:=https://www.freedesktop.org/wiki/Software/libqmi
|
||||
LICENSE:=GPL-2.0-or-later
|
||||
LICENSE_FILES:=COPYING
|
||||
endef
|
||||
|
||||
define Package/libqmi-utils/description
|
||||
Utils to talk to QMI enabled modems
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-static \
|
||||
--disable-gtk-doc \
|
||||
--disable-gtk-doc-html \
|
||||
--disable-gtk-doc-pdf \
|
||||
--disable-silent-rules \
|
||||
--enable-firmware-update \
|
||||
--$(if $(LIBQMI_WITH_MBIM_QMUX),en,dis)able-mbim-qmux \
|
||||
--$(if $(LIBQMI_WITH_QRTR_GLIB),en,dis)able-qrtr \
|
||||
--enable-more-warnings=yes \
|
||||
--without-udev \
|
||||
--without-udev-base-dir
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/libqmi-glib \
|
||||
$(1)/usr/include/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libqmi*.so* \
|
||||
$(1)/usr/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/qmi-glib.pc \
|
||||
$(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
define Package/libqmi/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libqmi*.so.* \
|
||||
$(1)/usr/lib/
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/qmi-proxy $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/qmi-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmicli $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-network $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-firmware-update $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libqmi))
|
||||
$(eval $(call BuildPackage,qmi-utils))
|
|
@ -349,14 +349,16 @@ function wizard_add()
|
|||
ucic:set("sqm",intf,"qdisc","fq_codel")
|
||||
ucic:set("sqm",intf,"script","simple.qos")
|
||||
ucic:set("sqm",intf,"qdisc_advanced","0")
|
||||
ucic:set("sqm",intf,"linklayer","none")
|
||||
ucic:set("sqm",intf,"linklayer","atm")
|
||||
ucic:set("sqm",intf,"overhead","40")
|
||||
ucic:set("sqm",intf,"enabled","0")
|
||||
ucic:set("sqm",intf,"debug_logging","0")
|
||||
ucic:set("sqm",intf,"verbosity","5")
|
||||
ucic:set("sqm",intf,"download","0")
|
||||
ucic:set("sqm",intf,"upload","0")
|
||||
ucic:set("sqm",intf,"iqdisc_opts","autorate-ingress dual-dsthost")
|
||||
ucic:set("sqm",intf,"eqdisc_opts","dual-srchost")
|
||||
ucic:set("sqm",intf,"iqdisc_opts","autorate-ingress")
|
||||
--ucic:set("sqm",intf,"iqdisc_opts","autorate-ingress dual-dsthost")
|
||||
--ucic:set("sqm",intf,"eqdisc_opts","dual-srchost")
|
||||
end
|
||||
|
||||
if downloadspeed ~= "0" and downloadspeed ~= "" then
|
||||
|
@ -379,8 +381,9 @@ function wizard_add()
|
|||
end
|
||||
|
||||
if sqmenabled == "1" then
|
||||
ucic:set("sqm",intf,"iqdisc_opts","autorate-ingress dual-dsthost")
|
||||
ucic:set("sqm",intf,"eqdisc_opts","dual-srchost")
|
||||
ucic:set("sqm",intf,"iqdisc_opts","autorate-ingress")
|
||||
--ucic:set("sqm",intf,"iqdisc_opts","autorate-ingress dual-dsthost")
|
||||
--ucic:set("sqm",intf,"eqdisc_opts","dual-srchost")
|
||||
ucic:set("sqm",intf,"enabled","1")
|
||||
ucic:set("qos",intf,"enabled","1")
|
||||
else
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
#
|
||||
# Copyright (C) 2016 Velocloud Inc.
|
||||
# Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
|
||||
# Copyright (C) 2021 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
|
||||
PKG_SOURCE_VERSION:=26243e7ed78820d5f0ce95098e7dfeaa1b29baf3
|
||||
PKG_NAME:=modemmanager
|
||||
PKG_VERSION:=1.16.2
|
||||
PKG_VERSION:=1.16.3-$(PKG_SOURCE_VERSION)
|
||||
PKG_RELEASE:=10
|
||||
|
||||
PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager
|
||||
PKG_HASH:=efa9a963499e0885f3f163096d433334143c4937545134ecd682e0157fa591e3
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION)
|
||||
#PKG_BUILD_DIR:=$(BUILD_DIR)/modemamanager-$
|
||||
|
||||
PKG_MAINTAINER:=Nicholas Smith <nicholas.smith@telcoantennas.com.au>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
|
|
|
@ -1314,11 +1314,11 @@ if [ "$(pgrep rpcd)" = "" ] && [ -f /etc/init.d/rpcd ]; then
|
|||
sleep 5
|
||||
fi
|
||||
|
||||
if [ "$(pgrep ModemManager)" = "" ] && [ -f /etc/init.d/modemmanager ] && [ -n "$(uci -q show network | grep modemmanager)" ] && [ "$(uci -q get openmptcprouter.settings.modemmanager)" != "0" ]; then
|
||||
_log "Can't find ModemManager, restart it..."
|
||||
/etc/init.d/modemmanager restart
|
||||
sleep 5
|
||||
fi
|
||||
#if [ "$(pgrep ModemManager)" = "" ] && [ -f /etc/init.d/modemmanager ] && [ -n "$(uci -q show network | grep modemmanager)" ] && [ "$(uci -q get openmptcprouter.settings.modemmanager)" != "0" ]; then
|
||||
# _log "Can't find ModemManager, restart it..."
|
||||
# /etc/init.d/modemmanager restart
|
||||
# sleep 5
|
||||
#fi
|
||||
|
||||
if [ "$(uci -q get v2ray.main.enabled)" = "1" ] && [ -f /etc/init.d/v2ray ] && [ "$(pgrep -f omr-tracker-v2ray)" = "" ] && [ "$(pgrep -f '/etc/init.d/omr-tracker')" = "" ]; then
|
||||
_log "Can't find omr-tracker-v2ray, restart omr-tracker..."
|
||||
|
|
|
@ -1100,13 +1100,21 @@ _set_vps_firewall() {
|
|||
vpsfwlist=$(echo $fw_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')
|
||||
settings='{"name" : "open router"}'
|
||||
fw_list=$(_set_json "shorewalllist" "$settings")
|
||||
vpsfwlist="$vpsfwlist\n$(echo $fw_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')"
|
||||
if [ -n "$vpsfwlist" ]; then
|
||||
vpsfwlist="$vpsfwlist\n$(echo $fw_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')"
|
||||
else
|
||||
vpsfwlist="$(echo $fw_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')"
|
||||
fi
|
||||
settings='{"name" : "redirect router","ipproto" : "ipv6"}'
|
||||
fw6_list=$(_set_json "shorewalllist" "$settings")
|
||||
vpsfw6list=$(echo $fw6_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')
|
||||
settings='{"name" : "open router","ipproto" : "ipv6"}'
|
||||
fw6_list=$(_set_json "shorewalllist" "$settings")
|
||||
vpsfw6list="$vpsfw6list\n$(echo $fw6_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')"
|
||||
if [ -n "$vpsfw6list" ]; then
|
||||
vpsfw6list="$vpsfw6list\n$(echo $fw6_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')"
|
||||
else
|
||||
vpsfw6list="$(echo $fw6_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')"
|
||||
fi
|
||||
config_load firewall
|
||||
config_foreach _vps_firewall_redirect_port redirect
|
||||
config_foreach _vps_firewall_redirect_port rule
|
||||
|
|
|
@ -74,24 +74,24 @@ if [ "$(uci -q get openmptcprouter.settings.version)" = "" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
#if [ "$(uci -q get sqm.omrvpn)" = "" ]; then
|
||||
# uci -q batch <<-EOF >/dev/null
|
||||
# set sqm.omrvpn=queue
|
||||
# set sqm.omrvpn.qdisc="fq_codel"
|
||||
# set sqm.omrvpn.script="simple.qos"
|
||||
# set sqm.omrvpn.qdisc_advanced='0'
|
||||
# set sqm.omrvpn.linklayer='none'
|
||||
# set sqm.omrvpn.enabled='1'
|
||||
# set sqm.omrvpn.interface=tun0
|
||||
# set sqm.omrvpn.download='0'
|
||||
# set sqm.omrvpn.upload='0'
|
||||
# set sqm.omrvpn.debug_logging='0'
|
||||
# set sqm.omrvpn.verbosity='5'
|
||||
# set sqm.omrvpn.iqdisc_opts='autorate-ingress dual-dsthost'
|
||||
# set sqm.omrvpn.eqdisc_opts='dual-srchost'
|
||||
# commit sqm
|
||||
# EOF
|
||||
#fi
|
||||
if [ "$(uci -q get sqm.omrvpn)" = "" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set sqm.omrvpn=queue
|
||||
set sqm.omrvpn.qdisc="cake"
|
||||
set sqm.omrvpn.script="piece_of_cake.qos"
|
||||
set sqm.omrvpn.qdisc_advanced='0'
|
||||
set sqm.omrvpn.linklayer='none'
|
||||
set sqm.omrvpn.enabled='1'
|
||||
set sqm.omrvpn.interface=tun0
|
||||
set sqm.omrvpn.download='0'
|
||||
set sqm.omrvpn.upload='0'
|
||||
set sqm.omrvpn.debug_logging='0'
|
||||
set sqm.omrvpn.verbosity='5'
|
||||
set sqm.omrvpn.overhead='40'
|
||||
set sqm.omrvpn.iqdisc_opts='autorate-ingress'
|
||||
commit sqm
|
||||
EOF
|
||||
fi
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
|
||||
|
|
Loading…
Reference in a new issue