diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0816f403..b70d91191 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: build: strategy: matrix: - OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, cm520-79f, x86_64, ubnt-erx, r4s, r7800, l1000, zbt4019] + OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, cm520-79f, x86_64, ubnt-erx, r4s, r7800, rutx, l1000, zbt4019] OMR_KERNEL: [5.4, 5.15] runs-on: ubuntu-latest continue-on-error: true diff --git a/grpcurl/Makefile b/grpcurl/Makefile new file mode 100644 index 000000000..8bec5ccf4 --- /dev/null +++ b/grpcurl/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2022 Ycarus (Yannick Chabanois) for OpenMPTCProuter +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=grpcurl +PKG_VERSION:=1.8.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=v$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/fullstorydev/grpcurl/archive/refs/tags/ +PKG_HASH:=18b457f644baabeef0de350596dd8d23563586ee94a3ed3cb290063e097ab934 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Yannick Chabanois + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +GO_PKG:=github.com/fullstorydev/grpcurl +GO_PKG_BUILD_PKG:=github.com/fullstorydev/grpcurl/cmd/grpcurl +GO_PKG_LDFLAGS_X:= \ + $(GO_PKG)/constant.Version=$(PKG_VERSION) \ + $(GO_PKG)/constant.Commit=v$(PKG_VERSION) +GO_PKG_LDFLAGS:=-s -w +GO_PKG_TAGS:=master + +include $(INCLUDE_DIR)/package.mk +include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk + +define Package/grpcurl + TITLE:=grpcurl is a command-line tool that lets you interact with gRPC servers + URL:=https://github.com/fullstorydev/grpcurl + SECTION:=net + CATEGORY:=Network + DEPENDS:=$(GO_ARCH_DEPENDS) +protobuf +endef + +define Package/grpcurl/description + grpcurl is a command-line tool that lets you interact with gRPC servers. It's basically curl for gRPC servers. + + The main purpose for this tool is to invoke RPC methods on a gRPC server from the command-line. gRPC servers use a binary encoding on the wire (protocol buffers, or "protobufs" for short). So they are basically impossible to interact with using regular curl (and older versions of curl that do not support HTTP/2 are of course non-starters). This program accepts messages using JSON encoding, which is much more friendly for both humans and scripts. +endef + +define Package/v2ray-core/install + $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) + + $(INSTALL_DIR) $(1)/usr/bin + + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/grpcurl $(1)/usr/bin +endef + +$(eval $(call GoBinPackage,grpcurl)) +$(eval $(call BuildPackage,grpcurl)) diff --git a/iperf3/Makefile b/iperf3/Makefile index 6cdb6b8a9..cf0d6599c 100755 --- a/iperf3/Makefile +++ b/iperf3/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iperf -PKG_VERSION:=3.10.1 +PKG_VERSION:=3.11 PKG_RELEASE:=10 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://downloads.es.net/pub/iperf -PKG_HASH:=03bc9760cc54a245191d46bfc8edaf8a4750f0e87abca6764486972044d6715a +PKG_SOURCE:=$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/esnet/iperf/archive/refs/tags/ +PKG_HASH:=96e909c0d3ab6034c52328c2954fb3934aaff349395c4bc2611dcd50e6b89875 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause diff --git a/iproute2/Makefile b/iproute2/Makefile new file mode 100644 index 000000000..1405f0752 --- /dev/null +++ b/iproute2/Makefile @@ -0,0 +1,246 @@ +# +# Copyright (C) 2006-2015 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:=iproute2 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/network/iproute2/iproute2.git +PKG_SOURCE_VERSION:=29da83f89f6e1fe528c59131a01f5d43bcd0a000 +PKG_VERSION:=5.16.0-$(PKG_SOURCE_VERSION) + +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=iptables +PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:iproute2_project:iproute2 + +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/iproute2/Default + SECTION:=net + CATEGORY:=Network + URL:=http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 + SUBMENU:=Routing and Redirection + MAINTAINER:=Russell Senior +endef + +define Package/ip-tiny +$(call Package/iproute2/Default) + TITLE:=Routing control utility (minimal) + VARIANT:=iptiny + DEFAULT_VARIANT:=1 + PROVIDES:=ip + ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/ip-full +$(call Package/iproute2/Default) + TITLE:=Routing control utility (full) + VARIANT:=ipfull + PROVIDES:=ip + ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full + DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-tiny +$(call Package/iproute2/Default) + TITLE:=Traffic control utility (minimal) + VARIANT:=tctiny + DEFAULT_VARIANT:=1 + PROVIDES:=tc + ALTERNATIVES:=200:/sbin/tc:/usr/libexec/tc-tiny + DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-full +$(call Package/iproute2/Default) + TITLE:=Traffic control utility (full) + VARIANT:=tcfull + PROVIDES:=tc + ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-full + DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-mod-iptables +$(call Package/iproute2/Default) + TITLE:=Traffic control module - iptables action + DEPENDS:=+libxtables +endef + +define Package/genl +$(call Package/iproute2/Default) + TITLE:=General netlink utility frontend + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/ip-bridge +$(call Package/iproute2/Default) + TITLE:=Bridge configuration utility from iproute2 + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/ss +$(call Package/iproute2/Default) + TITLE:=Socket statistics utility + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +kmod-netlink-diag +endef + +define Package/nstat +$(call Package/iproute2/Default) + TITLE:=Network statistics utility + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/devlink +$(call Package/iproute2/Default) + TITLE:=Network devlink utility + DEPENDS:=+libmnl +endef + +define Package/rdma +$(call Package/iproute2/Default) + TITLE:=Network rdma utility + DEPENDS:=+libmnl +endef + +ifeq ($(BUILD_VARIANT),iptiny) + IP_CONFIG_TINY:=y + LIBBPF_FORCE:=off +endif + +ifeq ($(BUILD_VARIANT),ipfull) + HAVE_ELF:=y + LIBBPF_FORCE:=on +endif + +ifeq ($(BUILD_VARIANT),tctiny) + LIBBPF_FORCE:=off + SHARED_LIBS:=y +endif + +ifeq ($(BUILD_VARIANT),tcfull) + HAVE_ELF:=y + LIBBPF_FORCE:=on + SHARED_LIBS:=y +endif + +ifdef CONFIG_PACKAGE_devlink + HAVE_MNL:=y +endif + +ifdef CONFIG_PACKAGE_rdma + HAVE_MNL:=y +endif + +define Build/Configure + echo "static const char SNAPSHOT[] = \"$(PKG_VERSION)-$(PKG_RELEASE)-openwrt\";" \ + > $(PKG_BUILD_DIR)/include/SNAPSHOT.h +endef + +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed +TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny + +MAKE_FLAGS += \ + KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \ + SHARED_LIBS=$(SHARED_LIBS) \ + IP_CONFIG_TINY=$(IP_CONFIG_TINY) \ + BUILD_VARIANT=$(BUILD_VARIANT) \ + LIBBPF_FORCE=$(LIBBPF_FORCE) \ + HAVE_ELF=$(HAVE_ELF) \ + HAVE_MNL=$(HAVE_MNL) \ + HAVE_CAP=$(HAVE_CAP) \ + IPT_LIB_DIR=/usr/lib/iptables \ + XT_LIB_DIR=/usr/lib/iptables \ + FPIC="$(FPIC)" \ + $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') + +define Build/Compile + +$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/iproute2 + $(CP) $(PKG_BUILD_DIR)/include/bpf_elf.h $(1)/usr/include/iproute2 + $(CP) $(PKG_BUILD_DIR)/include/{libgenl,libnetlink}.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/ +endef + +define Package/ip-tiny/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/libexec/ip-tiny +endef + +define Package/ip-full/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/libexec/ip-full +endef + +define Package/tc-tiny/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-tiny +endef + +define Package/tc-full/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full +endef + +define Package/tc-mod-iptables/install + $(INSTALL_DIR) $(1)/usr/lib/tc + $(CP) $(PKG_BUILD_DIR)/tc/m_xt.so $(1)/usr/lib/tc +endef + +define Package/genl/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/ +endef + +define Package/ip-bridge/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/ +endef + +define Package/ss/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/ +endef + +define Package/nstat/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/nstat $(1)/usr/sbin/ +endef + +define Package/devlink/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/devlink/devlink $(1)/usr/sbin/ +endef + +define Package/rdma/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rdma/rdma $(1)/usr/sbin/ +endef + +#$(eval $(call BuildPackage,ip-tiny)) +$(eval $(call BuildPackage,ip-full)) +# build tc-mod-iptables before its dependents, to avoid +# spurious rebuilds when building multiple variants. +$(eval $(call BuildPackage,tc-mod-iptables)) +#$(eval $(call BuildPackage,tc-tiny)) +$(eval $(call BuildPackage,tc-full)) +$(eval $(call BuildPackage,genl)) +$(eval $(call BuildPackage,ip-bridge)) +$(eval $(call BuildPackage,ss)) +$(eval $(call BuildPackage,nstat)) +$(eval $(call BuildPackage,devlink)) +$(eval $(call BuildPackage,rdma)) diff --git a/iproute2/patches/100-configure.patch b/iproute2/patches/100-configure.patch new file mode 100644 index 000000000..0c19b2086 --- /dev/null +++ b/iproute2/patches/100-configure.patch @@ -0,0 +1,12 @@ +--- a/configure ++++ b/configure +@@ -34,7 +34,8 @@ int main(int argc, char **argv) { + } + EOF + +- if $CC -I$INCLUDE -o $TMPDIR/atmtest $TMPDIR/atmtest.c -latm >/dev/null 2>&1; then ++# OpenWrt: disable ATM support even if present on host system ++ if [ 1 -eq 0 ]; then + echo "TC_CONFIG_ATM:=y" >>$CONFIG + echo yes + else diff --git a/iproute2/patches/110-darwin_fixes.patch b/iproute2/patches/110-darwin_fixes.patch new file mode 100644 index 000000000..1f3eb101e --- /dev/null +++ b/iproute2/patches/110-darwin_fixes.patch @@ -0,0 +1,59 @@ +--- a/netem/maketable.c ++++ b/netem/maketable.c +@@ -10,7 +10,9 @@ + #include + #include + #include ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include ++#endif + #include + #include + #include +--- a/netem/normal.c ++++ b/netem/normal.c +@@ -8,8 +8,12 @@ + #include + #include + ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include + #include ++#else ++#define NETEM_DIST_SCALE 8192 ++#endif + + #define TABLESIZE 16384 + #define TABLEFACTOR NETEM_DIST_SCALE +--- a/netem/pareto.c ++++ b/netem/pareto.c +@@ -7,8 +7,12 @@ + #include + #include + ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include + #include ++#else ++#define NETEM_DIST_SCALE 8192 ++#endif + + static const double a=3.0; + #define TABLESIZE 16384 +--- a/netem/paretonormal.c ++++ b/netem/paretonormal.c +@@ -14,10 +14,13 @@ + #include + #include + #include ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include +- + #include + #include ++#else ++#define NETEM_DIST_SCALE 8192 ++#endif + + #define TABLESIZE 16384 + #define TABLEFACTOR NETEM_DIST_SCALE diff --git a/iproute2/patches/115-add-config-xtlibdir.patch b/iproute2/patches/115-add-config-xtlibdir.patch new file mode 100644 index 000000000..8702d5fd2 --- /dev/null +++ b/iproute2/patches/115-add-config-xtlibdir.patch @@ -0,0 +1,12 @@ +--- a/tc/Makefile ++++ b/tc/Makefile +@@ -128,6 +128,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR + ifneq ($(IPT_LIB_DIR),) + CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\" + endif ++ifneq ($(XT_LIB_DIR),) ++ CFLAGS += -DXT_LIB_DIR=\"$(XT_LIB_DIR)\" ++endif + + LEX := flex + CFLAGS += -DYY_NO_INPUT diff --git a/iproute2/patches/120-no_arpd_ifstat_rtacct_lnstat.patch b/iproute2/patches/120-no_arpd_ifstat_rtacct_lnstat.patch new file mode 100644 index 000000000..bb6a8d018 --- /dev/null +++ b/iproute2/patches/120-no_arpd_ifstat_rtacct_lnstat.patch @@ -0,0 +1,20 @@ +--- a/misc/Makefile ++++ b/misc/Makefile +@@ -2,13 +2,13 @@ + SSOBJ=ss.o ssfilter_check.o ssfilter.tab.o + LNSTATOBJ=lnstat.o lnstat_util.o + +-TARGETS=ss nstat ifstat rtacct lnstat ++TARGETS=ss nstat + + include ../config.mk + +-ifeq ($(HAVE_BERKELEY_DB),y) +- TARGETS += arpd +-endif ++#ifeq ($(HAVE_BERKELEY_DB),y) ++# TARGETS += arpd ++#endif + + all: $(TARGETS) + diff --git a/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch b/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch new file mode 100644 index 000000000..8ddb31674 --- /dev/null +++ b/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -55,7 +55,7 @@ WFLAGS += -Wmissing-declarations -Wold-s + CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) + YACCFLAGS = -d -t -v + +-SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa ++SUBDIRS=lib ip tc bridge misc genl devlink rdma + + LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a + LDLIBS += $(LIBNETLINK) diff --git a/iproute2/patches/140-allow_pfifo_fast.patch b/iproute2/patches/140-allow_pfifo_fast.patch new file mode 100644 index 000000000..13de48f41 --- /dev/null +++ b/iproute2/patches/140-allow_pfifo_fast.patch @@ -0,0 +1,9 @@ +--- a/tc/q_fifo.c ++++ b/tc/q_fifo.c +@@ -95,5 +95,6 @@ struct qdisc_util pfifo_head_drop_qdisc_ + + struct qdisc_util pfifo_fast_qdisc_util = { + .id = "pfifo_fast", ++ .parse_qopt = fifo_parse_opt, + .print_qopt = prio_print_opt, + }; diff --git a/iproute2/patches/140-keep_libmnl_optional.patch b/iproute2/patches/140-keep_libmnl_optional.patch new file mode 100644 index 000000000..ff7e9ca4e --- /dev/null +++ b/iproute2/patches/140-keep_libmnl_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -387,7 +387,7 @@ check_selinux() + + check_mnl() + { +- if ${PKG_CONFIG} libmnl --exists; then ++ if [ "${HAVE_MNL}" = "y" ] && ${PKG_CONFIG} libmnl --exists; then + echo "HAVE_MNL:=y" >>$CONFIG + echo "yes" + diff --git a/iproute2/patches/145-keep_libelf_optional.patch b/iproute2/patches/145-keep_libelf_optional.patch new file mode 100644 index 000000000..079ca0512 --- /dev/null +++ b/iproute2/patches/145-keep_libelf_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -255,7 +255,7 @@ EOF + + check_elf() + { +- if ${PKG_CONFIG} libelf --exists; then ++ if [ "${HAVE_ELF}" = "y" ] && ${PKG_CONFIG} libelf --exists; then + echo "HAVE_ELF:=y" >>$CONFIG + echo "yes" + diff --git a/iproute2/patches/150-keep_libcap_optional.patch b/iproute2/patches/150-keep_libcap_optional.patch new file mode 100644 index 000000000..68e162416 --- /dev/null +++ b/iproute2/patches/150-keep_libcap_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -445,7 +445,7 @@ EOF + + check_cap() + { +- if ${PKG_CONFIG} libcap --exists; then ++ if [ "${HAVE_CAP}" = "y" ] && ${PKG_CONFIG} libcap --exists; then + echo "HAVE_CAP:=y" >>$CONFIG + echo "yes" + diff --git a/iproute2/patches/160-libnetlink-pic.patch b/iproute2/patches/160-libnetlink-pic.patch new file mode 100644 index 000000000..145ec7a9e --- /dev/null +++ b/iproute2/patches/160-libnetlink-pic.patch @@ -0,0 +1,11 @@ +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + include ../config.mk + +-CFLAGS += -fPIC ++CFLAGS += $(FPIC) + + UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \ + inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \ diff --git a/iproute2/patches/175-reduce-dynamic-syms.patch b/iproute2/patches/175-reduce-dynamic-syms.patch new file mode 100644 index 000000000..c3892e5a0 --- /dev/null +++ b/iproute2/patches/175-reduce-dynamic-syms.patch @@ -0,0 +1,45 @@ +--- a/tc/Makefile ++++ b/tc/Makefile +@@ -114,7 +114,7 @@ LDLIBS += -L. -lm + + ifeq ($(SHARED_LIBS),y) + LDLIBS += -ldl +-LDFLAGS += -Wl,-export-dynamic ++LDFLAGS += -Wl,--dynamic-list=dynsyms.list + endif + + TCLIB := tc_core.o +@@ -144,7 +144,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc + all: tc $(TCSO) + + tc: $(TCOBJ) $(LIBNETLINK) libtc.a +- $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@ ++ $(QUIET_LINK)$(CC) $(filter-out dynsyms.list, $^) $(LDFLAGS) $(LDLIBS) -o $@ + + libtc.a: $(TCLIB) + $(QUIET_AR)$(AR) rcs $@ $^ +@@ -166,6 +166,7 @@ install: all + clean: + rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \ + rm -f emp_ematch.tab.* ++ rm -f dynsyms.list + + q_atm.so: q_atm.c + $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm +@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c) + sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ + done > $@ + ++else ++ ++tc: dynsyms.list ++m_xt.so: dynsyms.list ++dynsyms.list: $(wildcard *.c) ++ files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \ ++ echo "{" > $@ ; \ ++ for s in `grep -B 3 '\> $@ ; \ ++ echo "show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> $@ ++ + endif diff --git a/iproute2/patches/180-drop_FAILED_POLICY.patch b/iproute2/patches/180-drop_FAILED_POLICY.patch new file mode 100644 index 000000000..07d5230a6 --- /dev/null +++ b/iproute2/patches/180-drop_FAILED_POLICY.patch @@ -0,0 +1,41 @@ +From 4e7dbf76227e8c7be7897dc81def3011f637864d Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Thu, 30 May 2013 11:54:04 +0200 +Subject: [PATCH] add support for dropping with FAILED_POLICY + +--- + include/linux/fib_rules.h | 4 ++++ + include/linux/rtnetlink.h | 1 + + ip/rtm_map.c | 4 ++++ + 3 files changed, 9 insertions(+) + +--- a/ip/rtm_map.c ++++ b/ip/rtm_map.c +@@ -54,6 +54,8 @@ char *rtnl_rtntype_n2a(int id, char *buf + return "nat"; + case RTN_XRESOLVE: + return "xresolve"; ++ case RTN_FAILED_POLICY: ++ return "failed_policy"; + default: + snprintf(buf, len, "%d", id); + return buf; +@@ -89,6 +91,8 @@ int rtnl_rtntype_a2n(int *id, char *arg) + res = RTN_UNICAST; + else if (strcmp(arg, "throw") == 0) + res = RTN_THROW; ++ else if (strcmp(arg, "failed_policy") == 0) ++ res = RTN_FAILED_POLICY; + else { + res = strtoul(arg, &end, 0); + if (!end || end == arg || *end || res > 255) +--- a/include/uapi/linux/rtnetlink.h ++++ b/include/uapi/linux/rtnetlink.h +@@ -256,6 +256,7 @@ enum { + RTN_THROW, /* Not in this table */ + RTN_NAT, /* Translate this address */ + RTN_XRESOLVE, /* Use external resolver */ ++ RTN_FAILED_POLICY, /* Source address failed policy */ + __RTN_MAX + }; + diff --git a/iproute2/patches/190-fix-nls-rpath-link.patch b/iproute2/patches/190-fix-nls-rpath-link.patch new file mode 100644 index 000000000..92d02b9a4 --- /dev/null +++ b/iproute2/patches/190-fix-nls-rpath-link.patch @@ -0,0 +1,20 @@ +--- a/configure ++++ b/configure +@@ -279,7 +279,7 @@ int main(int argc, char **argv) { + } + EOF + +- $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS >/dev/null 2>&1 ++ $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS >/dev/null 2>&1 + local ret=$? + + rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test +@@ -297,7 +297,7 @@ int main(int argc, char **argv) { + } + EOF + +- $CC -o $TMPDIR/libbpf_sec_test $TMPDIR/libbpf_sec_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS >/dev/null 2>&1 ++ $CC -o $TMPDIR/libbpf_sec_test $TMPDIR/libbpf_sec_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS >/dev/null 2>&1 + local ret=$? + + rm -f $TMPDIR/libbpf_sec_test.c $TMPDIR/libbpf_sec_test diff --git a/iproute2/patches/200-drop_libbsd_dependency.patch b/iproute2/patches/200-drop_libbsd_dependency.patch new file mode 100644 index 000000000..12a1ccfa3 --- /dev/null +++ b/iproute2/patches/200-drop_libbsd_dependency.patch @@ -0,0 +1,19 @@ +--- a/configure ++++ b/configure +@@ -431,14 +431,8 @@ EOF + if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then + echo "no" + else +- if ${PKG_CONFIG} libbsd --exists; then +- echo 'CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG +- echo 'LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG +- echo "no" +- else +- echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG +- echo "yes" +- fi ++ echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG ++ echo "yes" + fi + rm -f $TMPDIR/strtest.c $TMPDIR/strtest + } diff --git a/iproute2/patches/300-selinux-configurable.patch b/iproute2/patches/300-selinux-configurable.patch new file mode 100644 index 000000000..b7e61fd3b --- /dev/null +++ b/iproute2/patches/300-selinux-configurable.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -374,7 +374,7 @@ check_libbpf() + check_selinux() + # SELinux is a compile time option in the ss utility + { +- if ${PKG_CONFIG} libselinux --exists; then ++ if [ "${HAVE_SELINUX}" = "y" ] && ${PKG_CONFIG} libselinux --exists; then + echo "HAVE_SELINUX:=y" >>$CONFIG + echo "yes" + diff --git a/libmbim/Makefile b/libmbim/Makefile index 32c8ef493..505ae7bc6 100644 --- a/libmbim/Makefile +++ b/libmbim/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmbim -PKG_VERSION:=1.26.0 +PKG_VERSION:=1.26.2 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/libmbim -PKG_HASH:=1e1f0926b22c77210442129eca689722ecf324ab9c9abf421a5c989f46e813cf +PKG_HASH:=10c77bf5b5eb8c92ba80e9b519923ad9b898362bc8e1928e2bc9a17eeba649af PKG_MAINTAINER:=Nicholas Smith diff --git a/libqmi/Makefile b/libqmi/Makefile index ee5b69749..d3ebdeecd 100644 --- a/libqmi/Makefile +++ b/libqmi/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libqmi -PKG_VERSION:=1.30.2 +PKG_VERSION:=1.30.4 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/libqmi -PKG_HASH:=be01ece0ea2c2194cbea5744bf5aaf06c04ba5fb7ec7887a13116c76d114fedd +PKG_HASH:=00d7da30a4f8d1185f37cba289cfaf1dfcd04a58f2f76d6acfdf5b85312d6ed6 PKG_MAINTAINER:=Nicholas Smith diff --git a/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po b/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po index 8fac07bca..977d4d7e7 100755 --- a/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po +++ b/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -8,7 +8,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:32 msgid "Advanced Settings" @@ -89,7 +89,7 @@ msgstr "Serveur" #: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:73 msgid "Timeout" -msgstr "Temporisation" +msgstr "Hors Délais" #: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:70 msgid "chacha" diff --git a/luci-app-iperf/po/fr/iperf.po b/luci-app-iperf/po/fr/iperf.po index 6057249da..711692095 100755 --- a/luci-app-iperf/po/fr/iperf.po +++ b/luci-app-iperf/po/fr/iperf.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-21 19:20+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -74,7 +74,7 @@ msgstr "Vitesse souhaitée (Mbits/s)" #: luci-app-iperf/luasrc/view/iperf/test.htm:169 msgid "Test" -msgstr "Teste" +msgstr "Essai" #: luci-app-iperf/luasrc/view/iperf/test.htm:100 msgid "This iPerf interface is in bêta. No support for this." diff --git a/luci-app-mlvpn/po/fr/mlvpn.po b/luci-app-mlvpn/po/fr/mlvpn.po index f7ef82ca8..97c7d305e 100755 --- a/luci-app-mlvpn/po/fr/mlvpn.po +++ b/luci-app-mlvpn/po/fr/mlvpn.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -8,7 +8,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:32 msgid "Advanced Settings" @@ -20,7 +20,7 @@ msgstr "Client" #: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:75 msgid "Disable encryption" -msgstr "" +msgstr "Désactiver le chiffrement" #: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:34 msgid "Enabled" diff --git a/luci-app-mptcp/luasrc/controller/mptcp.lua b/luci-app-mptcp/luasrc/controller/mptcp.lua index c81458f80..842adc6ef 100755 --- a/luci-app-mptcp/luasrc/controller/mptcp.lua +++ b/luci-app-mptcp/luasrc/controller/mptcp.lua @@ -209,7 +209,7 @@ end function mptcp_monitor_data() luci.http.prepare_content("text/plain") local fullmesh - fullmesh = io.popen("cat /proc/net/mptcp_net/snmp") + fullmesh = io.popen("multipath -m") if fullmesh:read() ~= nil then while true do local ln = fullmesh:read("*l") @@ -217,16 +217,6 @@ function mptcp_monitor_data() luci.http.write(ln) luci.http.write("\n") end - else - fullmesh = io.popen("nstat -z") - if fullmesh then - while true do - local ln = fullmesh:read("*l") - if not ln then break end - luci.http.write(ln) - luci.http.write("\n") - end - end end return end diff --git a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua index b9e7d0630..d853e8e49 100755 --- a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua +++ b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua @@ -30,7 +30,7 @@ if uname.release:sub(1,4) ~= "5.14" then end o = s:option(ListValue, "mptcp_scheduler", translate("Multipath TCP scheduler")) o:value("default", translate("default")) -if uname.release:sub(1,4) ~= "5.14" then +if uname.release:sub(1,4) ~= "5.15" then o:value("roundrobin", "round-robin") o:value("redundant", "redundant") if uname.release:sub(1,4) ~= "4.14" then @@ -38,18 +38,24 @@ if uname.release:sub(1,4) ~= "5.14" then o:value("ecf", "ECF") end end -if uname.release:sub(1,4) ~= "5.14" then +if uname.release:sub(1,4) ~= "5.15" then o = s:option(Value, "mptcp_syn_retries", translate("Multipath TCP SYN retries")) o.datatype = "uinteger" o.rmempty = false end +if uname.release:sub(1,4) ~= "5.15" then + o = s:option(Value, "mptcp_version", translate("Multipath TCP version")) + o.datatype = "uinteger" + o.rmempty = false + o.default = 0 +end o = s:option(ListValue, "congestion", translate("Congestion Control"),translate("Default is cubic")) local availablecong = sys.exec("sysctl -n net.ipv4.tcp_available_congestion_control | xargs -n1 | sort | xargs") for cong in string.gmatch(availablecong, "[^%s]+") do o:value(cong, translate(cong)) end -if uname.release:sub(1,4) == "5.14" then +if uname.release:sub(1,4) == "5.15" then o = s:option(Value, "mptcp_subflows", translate("specifies the maximum number of additional subflows allowed for each MPTCP connection")) o.datatype = "uinteger" o.rmempty = false diff --git a/luci-app-mptcp/po/fr/mptcp.po b/luci-app-mptcp/po/fr/mptcp.po index 146ec4466..0901267ce 100755 --- a/luci-app-mptcp/po/fr/mptcp.po +++ b/luci-app-mptcp/po/fr/mptcp.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:775 msgid "(%d minute window, %d second interval)" @@ -44,7 +44,7 @@ msgstr "Contrôle de la congestion" #: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69 msgid "Consecutive segments that should be sent for round robin" -msgstr "" +msgstr "Segments consécutifs à envoyer pour round robin" #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:311 #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:314 @@ -77,7 +77,7 @@ msgstr "Connexions établies" #: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63 msgid "Fill the congestion window on all subflows for round robin" -msgstr "" +msgstr "Remplir la fenêtre de congestion de tous les sous-flux pour round robin" #: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46 msgid "Fullmesh subflows for each pair of IP addresses" @@ -215,7 +215,7 @@ msgstr "Paramètres" #: luci-app-mptcp/luasrc/view/mptcp/mptcp_check.htm:65 msgid "Test" -msgstr "" +msgstr "Essai" #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914 msgid "Upload:" diff --git a/luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js b/luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js index 109279953..361d203db 100755 --- a/luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js +++ b/luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js @@ -190,7 +190,7 @@ return L.view.extend({ o = s.option(form.Flag, 'enabled', _('Enabled')); o.default = o.enabled; - o = s.option(form.Value, 'proto', _('Protocol/Service')); + o = s.option(form.ListValue, 'proto', _('Protocol/Service')); o.rmempty = false; o.load = function(section_id) { return Promise.all([ diff --git a/luci-app-omr-bypass/po/fr/omr-bypass.po b/luci-app-omr-bypass/po/fr/omr-bypass.po index 272fe4b31..0e9543bdf 100755 --- a/luci-app-omr-bypass/po/fr/omr-bypass.po +++ b/luci-app-omr-bypass/po/fr/omr-bypass.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:166 #: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:174 @@ -94,7 +94,7 @@ msgstr "Ports de destination" #: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:90 msgid "Ports source" -msgstr "" +msgstr "Ports source" #: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:193 msgid "Protocol/Service" diff --git a/luci-app-omr-bypass/root/etc/init.d/omr-bypass b/luci-app-omr-bypass/root/etc/init.d/omr-bypass index 0aed12deb..31bc3c156 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -14,13 +14,18 @@ _add_proto() { if [ "$(dd if=/proc/net/xt_ndpi/proto bs=4096 2> /dev/null | grep $protoname)" = "" ]; then echo "add_custom $protoname" >/proc/net/xt_ndpi/proto fi + allurls="$(dd if=/proc/net/xt_ndpi/host_proto bs=4096 2> /dev/null)" hosts="$( uci -q get omr-bypass.$protoname.url )" for url in $hosts; do - echo "$protoname:$url" >/proc/net/xt_ndpi/host_proto + if [ "$(echo "$allurls" | grep -i ^${protoname}: | grep $url)" = "" ]; then + echo "$protoname:$url" >/proc/net/xt_ndpi/host_proto + fi done ip="$( uci -q get omr-bypass.$protoname.ip )" for ip in $ips; do - echo "$protoname:$ip" >/proc/net/xt_ndpi/ip_proto + if [ "$(echo "$allurls" | grep -i ^${protoname}: | grep $ip)" = "" ]; then + echo "$protoname:$ip" >/proc/net/xt_ndpi/ip_proto + fi done } @@ -506,6 +511,7 @@ _intf_rule() { intf=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') [ -n "$(echo $intf | grep '@')" ] && intf=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') [ -z "$intf" ] && config_get intf $1 device + [ -n "$(echo $intf | grep '/')" ] && return #count=$((count+1)) config_get count $1 metric local mode diff --git a/luci-app-omr-dscp/po/fr/omr-dscp.po b/luci-app-omr-dscp/po/fr/omr-dscp.po index 8ab04ac95..a7389d8f3 100755 --- a/luci-app-omr-dscp/po/fr/omr-dscp.po +++ b/luci-app-omr-dscp/po/fr/omr-dscp.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-03-31 15:07+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:21 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:73 @@ -36,15 +36,15 @@ msgstr "CS3 - SIP" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:25 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:77 msgid "CS4 - Real-Time Interactive" -msgstr "" +msgstr "CS4 - Temps réel interactif" #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:78 msgid "CS5 - Broadcast Video" -msgstr "" +msgstr "CS5 - Diffusion vidéo" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:26 msgid "CS5 - Broadcast video" -msgstr "" +msgstr "CS5 - Diffusion vidéo" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:27 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:79 @@ -54,7 +54,7 @@ msgstr "CS6 - Routage réseau" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:28 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:80 msgid "CS7 - Latency sensitive" -msgstr "" +msgstr "CS7 - Sensible à la latence" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:20 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:72 @@ -116,7 +116,7 @@ msgstr "EF - Voix" #: luci-app-omr-dscp/root/usr/share/rpcd/acl.d/luci-app-omr-dscp.json:3 msgid "Grant UCI access for luci-app-dscp" -msgstr "" +msgstr "Permettre l'accès pour luci-app-dscp" #: luci-app-omr-dscp/luasrc/controller/omr-dscp.lua:4 #: luci-app-omr-dscp/root/usr/share/luci/menu.d/luci-app-omr-dscp.json:3 diff --git a/luci-app-omr-dscp/root/etc/config/dscp b/luci-app-omr-dscp/root/etc/config/dscp index ef2ef31f2..310ae3e31 100755 --- a/luci-app-omr-dscp/root/etc/config/dscp +++ b/luci-app-omr-dscp/root/etc/config/dscp @@ -256,3 +256,8 @@ config domains option class 'cs1' option comment 'WindowsUpdate' +config domains + option name 'tv.milkywan.fr' + option class 'cs5' + option comment 'MilkyWan TV' + diff --git a/luci-app-omr-quota/po/fr/omr-quota.po b/luci-app-omr-quota/po/fr/omr-quota.po index a7af2a13a..e67782587 100755 --- a/luci-app-omr-quota/po/fr/omr-quota.po +++ b/luci-app-omr-quota/po/fr/omr-quota.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-omr-quota/luasrc/view/omr-quota/cbi-select-add.htm:8 msgid "Add" @@ -23,7 +23,7 @@ msgstr "Activer" #: luci-app-omr-quota/root/usr/share/rpcd/acl.d/luci-app-omr-quota.json:3 msgid "Grant UCI access for luci-app-omr-quota" -msgstr "" +msgstr "Permettre l'accès à luci-app-omr-quota" #: luci-app-omr-quota/luasrc/model/cbi/quota/quota.lua:10 msgid "Interfaces" diff --git a/luci-app-omr-tracker/po/it/omr-tracker.po b/luci-app-omr-tracker/po/it/omr-tracker.po index 4257d56b1..eed54997d 100755 --- a/luci-app-omr-tracker/po/it/omr-tracker.po +++ b/luci-app-omr-tracker/po/it/omr-tracker.po @@ -1,18 +1,18 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-09-21 12:51+0000\n" -"Last-Translator: Weblate Admin \n" +"PO-Revision-Date: 2022-02-11 13:53+0000\n" +"Last-Translator: Riccardo Tornesello \n" "Language-Team: Italian \n" "Language: it\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-omr-tracker/luasrc/view/omr-tracker/cbi-select-add.htm:8 msgid "Add" -msgstr "" +msgstr "Aggiungi" #: luci-app-omr-tracker/luasrc/model/cbi/omr-tracker.lua:117 #: luci-app-omr-tracker/luasrc/model/cbi/omr-tracker.lua:192 diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index f2c85d3e9..e447518f4 100755 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -7,11 +7,17 @@ local sys = require "luci.sys" local ut = require "luci.util" local ifaces = sys.net:devices() + local ifttyu = nixio.fs.glob("/dev/ttyUSB*") + local ifttyc = nixio.fs.glob("/dev/cdc-wdm*") menuentry = uci:get("openmptcprouter","settings","menu") or "openmptcprouter" function device_notvirtual(dev) - for _, iface in ipairs(net:get_networks()) do + if dev:match("^eth.*") or dev:match("^wwan.*") or dev:match("^tun.*") or dev:match("/") then + return true + end + networks = net:get_networks() + for _, iface in ipairs(networks) do local ifacen = iface:name() - local ifacename = uci:get("network",ifacen,"ifname") + local ifacename = uci:get("network",ifacen,"device") local ifacetype = uci:get("network",ifacen,"type") or "" local ifaceproto = uci:get("network",ifacen,"proto") or "" --if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then @@ -428,7 +434,7 @@ <% for _, iface in ipairs(net:get_networks()) do local ifname = iface:name() - local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_lan.network | grep " .. ifname)) + local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_lan.network | tr ' ' '\n' | grep \'^" .. ifname .. "$\'")) if firewall_lan ~= "" then %>

<%=ifname%>

@@ -531,7 +537,7 @@ <% for _, iface in ipairs(net:get_networks()) do local ifname = iface:name() - local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_wan.network | grep " .. ifname)) + local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_wan.network | tr ' ' '\n' | grep \'^" .. ifname .. "$\'")) if firewall_wan ~= "" then -- local multipath = uci:get("network",ifname,"multipath") @@ -743,14 +749,12 @@ <% iffind=0 - iftty = nixio.fs.glob("/dev/cdc-wdm*") - for tty in iftty do + for tty in ifttyc do %> <% diff --git a/luci-app-openmptcprouter/po/de/openmptcprouter.po b/luci-app-openmptcprouter/po/de/openmptcprouter.po index 58d482708..7efcbe36f 100755 --- a/luci-app-openmptcprouter/po/de/openmptcprouter.po +++ b/luci-app-openmptcprouter/po/de/openmptcprouter.po @@ -1,14 +1,14 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-10-21 12:55+0000\n" -"Last-Translator: Anonymous \n" +"PO-Revision-Date: 2022-02-19 10:30+0000\n" +"Last-Translator: Weblate Admin \n" "Language-Team: German \n" "Language: de\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" +"X-Generator: Weblate 4.10.1\n" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:307 msgid "A Dead Simple VPN is a TCP VPN that can replace Glorytun TCP" @@ -23,10 +23,12 @@ msgstr "Schlüssel 'Dead Simple VPN'" msgid "" "A second server's IP can be set for dual IPv4/IPv6 server if WAN IPv6 are set" msgstr "" +"Die zweite IP eines Servers kann für Dual-IPv4/IPv6-Server festgelegt " +"werden, wenn WAN-IPv6 eingerichtet ist" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:111 msgid "API username to retrieve personnalized settings from the server." -msgstr "API Benutzername zum Download der Settings vom Server." +msgstr "API Benutzername zum Download der Einstellungen vom Server." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:809 msgid "APN" @@ -88,7 +90,7 @@ msgstr "Backup der Router-Einstellungen auf den Server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:371 msgid "Balancing" -msgstr "" +msgstr "Ausgleich" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:22 msgid "Beta" @@ -96,11 +98,11 @@ msgstr "Beta" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:310 msgid "Big time difference between the server and the router" -msgstr "" +msgstr "Großer Zeitunterschied zwischen dem Server und dem Router" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:564 msgid "Bridge" -msgstr "" +msgstr "Netzwerkbrücke" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:618 msgid "Bridge can't have multipath enabled" @@ -113,28 +115,27 @@ msgstr "" "übertragen." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:221 -#, fuzzy msgid "" "By default proxy is used for any traffic that is TCP (and UDP for V2Ray)." msgstr "" -"IP-Pakete, die nicht TCP sind, werden standardmäßig mit einem VPN-Protokoll " -"übertragen." +"Standard wird TCP Netzwerk Verkehr über Proxy übertragen (Auch UDP für " +"V2Ray)." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:840 msgid "CHAP" -msgstr "" +msgstr "CHAP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:271 msgid "Can\\'t access and use server part" -msgstr "" +msgstr "Kann Server Teil nicht öffnen und verwenden" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:297 msgid "Can\\'t contact Server Admin Script" -msgstr "" +msgstr "Kann nicht verbinden zum Server Admin Skript" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:287 msgid "Can\\'t get public IP address from ShadowSocks" -msgstr "" +msgstr "Kann keine Public IP Adresse vom ShadowSocks beziehen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:290 msgid "Can\\'t get public IP address from V2Ray" @@ -142,7 +143,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:284 msgid "Can\\'t ping server" -msgstr "" +msgstr "Kann Server nicht pingen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:415 msgid "China" @@ -153,20 +154,22 @@ msgid "" "Choose MacVLAN if you want to create a virtual interface based on a physical " "interface." msgstr "" +"Wähle MacVLAN um ein virtuelles Interface basierend auf ein Physikalisches " +"Interface an zu legen." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:502 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:588 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:647 msgid "Choose physical interface." -msgstr "" +msgstr "Wähle physikalische Schnittstelle." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:135 msgid "Core temp:" -msgstr "" +msgstr "Kerntemperatur:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:410 msgid "Country" -msgstr "" +msgstr "Land" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:407 #, fuzzy @@ -179,22 +182,20 @@ msgid "DHCP" msgstr "DHCP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:600 -#, fuzzy msgid "DHCPv6" -msgstr "DHCP" +msgstr "DHCPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:188 msgid "DNS issue: can\\'t resolve hostname" -msgstr "" +msgstr "DNS Problem: Hostnamen nicht beziehbar" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:355 msgid "Debug" -msgstr "" +msgstr "Debug" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:223 -#, fuzzy msgid "Default Proxy" -msgstr "Standard VPN" +msgstr "Standard Proxy" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:337 msgid "Default VPN" @@ -209,7 +210,7 @@ msgstr "Löschen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:768 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:789 msgid "Device" -msgstr "" +msgstr "Gerät" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:253 #, fuzzy @@ -232,13 +233,12 @@ msgstr "" "Abschalten von TCP-Fast-Open für Linux und die ShadowsSocks-Einstellungen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:295 -#, fuzzy msgid "Disable default gateway" -msgstr "Gateway-Ping aus" +msgstr "Default Gateway aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:300 msgid "Disable default gateway, no internet if VPS are down" -msgstr "" +msgstr "Default Gateway aus, kein Internet wenn VPS down ist" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:193 msgid "Disable external check" @@ -254,13 +254,12 @@ msgid "Disable gateway ping check in status page" msgstr "Gateway-Ping Statusüberprüfung aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:279 -#, fuzzy msgid "Disable interfaces auto rename" -msgstr "Externe Prüfung aus" +msgstr "Automatische Umbenennung von Interfaces deaktivieren" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:330 msgid "Disable multipath test using tracebox" -msgstr "" +msgstr "Deaktiviere multipath Test mittels Tracebox" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:335 #, fuzzy @@ -277,9 +276,8 @@ msgid "" msgstr "Portweiterleitungen in der Server-Firewall zu diesem Router abschalten" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:284 -#, fuzzy msgid "Disable renaming interfaces" -msgstr "Bezeichnung der Schnittstelle" +msgstr "Umbenennung der Schnittstelle deaktivieren" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:315 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:320 @@ -288,14 +286,12 @@ msgid "Disable route loop detection" msgstr "Server-Ping aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:144 -#, fuzzy msgid "Disable server" -msgstr "Server-Ping aus" +msgstr "Server deaktivieren" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:248 -#, fuzzy msgid "Disable server http test" -msgstr "Server-Ping aus" +msgstr "Server-http-Test aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:305 msgid "Disable server ping" @@ -306,15 +302,14 @@ msgid "Disable server ping status check" msgstr "Server-Ping Status-Prüfung aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:325 -#, fuzzy msgid "Disable tracebox test" -msgstr "Externe Prüfung aus" +msgstr "Deaktiviere tracebox Test" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:189 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:871 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:887 msgid "Disabled" -msgstr "" +msgstr "inaktiv" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:933 msgid "Download speed (Kb/s)" @@ -351,13 +346,12 @@ msgid "Enable ShadowSocks Obfuscating" msgstr "Shadowsocks-Verschleierung aktiv" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:213 -#, fuzzy msgid "Enable TCP Low Latency" -msgstr "TCP-Fast-Open aus" +msgstr "Aktiviere TCP Low Latency" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:360 msgid "Enable debug logs" -msgstr "" +msgstr "Aktiviere debug Logs" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:190 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:870 @@ -370,31 +364,30 @@ msgid "Encryption" msgstr "Verschlüsselung" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:280 -#, fuzzy msgid "Encryption method is used for Shadowsocks, V2Ray, Glorytun and OpenVPN." -msgstr "Verschlüsselungverfahren wird ebenfalls für Glorytun genutzt." +msgstr "" +"Verschlüsselungverfahren wird verwendet für Shadowsocks, V2Ray, Glorytun " +"and OpenVPN." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:176 msgid "Filesystem is readonly" -msgstr "" +msgstr "Filesystem ist nur lesen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:419 msgid "For China, set an accessible DNS and disable DNSSEC." msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:178 -#, fuzzy msgid "Force retrieve all keys from server." -msgstr "API Benutzername zum Download der Settings vom Server." +msgstr "Erzwingen alle Schlüssel vom Server runter zu laden." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:173 -#, fuzzy msgid "Force retrieve settings" -msgstr "Server-Einstellungen" +msgstr "Erzwingen Einstellungen runter zu laden." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:829 msgid "GPRS only" -msgstr "" +msgstr "Nur GPRS" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:561 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:764 @@ -472,15 +465,13 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:683 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:710 -#, fuzzy msgid "IPv6 address" -msgstr "IPv4-Adresse" +msgstr "IPv6-Adresse" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:697 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:720 -#, fuzzy msgid "IPv6 gateway" -msgstr "IPv4-Standardgateway" +msgstr "IPv6-Standardgateway" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:632 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:804 @@ -488,9 +479,8 @@ msgid "IPv6 route received" msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:184 -#, fuzzy msgid "IPv6 settings" -msgstr "VPN-Einstellungen" +msgstr "IPv6-Einstellungen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:209 msgid "IPv6 tunnel DOWN" @@ -637,7 +627,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:867 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:883 msgid "Multipath TCP" -msgstr "" +msgstr "Multipath-TCP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:601 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:607 @@ -790,7 +780,7 @@ msgstr "Nur eine Verbindung kann als 'primär' definiert werden." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:391 msgid "Only work with Shadowsocks as proxy." -msgstr "" +msgstr "Funktioniert nur mit Shadowsocks als Proxy." #: luci-app-openmptcprouter/root/usr/share/luci/menu.d/luci-app-openmptcprouter.json:3 msgid "OpenMPTCProuter" @@ -802,7 +792,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:218 msgid "Optimize for latency instead of bandwidth" -msgstr "" +msgstr "Für niedrige Latenz anstatt für Bandbreite optimieren" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:455 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:605 @@ -849,11 +839,11 @@ msgstr "Interface hinzufügen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:825 msgid "Prefer LTE" -msgstr "" +msgstr "Bevorzuge LTE" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:826 msgid "Prefer UMTS" -msgstr "" +msgstr "Bevorzuge UMTS" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:94 #, fuzzy @@ -921,9 +911,8 @@ msgid "Scaling governor" msgstr "Methode der CPU-Taktung" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:95 -#, fuzzy msgid "Secondary server IP" -msgstr "Server IPv4" +msgstr "zweite Server IP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:992 msgid "Select the device you want to base the interface on." @@ -963,9 +952,8 @@ msgid "Server username" msgstr "Server-Benutzername" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:821 -#, fuzzy msgid "Service Type" -msgstr "Server-Schlüssel" +msgstr "Dienst Typ" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:401 msgid "Set VPN to use for MPTCP over VPN." @@ -1106,7 +1094,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:559 msgid "Type" -msgstr "" +msgstr "Typ" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:331 msgid "UBOND can replace Glorytun with connections with same latency" @@ -1176,9 +1164,8 @@ msgid "VLAN" msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:184 -#, fuzzy msgid "VPN is not running" -msgstr "VPN-Einstellungen" +msgstr "VPN läuft nicht" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:286 msgid "VPN settings" @@ -1313,7 +1300,7 @@ msgstr "Statische Adresse" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:516 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:749 msgid "latency:" -msgstr "" +msgstr "Latenz:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:520 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:753 @@ -1352,14 +1339,12 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:496 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:741 -#, fuzzy msgid "wan address:" -msgstr "Statische Adresse" +msgstr "öffentliche IP Adresse:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:500 -#, fuzzy msgid "wan ipv6 address:" -msgstr "Statische Adresse" +msgstr "öffentliche ipv6 Adresse:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:508 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:512 diff --git a/luci-app-openmptcprouter/po/fr/openmptcprouter.po b/luci-app-openmptcprouter/po/fr/openmptcprouter.po index 001127345..5f1b0670d 100755 --- a/luci-app-openmptcprouter/po/fr/openmptcprouter.po +++ b/luci-app-openmptcprouter/po/fr/openmptcprouter.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-06-01 06:35+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -87,7 +87,7 @@ msgstr "Type d'authentification" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:873 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:889 msgid "Backup" -msgstr "Sauvegarder" +msgstr "Remplaçant" #: luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua:21 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm:10 @@ -112,7 +112,7 @@ msgstr "Passerelle" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:618 msgid "Bridge can't have multipath enabled" -msgstr "Un pont ne peut avoir multipath d'activer" +msgstr "Les passerelles ne peuvent pas utiliser le protocole multipath" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:287 msgid "By default VPN is used for any traffic that is not TCP." diff --git a/luci-app-openmptcprouter/po/it/openmptcprouter.po b/luci-app-openmptcprouter/po/it/openmptcprouter.po index 1d7926872..6d4ddf076 100755 --- a/luci-app-openmptcprouter/po/it/openmptcprouter.po +++ b/luci-app-openmptcprouter/po/it/openmptcprouter.po @@ -1,14 +1,14 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-12-01 17:19+0000\n" -"Last-Translator: Giuseppe Dipierro \n" +"PO-Revision-Date: 2022-02-19 10:30+0000\n" +"Last-Translator: Weblate Admin \n" "Language-Team: Italian \n" "Language: it\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" +"X-Generator: Weblate 4.10.1\n" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:307 msgid "A Dead Simple VPN is a TCP VPN that can replace Glorytun TCP" @@ -23,6 +23,8 @@ msgstr "Chiave Dead Simple VPN" msgid "" "A second server's IP can be set for dual IPv4/IPv6 server if WAN IPv6 are set" msgstr "" +"Può essere impostato un secondo IP per il doppio server IPv4/IPv6 se è stato " +"impostato il server WAN IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:111 msgid "API username to retrieve personnalized settings from the server." @@ -106,7 +108,7 @@ msgstr "Ponte" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:618 msgid "Bridge can't have multipath enabled" -msgstr "" +msgstr "Il Bridge non può avere il multipath abilitato" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:287 msgid "By default VPN is used for any traffic that is not TCP." @@ -138,9 +140,8 @@ msgid "Can\\'t get public IP address from ShadowSocks" msgstr "Impossibile ottenere un indirizzo IP pubblico da ShadowSocks" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:290 -#, fuzzy msgid "Can\\'t get public IP address from V2Ray" -msgstr "Impossibile ottenere un indirizzo IP pubblico da ShadowSocks" +msgstr "Impossibile ottenere un indirizzo IP pubblico da V2Ray" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:284 msgid "Can\\'t ping server" @@ -148,7 +149,7 @@ msgstr "Impossibile eseguire il ping del server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:415 msgid "China" -msgstr "" +msgstr "Cina" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:568 msgid "" @@ -170,12 +171,11 @@ msgstr "Temp. Nucleo:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:410 msgid "Country" -msgstr "" +msgstr "Nazione" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:407 -#, fuzzy msgid "Country settings" -msgstr "Impostazioni del router" +msgstr "Impostazioni nazionali del router" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:454 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:599 @@ -183,9 +183,8 @@ msgid "DHCP" msgstr "DHCP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:600 -#, fuzzy msgid "DHCPv6" -msgstr "DHCP" +msgstr "DHCPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:188 msgid "DNS issue: can\\'t resolve hostname" @@ -215,15 +214,13 @@ msgid "Device" msgstr "Dispositivo" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:253 -#, fuzzy msgid "Disable HTTP test on Server API in status page" -msgstr "Disabilitare il controllo dello stato del ping del server" +msgstr "Disabilitare il test HTTP sulle API Server nella pagina di stato" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:345 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:350 -#, fuzzy msgid "Disable ModemManager" -msgstr "ModemManager" +msgstr "Disabilita ModemManager" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:203 msgid "Disable TCP Fast Open" @@ -251,24 +248,20 @@ msgid "Disable gateway ping" msgstr "Disabilita il ping del gateway" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:243 -#, fuzzy msgid "Disable gateway ping check in status page" -msgstr "Disabilitare il controllo dello stato del ping del gateway" +msgstr "Disabilita il controllo del ping del gateway nella pagina di stato" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:279 -#, fuzzy msgid "Disable interfaces auto rename" -msgstr "Disabilita il test Tracebox" +msgstr "Disabilita auto rinomina interfacce" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:330 msgid "Disable multipath test using tracebox" msgstr "Disabilita il test multipath usando tracebox" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:335 -#, fuzzy -#| msgid "Disabled" msgid "Disable nDPI" -msgstr "Disabilitato" +msgstr "Disabilita nDPI" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:340 msgid "Disable nDPI, used for protocols in OMR-ByPass" @@ -282,9 +275,8 @@ msgstr "" "a questo router" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:284 -#, fuzzy msgid "Disable renaming interfaces" -msgstr "Etichetta per l'interfaccia" +msgstr "Disabilita rinomina interfaccia" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:315 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:320 @@ -297,9 +289,8 @@ msgid "Disable server" msgstr "Disabilita il server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:248 -#, fuzzy msgid "Disable server http test" -msgstr "Disabilita il ping del server" +msgstr "Disabilita http test server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:305 msgid "Disable server ping" @@ -329,12 +320,11 @@ msgstr "Cambiamento dinamico" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:390 msgid "Enable Bridge Acceleration" -msgstr "" +msgstr "Abilita Accelerazione modalità Bridge" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:209 -#, fuzzy msgid "Enable DNS64" -msgstr "Abilita MQ" +msgstr "Abilita DNS64" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:384 msgid "Enable Fast Patch offloading for connections" @@ -383,7 +373,7 @@ msgstr "Il filesystem è di sola lettura" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:419 msgid "For China, set an accessible DNS and disable DNSSEC." -msgstr "" +msgstr "Per la Cina, imposta un DNS accessibile e disabilita DNSSEC." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:178 msgid "Force retrieve all keys from server." @@ -403,9 +393,8 @@ msgid "Gateway DOWN" msgstr "Tipi di pagamento" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:564 -#, fuzzy msgid "Gateway IPv6 DOWN" -msgstr "Tipi di pagamento" +msgstr "Gateway IPv6 SPENTO" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:295 msgid "Glorytun TCP is used by default for UDP and ICMP" @@ -475,15 +464,13 @@ msgstr "Prefisso IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:683 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:710 -#, fuzzy msgid "IPv6 address" -msgstr "Indirizzi IPv4" +msgstr "Indirizzi IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:697 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:720 -#, fuzzy msgid "IPv6 gateway" -msgstr "Gateway IPv4" +msgstr "Gateway IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:632 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:804 @@ -504,7 +491,7 @@ msgstr "IPv6:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:214 msgid "If host support NAT64, you can enable DNS64 support." -msgstr "" +msgstr "Se l'host supporta NAT64, puoi abilitare il supporto DNS64." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:529 msgid "Interfaces settings" @@ -588,15 +575,16 @@ msgid "MPTCP over VPN" msgstr "MPTCP su VPN" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:390 -#, fuzzy msgid "MPTCP over VPN settings" -msgstr "MPTCP su VPN" +msgstr "Impostazioni MPTCP su VPN" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:391 msgid "" "MPTCP over VPN should be used only when Multipath TCP is blocked on a " "connection." msgstr "" +"MPTCP su VPN deve essere usato solo quando il Multipath TCP è bloccatp su " +"una connessione." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:563 msgid "MacVLAN" @@ -650,7 +638,7 @@ msgstr "Lo stato corrente di Multipath è" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:596 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:782 msgid "Multipath master already defined" -msgstr "Multipath master già definito" +msgstr "Multipath principale già definito" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:567 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:767 @@ -666,9 +654,8 @@ msgid "NONE" msgstr "NESSUNO" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:623 -#, fuzzy msgid "Network interface MAC address duplicated" -msgstr "Interfaccia di rete duplicata" +msgstr "Interfaccia di rete con MAC address duplicata" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:613 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:799 @@ -676,9 +663,8 @@ msgid "Network interface duplicated" msgstr "Interfaccia di rete duplicata" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:579 -#, fuzzy msgid "Network interface not in WAN firewall zone" -msgstr "Interfaccia di rete duplicata" +msgstr "Interfaccia di rete non in WAN firewall zone" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:899 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:901 @@ -699,18 +685,17 @@ msgid "No IPv6 access" msgstr "Nessun accesso IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:575 -#, fuzzy msgid "No Server http response after 1 second" -msgstr "Nessuna risposta al ping del server dopo 1 secondo" +msgstr "Nessuna risposta dal server HTTP dopo 1 secondo" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:571 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:771 msgid "No Server ping response after 1 second" -msgstr "Nessuna risposta al ping del server dopo 1 secondo" +msgstr "Nessuna risposta al ping dal server dopo 1 secondo" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:656 msgid "No WAN with multipath enabled:" -msgstr "" +msgstr "Nessuna WAN con multipath abilitata:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm:26 msgid "No available backup on server." @@ -735,14 +720,12 @@ msgid "No output" msgstr "Nessun output" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:293 -#, fuzzy msgid "No public IP address detected in less than 1 second" -msgstr "Nessun indirizzo IP WAN rilevato in meno di 1 secondo" +msgstr "Nessun indirizzo IP pubblico rilevato in meno di 1 secondo" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:267 -#, fuzzy msgid "No server IP address, No public IP address" -msgstr "Nessun indirizzo IP del server, nessun indirizzo IP WAN" +msgstr "Nessun indirizzo IP del server, nessun indirizzo IP pubblico" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:280 msgid "No server defined" @@ -783,13 +766,15 @@ msgstr "Al cambio della procedura guidata" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:233 msgid "Only ShadowSocks is supported with server multiple IPs for now." -msgstr "" +msgstr "Solo ShadowSocks è supportato con server multi IP per adesso." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:877 msgid "" "Only one interface must be set as \"Master\", this should be the most stable " "interface." msgstr "" +"Solo un' interfaccia può essere impostata come \"Master\", deve essere " +"impostata l'interfaccia più stabile." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:135 msgid "Only one server can be master, else all servers are set as backup." @@ -799,7 +784,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:391 msgid "Only work with Shadowsocks as proxy." -msgstr "" +msgstr "Funziona solo con Shadowsocks come proxy." #: luci-app-openmptcprouter/root/usr/share/luci/menu.d/luci-app-openmptcprouter.json:3 msgid "OpenMPTCProuter" @@ -861,9 +846,8 @@ msgid "Prefer UMTS" msgstr "Preferisci UMTS" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:94 -#, fuzzy msgid "Primary server IP" -msgstr "Indirizzo IP del server" +msgstr "IP principale del server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:449 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:594 @@ -896,7 +880,7 @@ msgstr "Reindirizza tutte le porte dal server a questo router" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:999 msgid "Reset" -msgstr "" +msgstr "Resetta" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm:32 msgid "Restore backup" @@ -924,9 +908,8 @@ msgid "Scaling governor" msgstr "Governatore in scala" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:95 -#, fuzzy msgid "Secondary server IP" -msgstr "Indirizzo IP del server" +msgstr "IP secondario del server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:992 msgid "Select the device you want to base the interface on." @@ -968,7 +951,7 @@ msgstr "Tipo di servizio" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:401 msgid "Set VPN to use for MPTCP over VPN." -msgstr "" +msgstr "Seleziona la VPN da utilizzare per MPTCP su VPN." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:658 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:688 @@ -1225,7 +1208,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:65 msgid "Wizard" -msgstr "Wizard" +msgstr "Procedura guidata" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:414 msgid "World" diff --git a/luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po b/luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po index e8827e0ff..7bcec9785 100755 --- a/luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po +++ b/luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-06-02 09:51+0000\n" +"PO-Revision-Date: 2022-01-11 10:52+0000\n" "Last-Translator: antrouter \n" "Language-Team: Chinese (Simplified) \n" @@ -113,7 +113,7 @@ msgstr "默认情况下,VPN用于非TCP的任何流量." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:221 msgid "" "By default proxy is used for any traffic that is TCP (and UDP for V2Ray)." -msgstr "默认情况下,代理用于任何TCP(对于V2Ray是UDP)流量。" +msgstr "默认情况下,仅代理TCP(如果选用V2Ray则代理TCP跟UDP还有ICMP任何)流量。" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:840 msgid "CHAP" @@ -946,9 +946,7 @@ msgstr "将服务器设置为主服务器" msgid "" "Set the default Proxy used for TCP when ShadowSocks is enabled, for TCP and " "UDP when V2Ray is enabled." -msgstr "" -"设置启用ShadowSocks时用于TCP的默认代理,启用V2Ray时设置用于TCP和UDP的默认代" -"理." +msgstr "启用ShadowSocks时用于默认代理TC流量,启用V2Ray时用于默认代理TCP和UDP还有ICMP任何流量." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:384 msgid "" @@ -1098,7 +1096,7 @@ msgstr "V2Ray没有运行" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:254 msgid "V2Ray is used for TCP and UDP." -msgstr "V2Ray用于TCP和UDP传输." +msgstr "V2Ray用于TCP和UDP代理." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:251 msgid "V2Ray user" diff --git a/luci-app-openmptcprouter/root/bin/anonymous_config.sh b/luci-app-openmptcprouter/root/bin/anonymous_config.sh index 674d01726..65c0813a2 100755 --- a/luci-app-openmptcprouter/root/bin/anonymous_config.sh +++ b/luci-app-openmptcprouter/root/bin/anonymous_config.sh @@ -21,5 +21,6 @@ uci show | \ -e "/vpn\.key=/s/......$/xxxxxx'/" \ -e "/vps\.key=/s/......$/xxxxxx'/" \ -e "/wgkey=/s/......$/xxxxxx'/" \ + -e "/key=/s/......$/xxxxxx'/" \ -e "/ula_prefix=2/s/=.........../='xxxxxxxxxxx/" \ -e "/token=/s/............$/xxxxxx'/" \ No newline at end of file diff --git a/luci-app-openmptcprouter/root/bin/omr-modemmanager b/luci-app-openmptcprouter/root/bin/omr-modemmanager index b7dc840ba..57115c2e0 100755 --- a/luci-app-openmptcprouter/root/bin/omr-modemmanager +++ b/luci-app-openmptcprouter/root/bin/omr-modemmanager @@ -10,7 +10,7 @@ timeout 1 mmcli -L | while read MODEM; do OPERATOR=$(echo "$MODEM_INFO" | grep 'modem.3gpp.operator-name ' | awk -F": " '{print $2}') NUMBER=$(echo "$MODEM_INFO" | grep 'modem.generic.own-numbders.value[1]' | awk -F": " '{print $2}') STATE=$(echo "$MODEM_INFO" | grep 'modem.generic.state ' | awk -F": " '{print $2}') - TYPE=$(echo "$MODEM_INFO" | grep 'modem.generic.access-technologies.values[1]' | awk -F": " '{print $2}') + TYPE=$(echo "$MODEM_INFO" | grep 'modem.generic.access-technologies.value\[1\]' | awk -F": " '{print $2}') [ -z "$INFO" ] && echo $PERCENT [ "$INFO" = "all" ] && echo "$PERCENT;$OPERATOR;$NUMBER;$STATE;$TYPE" exit diff --git a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter index 79dbead91..928feb60f 100755 --- a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter +++ b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter @@ -39,7 +39,7 @@ omr_intf_set() { uci -q set network.$1.modalias="$(cat /sys/class/net/${ifname}/device/uevent | grep MODALIAS | cut -d '=' -f2 | tr -d '\n')-$mac" uci -q set network.$1.product="$(cat /sys/class/net/${ifname}/device/uevent | grep PRODUCT | cut -d '=' -f2 | tr -d '\n')" elif [ -n "$devicepath" ] && ([ "$(echo ${devicepath} | grep virtual)" != "" ] || [ "$(echo ${devicepath} | grep virtual)" = "" ] && [ "$(cat /sys/class/net/${ifname}/device/uevent | grep PRODUCT)" = "" ] || [ "$(cat /sys/class/net/${ifname}/device/uevent | grep PCI_SLOT_NAME)" != "" ] || [ "$(cat /sys/class/net/${ifname}tmp/device/uevent)" != "" ]); then - uci -q delete network.$1.device + #uci -q delete network.$1.device uci -q delete network.$1.modalias uci -q delete network.$1.product fi @@ -84,7 +84,8 @@ omr_set_settings() { [ -z "$addlatency" ] && addlatency=0 devicename=$(echo "$device" | cut -d'/' -f3) - [ -z "$ifname" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + [ -z "$ifname" ] && config_get ifname "$1" ifname [ -n "$(echo $ifname | grep '@')" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') if [ -n "$ifname" ]; then diff --git a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter index e42883f1a..f8ac6eca0 100755 --- a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter +++ b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter @@ -931,6 +931,11 @@ function interfaces_status() else mArray.openmptcprouter["vps_admin"] = false mArray.openmptcprouter["vps_admin_error_msg"] = "No result" + uci:set("openmptcprouter",s[".name"],"admin_error","1") + mArray.openmptcprouter["vps_admin_error"] = true + uci:delete("openmptcprouter",s[".name"],"token") + uci:save("openmptcprouter",s[".name"]) + uci:commit("openmptcprouter",s[".name"]) end else mArray.openmptcprouter["vps_admin"] = false @@ -1022,7 +1027,7 @@ function interfaces_status() mArray.openmptcprouter["multi_vpn"] = true end end - + -- check Shadowsocks is running mArray.openmptcprouter["shadowsocks_service"] = false if string.find(sys.exec("/usr/bin/pgrep ss-redir"), "%d+") then @@ -1030,10 +1035,16 @@ function interfaces_status() end mArray.openmptcprouter["shadowsocks_enabled"] = true - local ss_server = uci:get("shadowsocks-libev","sss0","disabled") or "0" + local ss_server = "1" + ucic:foreach("shadowsocks-libev", "server", function(s) + if uci:get("shadowsocks-libev",s[".name"],"disabled") == "0" then + ss_server = "0" + end + end) if ss_server == "1" then mArray.openmptcprouter["shadowsocks_enabled"] = false end + -- check V2Ray is running mArray.openmptcprouter["v2ray_service"] = false if string.find(sys.exec("/usr/bin/pgrep v2ray"), "%d+") then @@ -1149,7 +1160,7 @@ function interfaces_status() --end duplicateif = false - if ifname ~= "" and ifname ~= nil and not (section["device"] ~= nil and section["device"]:match("^@.*")) then + if ifname ~= "" and ifname ~= nil and not (section["device"] ~= nil and section["device"]:match("^@.*")) and (proto == "static" or proto == "dhcp") then if allintf[ifname] then connectivity = "ERROR" duplicateif = true diff --git a/luci-app-snmpd/po/fr/snmpd.po b/luci-app-snmpd/po/fr/snmpd.po index 976057fbf..7efb48a42 100755 --- a/luci-app-snmpd/po/fr/snmpd.po +++ b/luci-app-snmpd/po/fr/snmpd.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2021-05-21 19:20+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -57,7 +57,7 @@ msgstr "" #: luci-app-snmpd/luasrc/view/snmpd.htm:21 #: luci-app-snmpd/luasrc/view/snmpd.htm:48 msgid "General" -msgstr "" +msgstr "Général" #: luci-app-snmpd/root/usr/share/rpcd/acl.d/luci-app-snmpd.json:3 msgid "Grant UCI access for luci-app-snmpd" @@ -80,11 +80,11 @@ msgstr "Interface" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:101 msgid "Level" -msgstr "" +msgstr "Niveau" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:22 msgid "Location" -msgstr "" +msgstr "Localisation" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:24 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:137 @@ -97,11 +97,11 @@ msgstr "Réseaux" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:116 msgid "Notify" -msgstr "" +msgstr "Notifier" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:136 msgid "ObjectID" -msgstr "" +msgstr "ObjectID" #: luci-app-snmpd/luasrc/view/snmpd.htm:55 #: luci-app-snmpd/luasrc/view/snmpd.htm:90 @@ -110,7 +110,7 @@ msgstr "Interface de sortie" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:138 msgid "Program" -msgstr "" +msgstr "Programme" #: luci-app-snmpd/luasrc/view/snmpd.htm:85 #: luci-app-snmpd/luasrc/view/snmpd.htm:89 @@ -119,28 +119,28 @@ msgstr "Protocoles" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:106 msgid "Read" -msgstr "" +msgstr "Lecture" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:34 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:69 msgid "Read-only" -msgstr "" +msgstr "Lecture Seule" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:35 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:70 msgid "Read-write" -msgstr "" +msgstr "Lecture-écriture" #: luci-app-snmpd/luasrc/controller/snmpd.lua:6 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:4 #: luci-app-snmpd/luasrc/view/snmpd.htm:19 #: luci-app-snmpd/root/usr/share/luci/menu.d/luci-app-snmpd.json:3 msgid "SNMPd" -msgstr "" +msgstr "SNMPd" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:4 msgid "SNMPd settings interface (Beta)" -msgstr "" +msgstr "Paramètres du protocole SNMPd (Beta)" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:32 msgid "Server" @@ -148,7 +148,7 @@ msgstr "Serveur" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:37 msgid "Source" -msgstr "" +msgstr "Source" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:19 msgid "System" @@ -156,23 +156,23 @@ msgstr "Système" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:111 msgid "Write" -msgstr "" +msgstr "Ecriture" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:92 msgid "any" -msgstr "" +msgstr "Tout" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:104 msgid "auth" -msgstr "" +msgstr "Authentification" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:29 msgid "com2sec security" -msgstr "" +msgstr "com2sec security" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:103 msgid "noauth" -msgstr "" +msgstr "pas d'authentification" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:67 msgid "secname" @@ -181,4 +181,4 @@ msgstr "" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:76 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:90 msgid "version" -msgstr "" +msgstr "version" diff --git a/luci-app-sysupgrade/root/etc/init.d/sysupgrade b/luci-app-sysupgrade/root/etc/init.d/sysupgrade index 377c67944..9ffc3c537 100755 --- a/luci-app-sysupgrade/root/etc/init.d/sysupgrade +++ b/luci-app-sysupgrade/root/etc/init.d/sysupgrade @@ -11,7 +11,7 @@ start_service() { if [ -f /etc/backup/installed_packages.txt ]; then - if [ "$(opkg -V0 update)" = "" ]; then + if [ "$(opkg -V0 update 2>&1)" = "" ]; then grep "\toverlay" /etc/backup/installed_packages.txt | cut -f1 | xargs -r opkg -V0 install rm /etc/backup/installed_packages.txt fi diff --git a/luci-mod-dashboard/po/fr/dashboard.po b/luci-mod-dashboard/po/fr/dashboard.po index cdf32c682..ee91c668b 100755 --- a/luci-mod-dashboard/po/fr/dashboard.po +++ b/luci-mod-dashboard/po/fr/dashboard.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2021-05-31 18:51+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -47,11 +47,11 @@ msgstr "Tableau de bord" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/20_lan.js:136 msgid "Devices" -msgstr "Appareils" +msgstr "Périphériques" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:195 msgid "Devices Connected" -msgstr "Appareils connectés" +msgstr "Périphériques connectés" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:86 msgid "Down." @@ -71,7 +71,7 @@ msgstr "Version du micrologiciel" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:173 msgid "GHz" -msgstr "Ghz" +msgstr "GHz" #: luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json:25 msgid "Grant access to DHCP status display" @@ -83,7 +83,7 @@ msgstr "Permettre l'accès à l'affichage de l'état principal" #: luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json:3 msgid "Grant access to the system route status" -msgstr "Permettre l'acces au Status du Routage" +msgstr "Permettre l’accès au status de routage" #: luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json:34 msgid "Grant access to wireless status display" @@ -220,4 +220,4 @@ msgstr "non" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/10_router.js:101 #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:65 msgid "yes" -msgstr "Oui" +msgstr "oui" diff --git a/macvlan/files/etc/init.d/macvlan b/macvlan/files/etc/init.d/macvlan index a09988504..6669a9ff2 100755 --- a/macvlan/files/etc/init.d/macvlan +++ b/macvlan/files/etc/init.d/macvlan @@ -13,6 +13,7 @@ _save_macaddr() { local _macaddr uci -q get "network.$1_dev.ifname" >/dev/null && { _ifname=$(uci -q get "network.$1.ifname") + [ -z "$_ifname" ] && _ifname=$(uci -q get "network.$1.device") if [ -n "$(uci -q get network.$1.macaddr)" ] && [ "$(uci -q get network.$1.macaddr)" != "$(uci -q get network.$1_dev.macaddr)" ]; then uci -q set network.$1_dev.macaddr="$(uci -q get network.$1.macaddr)" else @@ -25,6 +26,7 @@ _save_macaddr() { } [ -z "$(uci -q get network.$1.macaddr)" ] && { _ifname=$(uci -q get "network.$1.ifname") + [ -z "$_ifname" ] && _ifname=$(uci -q get "network.$1.device") [ -n "$_ifname" ] && [ -z "$(echo $_ifname | grep '\.')" ] && { _macaddr=$(ip link show dev $_ifname 2>/dev/null | grep link | awk '{print $2}') [ -n "$_macaddr" ] && { @@ -42,8 +44,6 @@ _delete_device() { uci -q batch <<-EOF delete network.$1 commit network - delete macvlan.$1 - commit macvlan EOF } return @@ -67,7 +67,7 @@ _setup_interface() { [ -z "$(uci -q get network.$1.masterintf)" ] && uci -q set network.$1.masterintf=$(uci -q get network.$1_dev.ifname) [ -n "$(uci -q get network.$1.masterintf)" ] && uci -q set network.$1_dev.ifname=$(uci -q get network.$1.masterintf) [ -n "$(uci -q get network.$1.macaddr)" ] && uci -q set network.$1_dev.macaddr=$(uci -q get network.$1.macaddr) - uci set network.$1.ifname=$1 + uci set network.$1.device=$1 uci -q commit network return 0 } @@ -75,9 +75,11 @@ _setup_interface() { uci -q batch <<-EOF set network.$1_dev=device set network.$1_dev.name=$1 - set network.$1_dev.type=macvlan + set network.$1_dev.type='macvlan' set network.$1_dev.ifname=$_ifname - set network.$1.ifname=$1 + set network.$1_dev.mode='private' + set network.$1_dev.multicast=0 + set network.$1.device=$1 set network.$1.masterintf=$_ifname set network.$1.type=macvlan set network.$1.defaultroute=0 @@ -86,7 +88,7 @@ _setup_interface() { #_macaddr=$(uci -q get "network.$1.macaddr") #_setup_macaddr "$1" "${_macaddr:-auto$(date +%s)}" - _setup_macaddr "$1" "auto$(date +%s)" + _setup_macaddr "$1" "$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')" uci -q set network.$1_dev.mtu=$(uci -q get network.$1.mtu) uci -q commit network } diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 570bc9293..3eb780398 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager -PKG_VERSION:=1.18.2 +PKG_VERSION:=1.18.6 PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager -PKG_HASH:=374be158ae1c1fb38a29eef1cc3cdf89ff3536b48ff1320d208ab204ea6c5f8a +PKG_HASH:=d4f804b31cf504239c5f1d4973c62095c00cba1ee9abb503718dac6d146a470a PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) PKG_MAINTAINER:=Nicholas Smith diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index e9c128343..9eb53107a 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -10,7 +10,7 @@ USE_PROCD=1 . /lib/functions/network.sh global_multipath_settings() { - local multipath mptcp_path_manager mptcp_schdeduler mptcp_debug congestion mptcp_checksum mptcp_syn_retries mptcp_fullmesh_num_subflows mptcp_fullmesh_create_on_err mptcp_ndiffports_num_subflows mptcp_rr_cwnd_limited mptcp_rr_num_segments + local multipath mptcp_path_manager mptcp_scheduler mptcp_subflows mptcp_debug mptcp_add_addr_accepted congestion mptcp_checksum mptcp_syn_retries mptcp_fullmesh_num_subflows mptcp_fullmesh_create_on_err mptcp_ndiffports_num_subflows mptcp_rr_cwnd_limited mptcp_rr_num_segments local multipath_status=0 config_load network config_get multipath globals multipath @@ -28,6 +28,7 @@ global_multipath_settings() { config_get mptcp_ndiffports_num_subflows globals mptcp_ndiffports_num_subflows config_get mptcp_rr_cwnd_limited globals mptcp_rr_cwnd_limited config_get mptcp_rr_num_segments globals mptcp_rr_num_segments + config_get mptcp_version globals mptcp_version "0" [ "$multipath" = "enable" ] && multipath_status=1 @@ -44,7 +45,8 @@ global_multipath_settings() { [ -z "$mptcp_ndiffports_num_subflows" ] || sysctl -qew /sys/module/mptcp_ndiffports/parameters/num_subflows="$mptcp_ndiffports_num_subflows" [ -z "$mptcp_rr_cwnd_limited" ] || sysctl -qew /sys/module/mptcp_rr/parameters/cwnd_limited="$mptcp_rr_cwnd_limited" [ -z "$mptcp_rr_num_segments" ] || sysctl -qew /sys/module/mptcp_rr/parameters/num_segments="$mptcp_rr_num_segments" - else + [ -z "$mptcp_version" ] || sysctl -qew net.mptcp.mptcp_version="$mptcp_version" + elif [ -f /proc/sys/net/mptcp/enabled ]; then sysctl -qew net.mptcp.enabled="$multipath_status" ip mptcp limits set add_addr_accepted $mptcp_add_addr_accepted subflows $mptcp_subflows 2>&1 >/dev/null [ -z "$mptcp_add_addr_timeout" ] || sysctl -qew net.mptcp.add_addr_timeout="$mptcp_add_addr_timeout" @@ -97,10 +99,9 @@ interface_multipath_settings() { config_get enabled "$config" auto "1" network_get_device iface $config [ -z "$iface" ] && network_get_physdev iface $config - [ -z "$iface" ] && config_get iface "$config" device + [ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]') [ -z "$iface" ] && config_get iface "$config" ifname config_get txqueuelen "$config" txqueuelen - [ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]') [ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["device"]') if [ "$(uci -q get openmptcprouter.${config}.metric)" = "" ]; then count=$((count+1)) @@ -258,6 +259,7 @@ interface_multipath_settings() { else #echo "Add routes for $ipaddr table $id" [ -n "$ipaddr" ] && ip rule add from $ipaddr table $id pref 0 + ip rule add oif $iface table $id pref 0 ip route replace $network/$netmask dev $iface scope link metric $id 2>&1 >/dev/null ip route replace $network/$netmask dev $iface scope link table $id 2>&1 >/dev/null ip route replace default via $gateway dev $iface table $id 2>&1 >/dev/null @@ -292,8 +294,10 @@ interface_multipath_settings() { network6=`ipcalc $ip6addr | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` fi if [ -z "$ip6addr" ] || [ -z "$network6" ]; then - ip6addr=$(ip -6 addr show dev $iface | grep -v 'scope link' | grep inet6 | awk '{print $2}' | cut -d/ -f1 | tr -d "\n") - gateway6=$(ip -6 r list dev $iface | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n") + [ -z "$ip6addr" ] && network_get_ipaddr6 ip6addr $config + [ -z "$ip6addr" ] && ip6addr=$(ip -6 addr show dev $iface | grep -v 'scope link' | grep inet6 | awk '{print $2}' | cut -d/ -f1 | tr -d "\n") + [ -z "$gateway6" ] && network_get_gateway6 gateway6 $config true + [ -z "$gateway6" ] && gateway6=$(ip -6 r list dev $iface | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n") [ -z "$gateway6" ] && gateway6=$(uci -q get "network.$config.ip6gw") [ -z "$gateway6" ] && gateway6=$(ubus call network.interface.$config status | jsonfilter -q -l 1 -e '@.inactive.route[@.target="::"].nexthop' | tr -d "\n") if [ -z "$gateway6" ] || [ "$( valid_subnet6 $gateway6 )" != "ok" ]; then @@ -303,7 +307,7 @@ interface_multipath_settings() { gateway6=$(ubus call network.interface.${config}_6 status 2>/dev/null | jsonfilter -q -l 1 -e '@.inactive.route[@.target="::"].nexthop' | tr -d "\n") fi netmask6=$(ip -6 addr show dev $iface | grep -v 'scope link' | grep inet6 | awk '{print $2}' | cut -d/ -f2 | tr -d "\n") - network6=`ipcalc $ip6addr | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` + [ -n "$ip6addr" ] && network6=`ipcalc $ip6addr | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` fi if [ "$(uci -q get openmptcprouter.settings.uci_route)" = "1" ]; then uci -q batch <<-EOF >/dev/null @@ -342,6 +346,7 @@ interface_multipath_settings() { EOF else [ -n "$ip6addr" ] && ip -6 rule add from $ip6addr table 6$id pref 0 2>&1 >/dev/null + ip rule add oif $iface table 6$id pref 0 ip -6 route replace $network6/$netmask6 dev $iface scope link metric 6$id 2>&1 >/dev/null ip -6 route replace $network6/$netmask6 dev $iface scope link table 6$id 2>&1 >/dev/null ip -6 route replace default via $gateway6 dev $iface table 6$id 2>&1 >/dev/null diff --git a/mptcp/files/usr/bin/multipath b/mptcp/files/usr/bin/multipath index bbf2e8a18..a6f977bc0 100755 --- a/mptcp/files/usr/bin/multipath +++ b/mptcp/files/usr/bin/multipath @@ -29,6 +29,7 @@ case $1 in echo "show established conections: -c" echo "show fullmesh info: -f" echo "show kernel config: -k" + echo "show MPTCP info: -m" echo echo "Flag on the device, to enable/disable MPTCP for this interface. The backup-flag" echo "will allow a subflow to be established across this interface, but only be used" @@ -75,6 +76,13 @@ case $1 in fi echo exit 0 ;; + "-m") + if [ -f /proc/net/mptcp_net/snmp ]; then + cat /proc/net/mptcp_net/snmp + else + nstat -z | grep -i mptcp + fi + exit 0 ;; "") for ifpath in /sys/class/net/*; do $0 ${ifpath##*/} @@ -126,6 +134,8 @@ else ID=$(ip mptcp endpoint show | grep "dev $DEVICE" | awk '{print $3}') IFF=$(ip mptcp endpoint show | grep "dev $DEVICE" | awk '{print $4}') IP=$(ifconfig $DEVICE | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p') + RMID=$(ip mptcp endpoint show | grep '::ffff' | awk '{ print $3 }') + [ -n "$RMID" ] && ip mptcp endpoint delete id $RMID 2>&1 >/dev/null case $TYPE in "off") [ -n "$ID" ] && ip mptcp endpoint delete id $ID 2>&1 >/dev/null diff --git a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking index 065d89c65..e339ae719 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -664,7 +664,7 @@ disable_pihole() { commit dhcp EOF fi - /etc/init.d/dnsmasq restart + /etc/init.d/dnsmasq restart 2>&1 >/dev/null fi } @@ -704,6 +704,95 @@ default_gw6=$(ip -6 route show default | grep -v "metric" | awk '/default/ {prin interface_up=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') + +if [ -n "$(grep RUTX /etc/board.json)" ] && [ -n "$OMR_TRACKER_INTERFACE" ]; then + if [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.device)" = "wwan0" ]; then + modemdata=$(omr-modemmanager '/sys/devices/platform/soc/60f8800.usb2/6000000.dwc3/xhci-hcd.1.auto/usb3/3-1' all) + gen=$(echo $modemdata | cut -d ';' -f 5 | tr -d '\n') + if [ "$gen" = "gsm" ]; then + echo "default-on" > /sys/class/leds/mob_gen_2/trigger + echo "none" > /sys/class/leds/mob_gen_3/trigger + echo "none" > /sys/class/leds/mob_gen_4/trigger + elif [ "$gen" = "umts" ]; then + echo "none" > /sys/class/leds/mob_gen_2/trigger + echo "default-on" > /sys/class/leds/mob_gen_3/trigger + echo "none" > /sys/class/leds/mob_gen_4/trigger + elif [ "$gen" = "lte" ]; then + echo "none" > /sys/class/leds/mob_gen_2/trigger + echo "none" > /sys/class/leds/mob_gen_3/trigger + echo "default-on" > /sys/class/leds/mob_gen_4/trigger + fi + bar=$(echo $modemdata | cut -d ';' -f 1 | tr -d '\n') + if [ "$bar" -gt "0" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_1/trigger + else + echo "none" > /sys/class/leds/mob_ssid_1/trigger + fi + if [ "$bar" -gt "30" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_2/trigger + else + echo "none" > /sys/class/leds/mob_ssid_2/trigger + fi + if [ "$bar" -gt "50" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_3/trigger + else + echo "none" > /sys/class/leds/mob_ssid_3/trigger + fi + if [ "$bar" -gt "70" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_4/trigger + else + echo "none" > /sys/class/leds/mob_ssid_4/trigger + fi + if [ "$bar" -gt "90" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_5/trigger + else + echo "none" > /sys/class/leds/mob_ssid_5/trigger + fi + elif [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.device)" = "wwan1" ]; then + modemdata=$(omr-modemmanager '/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2' all) + gen=$(echo $modemdata | cut -d ';' -f 5 | tr -d '\n') + if [ "$gen" = "gsm" ]; then + echo "default-on" > /sys/class/leds/mob2_gen_2/trigger + echo "none" > /sys/class/leds/mob2_gen_3/trigger + echo "none" > /sys/class/leds/mob2_gen_4/trigger + elif [ "$gen" = "umts" ]; then + echo "none" > /sys/class/leds/mob2_gen_2/trigger + echo "default-on" > /sys/class/leds/mob2_gen_3/trigger + echo "none" > /sys/class/leds/mob2_gen_4/trigger + elif [ "$gen" = "lte" ]; then + echo "none" > /sys/class/leds/mob2_gen_2/trigger + echo "none" > /sys/class/leds/mob2_gen_3/trigger + echo "default-on" > /sys/class/leds/mob2_gen_4/trigger + fi + bar=$(echo $modemdata | cut -d ';' -f 1 | tr -d '\n') + if [ "$bar" -gt "0" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_1/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_1/trigger + fi + if [ "$bar" -gt "30" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_2/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_2/trigger + fi + if [ "$bar" -gt "50" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_3/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_3/trigger + fi + if [ "$bar" -gt "70" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_4/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_4/trigger + fi + if [ "$bar" -gt "90" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_5/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_5/trigger + fi + fi +fi + # An interface in error will never be used in MPTCP if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then if [ "$interface_up" = "true" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "modemmanager" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "wireguard" ]); then @@ -725,7 +814,9 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then else _log "$OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE) switched off because $OMR_TRACKER_STATUS_MSG" fi - uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='down' + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='down' + fi #if [ "$(sysctl -n net.mptcp.mptcp_enabled | tr -d '\n')" = "1" ]; then # multipath "$OMR_TRACKER_DEVICE" off > /dev/null 2>&1 #fi @@ -738,11 +829,13 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ] && [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "openvpn" ]; then VPN_BASE_INTF="$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.baseintf)" VPN_BASE_INTF_IP=$(ubus call network.interface.$VPN_BASE_INTF status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n") - uci -q batch <<-EOF >/dev/null - set openvpn.$VPN_BASE_INTF.local=$VPN_BASE_INTF_IP - commit openvpn - EOF - /etc/init.d/openvpn restart $VPN_BASE_INTF + if [ -n "$VPN_BASE_INTF" ]; then + uci -q batch <<-EOF >/dev/null + set openvpn.$VPN_BASE_INTF.local=$VPN_BASE_INTF_IP + commit openvpn + EOF + fi + /etc/init.d/openvpn restart $VPN_BASE_INTF 2>&1 >/dev/null fi config_load openmptcprouter config_foreach del_server_route server @@ -769,7 +862,11 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then config_foreach set_route6 interface $OMR_TRACKER_INTERFACE "no" fi fi - mail_alert="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.mail_alert)" + + mail_alert="" + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + mail_alert="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.mail_alert)" + fi [ -z "$mail_alert" ] && mail_alert="$(uci -q get omr-tracker.defaults.mail_alert)" [ "$mail_alert" = "1" ] && [ -n "$(uci -q get mail.default.to)" ] && { OMR_SYSNAME="$(uci -q get system.@system[0].hostname)" @@ -783,10 +880,16 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then echo -e "Subject: $OMR_SYSNAME: $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE) is down\n\nConnection failure of $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE) detected. The reason is \"$OMR_TRACKER_STATUS_MSG\"." | sendmail $(uci -q get mail.default.to) fi } - script_alert_down="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.script_alert_down)" + script_alert_down="" + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + script_alert_down="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.script_alert_down)" + fi [ -n "$script_alert_down" ] && eval $script_alert_down - restart_down="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.restart_down)" + restart_down="" + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + restart_down="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.restart_down)" + fi [ -z "$restart_down" ] && restart_down="$(uci -q get omr-tracker.defaults.restart_down)" [ "$restart_down" = "1" ] && { _log "Restart $OMR_TRACKER_INTERFACE" @@ -810,25 +913,25 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then _log "Tunnel down use ShadowSocks for UDP" uci -q set shadowsocks-libev.ss_rules.redir_udp='hi1' if /etc/init.d/shadowsocks-libev rules_exist ; then - /etc/init.d/shadowsocks-libev rules_down - /etc/init.d/shadowsocks-libev rules_up + /etc/init.d/shadowsocks-libev rules_down 2>&1 >/dev/null + /etc/init.d/shadowsocks-libev rules_up 2>&1 >/dev/null fi fi if [ "$(uci -q get dsvpn.vpn.enable)" = "1" ]; then _log "DSVPN down, restart it" - /etc/init.d/dsvpn restart + /etc/init.d/dsvpn restart 2>&1 >/dev/null fi if [ "$(uci -q get mlvpn.general.enable)" = "1" ]; then _log "MLVPN down, restart it" - /etc/init.d/mlvpn restart + /etc/init.d/mlvpn restart 2>&1 >/dev/null fi if [ "$(uci -q get glorytun.vpn.enable)" = "1" ]; then _log "Glorytun VPN down, restart it" - /etc/init.d/glorytun restart + /etc/init.d/glorytun restart 2>&1 >/dev/null fi if [ "$(uci -q get glorytun-udp.vpn.enable)" = "1" ]; then _log "Glorytun UDP VPN down, restart it" - /etc/init.d/glorytun-udp restart + /etc/init.d/glorytun-udp restart 2>&1 >/dev/null fi config_load openmptcprouter config_foreach disable_pihole server @@ -839,7 +942,9 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then fi fi dns_flush - uci -q delete openmptcprouter.$OMR_TRACKER_INTERFACE.lc + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + uci -q delete openmptcprouter.$OMR_TRACKER_INTERFACE.lc + fi uci -q commit openmptcprouter #ubus call network reload @@ -919,12 +1024,12 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om config_load openmptcprouter config_foreach enable_pihole server #config_foreach delete_server_default_route server - [ "$nbserver" = "$piholeenabled" ] && /etc/init.d/openmptcprouter-vps set_pihole + [ "$nbserver" = "$piholeenabled" ] && /etc/init.d/openmptcprouter-vps set_pihole 2>&1 >/dev/null #ubus call network reload exit 0 fi -if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]; then +if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]; then if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" != "up" ]; then uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='up' uci -q commit openmptcprouter @@ -932,7 +1037,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]; then exit 0 fi -if [ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR_TRACKER_STATUS" ]; then +if [ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR_TRACKER_STATUS" ] && [ -n "$OMR_TRACKER_INTERFACE" ]; then _log "$OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE) switched up" mail_alert="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.mail_alert)" [ -z "$mail_alert" ] && mail_alert="$(uci -q get omr-tracker.defaults.mail_alert)" @@ -951,18 +1056,20 @@ if [ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR script_alert_up="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.script_alert_up)" [ -n "$script_alert_up" ] && eval $script_alert_up fi -if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" != "up" ]; then +if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" != "up" ]; then uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='up' uci -q commit openmptcprouter dns_flush fi -multipath_config=$(uci -q get "openmtpcprouter.$OMR_TRACKER_INTERFACE.multipath") -[ -z "$multipath_config" ] && multipath_config=$(uci -q get "network.$OMR_TRACKER_INTERFACE.multipath" || echo "off") -[ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipathvpn)" = "1" ] && { - [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "openvpn" ] && multipath_config_route="$(uci -q get openmptcprouter.ovpn${OMR_TRACKER_INTERFACE}.multipath || echo "off")" - [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "wireguard" ] && multipath_config_route="$(uci -q get openmptcprouter.wg${OMR_TRACKER_INTERFACE}.multipath || echo "off")" -} +if [ -n "$OMR_TRACKER_INTERFACE" ]; then + multipath_config=$(uci -q get "openmtpcprouter.$OMR_TRACKER_INTERFACE.multipath") + [ -z "$multipath_config" ] && multipath_config=$(uci -q get "network.$OMR_TRACKER_INTERFACE.multipath" || echo "off") + [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipathvpn)" = "1" ] && { + [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "openvpn" ] && multipath_config_route="$(uci -q get openmptcprouter.ovpn${OMR_TRACKER_INTERFACE}.multipath || echo "off")" + [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "wireguard" ] && multipath_config_route="$(uci -q get openmptcprouter.wg${OMR_TRACKER_INTERFACE}.multipath || echo "off")" + } +fi if [ "$multipath_config" = "master" ]; then #if ([ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]) && [ "$OMR_TRACKER_DEVICE_GATEWAY" != "" ] && ([ "$(uci -q get openmptcprouter.settings.master)" != "balancing" ] || [ "$(uci -q get openmptcprouter.settings.vpn)" = "mlvpn" ]); then @@ -1010,7 +1117,7 @@ if [ "$multipath_config" = "master" ]; then config_foreach set_route_balancing interface config_foreach set_route_balancing6 interface [ -n "$routesbalancing" ] && { - ([ "$nbintf" -gt "1" ] && [ "$(ip r show default metric 1 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancing " ]) || ([ "$nbintf" = "1" ] && ([ "$(ip r show default metric 1 | grep $OMR_TRACKER_DEVICE)" = "" ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]) && [ -n "$OMR_TRACKER_DEVICE_IP" ]) && { + ([ "$nbintf" -gt "1" ] && [ "$(ip r show default metric 1 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancing " ]) || ([ "$nbintf" = "1" ] && ([ "$(ip r show default metric 1 | grep $OMR_TRACKER_DEVICE)" = "" ] || ([ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ])) && [ -n "$OMR_TRACKER_DEVICE_IP" ]) && { _log "Change in routes, set ip route replace default scope global $routesbalancing (omrvpn_intf: $omrvpn_intf)" [ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] && _log "Current route: $(ip r)" ip route replace default scope global metric 1 $routesbalancing 2>&1 >/dev/null @@ -1024,7 +1131,7 @@ if [ "$multipath_config" = "master" ]; then } } [ -n "$routesbalancingbackup" ] && { - ([ "$nbintfb" -gt "1" ] && [ "$(ip r show default metric 999 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancingbackup " ]) || ([ "$nbintf" = "1" ] && ([ "$(ip r show default metric 999 | grep $OMR_TRACKER_DEVICE)" = "" ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]) && [ -n "$OMR_TRACKER_DEVICE_IP" ]) && { + ([ "$nbintfb" -gt "1" ] && [ "$(ip r show default metric 999 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancingbackup " ]) || ([ "$nbintf" = "1" ] && ([ "$(ip r show default metric 999 | grep $OMR_TRACKER_DEVICE)" = "" ] || ([ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ])) && [ -n "$OMR_TRACKER_DEVICE_IP" ]) && { _log "Set backup ip route replace default scope global metric 999 $routesbalancingbackup" ip route replace default scope global metric 999 $routesbalancingbackup 2>&1 >/dev/null } @@ -1043,7 +1150,7 @@ if [ "$multipath_config" = "master" ]; then if [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip -6 r show table 991337)" != "default via $OMR_TRACKER_DEVICE_GATEWAY6 dev $OMR_TRACKER_DEVICE " ]; then ip -6 route replace default via $OMR_TRACKER_DEVICE_GATEWAY6 dev $OMR_TRACKER_DEVICE table 991337 2>&1 >/dev/null fi - if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(date +"%s") + $((10 + RANDOM % 31)) - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ] || [ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]; then + if ([ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ]) || [ $(($(date +"%s") + $((10 + RANDOM % 31)) - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ] || [ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]; then [ "$(pgrep openmptcprouter-vps)" = "" ] && /etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1 fi multipath_config="on" @@ -1057,7 +1164,7 @@ if [ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ]; then elif [ "$(uci -q get openmptcprouter.settings.master)" != "failover" ]; then config_foreach set_server_route server fi - if [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then + if [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then _log "Interface route not yet set, set route ip r add default via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE metric $(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" ip r add default via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE metric $(uci -q get network.$OMR_TRACKER_INTERFACE.metric) >/dev/null 2>&1 fi @@ -1070,12 +1177,12 @@ if [ -n "$OMR_TRACKER_DEVICE_IP6" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ]; th elif [ "$(uci -q get openmptcprouter.settings.master)" != "failover" ]; then config_foreach set_server_route6 server fi - if [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip -6 r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then + if [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip -6 r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then ip -6 r replace default via $OMR_TRACKER_DEVICE_GATEWAY6 dev $OMR_TRACKER_DEVICE metric $(uci -q get network.$OMR_TRACKER_INTERFACE.metric) >/dev/null 2>&1 fi fi -if [ "$multipath_config" = "on" ] || [ "$multipath_config" = "backup" ]; then +if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$multipath_config" = "on" ] || [ "$multipath_config" = "backup" ]); then download="$(uci -q get network.$OMR_TRACKER_INTERFACE.downloadspeed)" [ -z "$download" ] && download="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.download)" upload="$(uci -q get network.$OMR_TRACKER_INTERFACE.uploadspeed)" @@ -1144,7 +1251,7 @@ fi #ubus call network reload # Save wan settings for status page -if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(date +"%s") + $((30 + RANDOM % 31)) - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" = "down" ]; then +if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(date +"%s") + $((30 + RANDOM % 31)) - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" = "down" ]); then [ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] && _log "Get status and settings for $OMR_TRACKER_INTERFACE..." local ipaddr="" local ip6addr="" @@ -1201,7 +1308,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( _log "New public ip detected for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE): $ipaddr" /etc/init.d/mptcp enabled && { _log "Reload MPTCP for $OMR_TRACKER_DEVICE" - /etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" >/dev/null + /etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" 2>&1 >/dev/null } uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.publicip="$ipaddr" } @@ -1214,7 +1321,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( local lanip="$(uci -q get network.lan.ipaddr)" local masterip get_master_ip() { - if [ "$(uci -q get openmptcprouter.$1.multipath)" = "master" ]; then + if [ -n "$1" ] && [ "$(uci -q get openmptcprouter.$1.multipath)" = "master" ]; then masterip="$(uci -q get openmptcprouter.$1.publicip)" fi } @@ -1223,7 +1330,8 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( if [ -n "$lanip" ] && [ -n "$masterip" ] && [ -n "$ipaddr" ] && [ "$ipaddr" = "$masterip" ] && [ "$(uci -q get openmptcprouter.settings.disableloopdetection)" != "1" ]; then loop=0 routingloop() { - vpsip="$(uci -q get openmptcprouter.$1.ip)" + vpsip="" + [ -n "$1"] && vpsip="$(uci -q get openmptcprouter.$1.ip)" if [ -n "$vpsip" ] && [ "$(omr-routing-loop $vpsip $lanip $OMR_TRACKER_DEVICE)" = "detected" ]; then loop=1 fi @@ -1249,7 +1357,9 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( } if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ "$(uci -q get glorytun.vpn.enable)" != "1" ] && [ "$(uci -q get glorytun-udp.vpn.enable)" != "1" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then if [ -n "$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu)" ]; then - mtu=$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu) + network_device=$(find_network_device ${OMR_TRACKER_INTERFACE}) + mtu="" + [ -n "$network_device" ] && mtu=$(uci -q get network.${network_device}.mtu) [ -n "$mtu" ] && { uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mtu=$mtu ip link set dev $OMR_TRACKER_DEVICE mtu $mtu > /dev/null 2>&1 @@ -1275,7 +1385,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( } config_load openmptcprouter config_foreach traceboxmtutest server - [ "$(uci -q get openmptcprouter.settings.tracebox)" = "0" ] && { + [ "$(uci -q get openmptcprouter.settings.tracebox)" = "0" ] && [ -n "$OMR_TRACKER_DEVICE" ] && { mptcpsupport="$(omr-mptcp-intf $OMR_TRACKER_DEVICE)" [ -n "$mptcpsupport" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mptcp_status="$mptcpsupport" } @@ -1302,7 +1412,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( _log "New public ip detected for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE): $ip6addr" /etc/init.d/mptcp enabled && { _log "Reload MPTCP for $OMR_TRACKER_DEVICE" - /etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" >/dev/null + /etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" 2>&1 >/dev/null } uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.publicip="$ip6addr" } @@ -1319,7 +1429,8 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( [ -n "$omrtracebox" ] && [ -z "$(echo $omrtracebox | grep error)" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mptcp_status="$omrtracebox" } if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ "$(uci -q get glorytun.vpn.enable)" != "1" ] && [ "$(uci -q get glorytun-udp.vpn.enable)" != "1" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then - if [ -n "$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu)" ]; then + network_device=$(find_network_device ${OMR_TRACKER_INTERFACE}) + if [ -n "$network_device" ] && [ -n "$(uci -q get network.${network_device}.mtu)" ]; then mtu=$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu) [ -n "$mtu" ] && { uci -q set openmptcprouter.${OMR_TRACKER_INTERFACE}.mtu=$mtu @@ -1390,7 +1501,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( dns_flush fi -[ -n "$OMR_TRACKER_LATENCY" ] && { +[ -n "$OMR_TRACKER_INTERFACE" ] && [ -n "$OMR_TRACKER_LATENCY" ] && { [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency)" != "" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency_previous="$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency)" uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency="$OMR_TRACKER_LATENCY" #[ -z "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max)" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max="$OMR_TRACKER_LATENCY" @@ -1399,7 +1510,7 @@ fi masterintf="$(uci -q show openmptcprouter | grep -m 1 multipath=\'master\' | cut -d'.' -f2)" [ -z "$masterintf" ] && masterintf="$(uci -q show network | grep -m 1 multipath=\'master\' | cut -d'.' -f2)" masterlatency="$(uci -q get openmptcprouter.$masterintf.latency | tr -d '\n')" - if [ -z "$masterlatency" ] || [ "$(uci -q get openmptcprouter.$masterintf.state)" = "down" ]; then + if [ -z "$masterlatency" ] || ([ -n "$masterintf" ] && [ "$(uci -q get openmptcprouter.$masterintf.state)" = "down" ]); then masterlatency=1000 fi if [ -n "$masterintf" ] && ([ "$masterlatency" != "" ] || [ "$(uci -q get openmptcprouter.$masterintf.state)" = "down" ]); then @@ -1427,22 +1538,22 @@ fi # If a service is down, force restart it if [ "$(pgrep ss-redir)" = "" ] && [ "$(pgrep ss-local)" = "" ] && [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "192.18.1.3" ] && [ "$(uci -q get shadowsocks-libev.sss0.key)" != "" ]; then _log "Can't find Shadowsocks, restart it..." - /etc/init.d/shadowsocks-libev restart + /etc/init.d/shadowsocks-libev restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep glorytun)" = "" ] && [ "$(uci -q get glorytun.vpn.enable)" = "1" ] && [ -f /etc/init.d/glorytun ] && [ "$(uci -q get glorytun.vpn.key)" != "" ]; then _log "Can't find Glorytun, restart it..." - /etc/init.d/glorytun restart + /etc/init.d/glorytun restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep glorytun-udp)" = "" ] && [ "$(uci -q get glorytun-usp.vpn.enable)" = "1" ] && [ -f /etc/init.d/glorytun-udp ] && [ "$(uci -q get glorytun-udp.vpn.key)" != "" ]; then _log "Can't find Glorytun UDP, restart it..." - /etc/init.d/glorytun-udp restart + /etc/init.d/glorytun-udp restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep unbound)" = "" ] && [ -f /etc/init.d/unbound ] && [ "$(uci -q get unbound.@unbound[0].enabled)" = "1" ]; then - /etc/init.d/unbound restart + /etc/init.d/unbound restart 2>&1 >/dev/null sleep 5 fi @@ -1455,53 +1566,53 @@ if [ "$(pgrep openvpn)" = "" ] && [ -f /etc/init.d/openvpn ]; then config_foreach openvpn_enabled openvpn if [ "$openvpn_enable" = "1" ]; then _log "Can't find OpenVPN, restart it" - /etc/init.d/openvpn restart + /etc/init.d/openvpn restart 2>&1 >/dev/null sleep 5 fi fi if [ "$(pgrep mlvpn)" = "" ] && [ "$(uci -q get mlvpn.general.enable)" = "1" ] && [ -f /etc/init.d/mlvpn ] && [ "$(uci -q get mlvpn.general.password)" != "" ]; then _log "Can't find MLVPN, restart it..." - /etc/init.d/mlvpn restart + /etc/init.d/mlvpn restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep dsvpn)" = "" ] && [ "$(uci -q get dsvpn.vpn.enable)" = "1" ] && [ -f /etc/init.d/dsvpn ] && [ "$(uci -q get dsvpn.vpn.key)" != "" ]; then _log "Can't find DSVPN, restart it..." - /etc/init.d/dsvpn restart + /etc/init.d/dsvpn restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep v2ray)" = "" ] && [ "$(uci -q get v2ray.main.enabled)" = "1" ] && [ -f /etc/init.d/v2ray ]; then _log "Can't find V2Ray, restart it..." - /etc/init.d/v2ray restart + /etc/init.d/v2ray restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep miniupnpd)" = "" ] && [ "$(uci -q get upnpd.config.enabled)" = "1" ] && [ -f /etc/init.d/miniupnpd ]; then _log "Can't find miniupnpd, restart it..." - /etc/init.d/miniupnpd restart + /etc/init.d/miniupnpd restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep rpcd)" = "" ] && [ -f /etc/init.d/rpcd ]; then _log "Can't find rpcd, restart it..." - /etc/init.d/rpcd restart + /etc/init.d/rpcd restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep uhttpd)" = "" ] && [ -f /etc/init.d/uhttpd ]; then _log "Can't find uhttpd, restart it..." - /etc/init.d/uhttpd restart + /etc/init.d/uhttpd restart 2>&1 >/dev/null 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 +# /etc/init.d/modemmanager restart 2>&1 >/dev/null # 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..." - /etc/init.d/omr-tracker restart + /etc/init.d/omr-tracker restart 2>&1 >/dev/null fi set_get_config() { @@ -1517,7 +1628,7 @@ fi if [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.key)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "192.18.1.3" ] && [ "$(pgrep -f omr-tracker-ss)" = "" ] && [ "$(pgrep -f '/etc/init.d/omr-tracker')" = "" ]; then _log "Can't find omr-tracker-ss, restart omr-tracker..." - /etc/init.d/omr-tracker restart + /etc/init.d/omr-tracker restart 2>&1 >/dev/null fi if [ "$(uci -q get glorytun.vpn.enable)" = "1" ] && [ "$(uci -q get glorytun.vpn.key)" = "" ]; then @@ -1541,12 +1652,12 @@ fi if [ "$(iptables-save | grep omr-bypass)" = "" ] && [ "$(pgrep omr-bypass)" = "" ]; then _log "Can't find omr-bypass rules, restart omr-bypass..." - /etc/init.d/omr-bypass + /etc/init.d/omr-bypass 2>&1 >/dev/null fi -if [ -f /etc/backup/installed_packages.txt ]; then +if [ -f /etc/backup/installed_packages.txt ] && [ -n "$(grep overlay /etc/backup/installed_packages.txt)" ]; then _log "Reinstall packages..." - /etc/init.d/sysupgrade restart + /etc/init.d/sysupgrade restart 2>&1 >/dev/null fi if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]); then @@ -1554,13 +1665,13 @@ if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter sleep 5 fi - -if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || [ -z "$(iptables-save | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]); then +#if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || [ -z "$(iptables-save | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]); then +if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && [ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ]; then _log "Set firewall on server" /etc/init.d/openmptcprouter-vps set_vps_firewall >/dev/null 2>&1 run_fw_include() { - [ "$(uci -q get firewall.$1.reload)" = "0" ] && sh $(uci -q get firewall.$1.path) >/dev/null 2>&1 + [ -n "$1" ] && [ "$(uci -q get firewall.$1.reload)" = "0" ] && sh $(uci -q get firewall.$1.path) >/dev/null 2>&1 } config_load firewall config_foreach run_fw_include include diff --git a/ndpi-netfilter2/Makefile b/ndpi-netfilter2/Makefile index 9f04c4e87..2c0377aa8 100755 --- a/ndpi-netfilter2/Makefile +++ b/ndpi-netfilter2/Makefile @@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ndpi-netfilter2 -PKG_RELEASE:=2 -PKG_REV:=0a03249da911f4033fd2a0d38a97cdba72eee2b6 -PKG_VERSION:=3.2-$(PKG_REV) +PKG_RELEASE:=3 +PKG_REV:=59f295ba86110f2642f76eb967b041c4108fedd5 +PKG_VERSION:=4-$(PKG_REV) PKG_SOURCE_PROTO:=git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/omr-6in4/files/etc/init.d/omr-6in4 b/omr-6in4/files/etc/init.d/omr-6in4 index 5bec94c02..8a3e38a38 100755 --- a/omr-6in4/files/etc/init.d/omr-6in4 +++ b/omr-6in4/files/etc/init.d/omr-6in4 @@ -73,7 +73,7 @@ set_ipv6_state() { unbound.ub_main.protocol='mixed' commit unbound EOF - if [ "$(network.lan.ip6assign)" = "" ]; then + if [ "$(uci -q get network.lan.ip6assign)" = "" ]; then uci -q set network.lan.ip6assign='60' fi if [ "$(uci -q get network.globals.ula_prefix)" = "" ]; then diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index f78571aab..910654913 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -85,13 +85,19 @@ _post_tracking() { _log() { logger -t "post-tracking-${tracker_bin##*/}" "$*" } - . "$tracker_bin" + . "$tracker_bin" 2>&1 + #tmp=$(mktemp) + #. "$tracker_bin" 2>&1 > "$tmp" + #trackresult=$(< "$tmp") + #[ -n "$trackresult" ] && _log $trackresult + #rm -f "$tmp" ) done } _ping_server() { local servername=$1 + [ -z "$servername" ] && return local disabled=$(uci -q get openmptcprouter.$1.disabled) local device=$2 if [ -n "$device" ] && [ "$disabled" != "1" ]; then @@ -113,6 +119,7 @@ _ping_server() { _httping_server() { local servername=$1 + [ -z "$servername" ] && return local disabled=$(uci -q get openmptcprouter.$1.disabled) local port=$(uci -q get openmptcprouter.$1.port) local device=$2 @@ -135,9 +142,10 @@ _httping_server() { _ping() { local host=$1 + [ -z "$host" ] && return local device=$2 local localip=$3 - if [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "3g" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "qmi" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "ncm" ]; then + if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "3g" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "qmi" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "ncm" ]); then ret=$(ping -I "${device}" \ -w "$OMR_TRACKER_TIMEOUT" \ -c 2 \ @@ -222,7 +230,7 @@ _none() { _restart -OMR_TRACKER_INTERFACE_PROTO="$(uci -q get network.${OMR_TRACKER_INTERFACE_PROTO}.proto)" +OMR_TRACKER_INTERFACE_PROTO="$(uci -q get network.${OMR_TRACKER_INTERFACE}.proto)" OMR_TRACKER_PREV_STATUS="" # main loop while true; do diff --git a/omr-tracker/files/etc/init.d/omr-tracker b/omr-tracker/files/etc/init.d/omr-tracker index 419e2bd05..0f80614ed 100755 --- a/omr-tracker/files/etc/init.d/omr-tracker +++ b/omr-tracker/files/etc/init.d/omr-tracker @@ -48,7 +48,7 @@ _launch_tracker() { case "$1" in loopback|lan*|if0*) return;; esac - + [ -z "$1" ] && return local hosts hosts6 timeout tries interval interval_tries options type enabled wait_test ipv6 proto server_http_test _validate_section "defaults" "defaults" _validate_section "interface" "$1" @@ -152,6 +152,7 @@ _initialize_shadowsocks_tracker() { server=$1 [ -n "$(echo $server | grep sss)" ] || return + [ -z "$server" ] && return #redir_tcp=$(uci -q get shadowsocks-libev.ss_rules.redir_tcp) #config_get tracker_server ss_rules server @@ -199,7 +200,8 @@ _launch_shadowsocks_tracker() { config_get server "$1" server [ "$enabled" = "0" ] || [ "$disabled" = "1" ] || [ -z "$hosts" ] && return - [ -z "$server" ] || [ "$(uci -q get shadowsocks-libev.$server.server)" = "192.168.1.3" ] || [ "$(uci -q get shadowsocks-libev.$server.server)" = "" ] && return + [ -z "$server" ] && return + [ "$(uci -q get shadowsocks-libev.$server.server)" = "192.168.1.3" ] || [ "$(uci -q get shadowsocks-libev.$server.server)" = "" ] && return procd_open_instance # shellcheck disable=SC2086 diff --git a/openmptcprouter-full/Makefile b/openmptcprouter-full/Makefile index f8b0b483d..e759dc5ee 100755 --- a/openmptcprouter-full/Makefile +++ b/openmptcprouter-full/Makefile @@ -46,7 +46,7 @@ MY_DEPENDS := \ luci-app-openvpn \ shadowsocks-libev-ss-server shadowsocks-libev-ss-tunnel \ omr-6in4 ip6tables-mod-nat luci-proto-ipv6 6to4 6in4 6rd ip6tables \ - speedtestc \ + speedtestcpp \ iftop \ htop \ nano \ diff --git a/openmptcprouter/files/bin/omr-test-speed b/openmptcprouter/files/bin/omr-test-speed index 15666e1e9..9817eda79 100755 --- a/openmptcprouter/files/bin/omr-test-speed +++ b/openmptcprouter/files/bin/omr-test-speed @@ -1,9 +1,9 @@ #!/bin/sh # vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 : -HETZNER=false -if [ "$1" = "hetzner" ]; then - HETZNER=true +FORCEVPS=false +if [ "$1" = "forcevps" ]; then INTERFACE="$2" + FORCEVPS=true else INTERFACE="$1" fi @@ -13,24 +13,22 @@ fi exit 0 } -if [ "$HETZNER" = false ]; then - echo "Select best test server..." - HOSTLST="http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 http://speedtest.tele2.net/1000GB.zip https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" - bestping="9999" - for pinghost in $HOSTLST; do - domain=$(echo $pinghost | awk -F/ '{print $3}') - if [ -z "$INTERFACE" ]; then - ping=$(ping -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1) - else - ping=$(ping -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1) - fi - echo "host: $domain - ping: $ping" - if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then - bestping=$ping - HOST=$pinghost - fi - done -fi +echo "Select best test server..." +HOSTLST="https://repo.huaweicloud.com/debian-cd/10.0.0/amd64/iso-dvd/debian-10.0.0-amd64-DVD-2.iso https://mirrors.aliyun.com/ubuntu-releases/impish/ubuntu-21.10-desktop-amd64.iso https://mirrors.cloud.tencent.com/ubuntu-cdimage/ubuntu/daily-canary/20220209/jammy-desktop-canary-amd64.iso" +bestping="9999" +for pinghost in $HOSTLST; do + domain=$(echo $pinghost | awk -F/ '{print $3}') + if [ -z "$INTERFACE" ] || [ "$FORCEVPS" = true ]; then + ping=$(ping -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') + else + ping=$(ping -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') + fi + echo "host: $domain - ping: $ping" + if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then + bestping=$ping + HOST=$pinghost + fi +done [ -z "$HOST" ] && HOST="https://speed.hetzner.de/10GB.bin" diff --git a/openmptcprouter/files/bin/omr-test-speedv6 b/openmptcprouter/files/bin/omr-test-speedv6 index 3db10fee9..32269f215 100755 --- a/openmptcprouter/files/bin/omr-test-speedv6 +++ b/openmptcprouter/files/bin/omr-test-speedv6 @@ -1,8 +1,8 @@ #!/bin/sh # vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 : -HETZNER=false -if [ "$1" = "hetzner" ]; then - HETZNER=true +FORCEVPS=false +if [ "$1" = "forcevps" ]; then + FORCEVPS=true INTERFACE="$2" else INTERFACE="$1" @@ -14,23 +14,22 @@ fi } -if [ "$HETZNER" = false ]; then - echo "Select best test server..." - HOSTLST="http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 http://speedtest.tele2.net/1000GB.zip https://speed.hetzner.de/10GB.bin http://ipv6.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" - bestping="9999" - for pinghost in $HOSTLST; do - domain=$(echo $pinghost | awk -F/ '{print $3}') - if [ -z "$INTERFACE" ]; then - ping=$(ping -6 -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1) - else - ping=$(ping -6 -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1) - fi - echo "host: $domain - ping: $ping" - if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then - bestping=$ping - HOST=$pinghost - fi - done +echo "Select best test server..." +HOSTLST="http://scaleway.testdebit.info/10G.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv6.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" +bestping="9999" +for pinghost in $HOSTLST; do + domain=$(echo $pinghost | awk -F/ '{print $3}') + if [ -z "$INTERFACE" ] || [ "$FORCEVPS" = true ]; then + ping=$(ping -6 -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1) + else + ping=$(ping -6 -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1) + fi + echo "host: $domain - ping: $ping" + if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then + bestping=$ping + HOST=$pinghost + fi +done fi [ -z "$HOST" ] && HOST="https://speed.hetzner.de/10GB.bin" diff --git a/openmptcprouter/files/etc/init.d/openmptcprouter-vps b/openmptcprouter/files/etc/init.d/openmptcprouter-vps index 9c581ea92..6ac763eac 100755 --- a/openmptcprouter/files/etc/init.d/openmptcprouter-vps +++ b/openmptcprouter/files/etc/init.d/openmptcprouter-vps @@ -1140,9 +1140,11 @@ _set_vps_firewall() { username="$(uci -q get openmptcprouter.${fwservername}.username)" settings='{"name" : "redirect router"}' fw_list=$(_set_json "shorewalllist" "$settings") + [ -z "$fw_list" ] && return vpsfwlist=$(echo $fw_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d') settings='{"name" : "open router"}' fw_list=$(_set_json "shorewalllist" "$settings") + [ -z "$fw_list" ] && return if [ -n "$vpsfwlist" ]; then vpsfwlist="$vpsfwlist\n$(echo $fw_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')" else @@ -1150,9 +1152,11 @@ _set_vps_firewall() { fi settings='{"name" : "redirect router","ipproto" : "ipv6"}' fw6_list=$(_set_json "shorewalllist" "$settings") + [ -z "$fw6_list" ] && return vpsfw6list=$(echo $fw6_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d') settings='{"name" : "open router","ipproto" : "ipv6"}' fw6_list=$(_set_json "shorewalllist" "$settings") + [ -z "$fw6_list" ] && return if [ -n "$vpsfw6list" ]; then vpsfw6list="$vpsfw6list\n$(echo $fw6_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')" else diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network deleted file mode 100755 index ef722926a..000000000 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ /dev/null @@ -1,312 +0,0 @@ -#!/bin/sh -. /lib/functions.sh - -_setup_macaddr() { - uci -q get "network.$1.macaddr" >/dev/null && return - uci -q set "network.$1.macaddr=$2" -} - -_setup_macvlan() { - uci -q get "network.$1_dev.ifname" >/dev/null && return - - # do not create macvlan for vlan - local _ifname - _ifname=$(uci -q get "network.$1.device") - case "$_ifname" in - eth*.*) return ;; - esac - - uci -q batch <<-EOF - set network.$1_dev=device - set network.$1_dev.name=$1 - set network.$1_dev.type=macvlan - set network.$1_dev.ifname=$_ifname - set network.$1_dev.mode='vepa' - set network.$1.device=$1 - set network.$1.type=macvlan - set network.$1.masterintf=$_ifname - EOF - _macaddr=$(uci -q get "network.$1.macaddr") - _setup_macaddr "$1_dev" "${_macaddr:-auto$(date +%s)}" -} - -#_setup_macvlan_update() { -# uci -q get "network.$1_dev.device" >/dev/null || return -# -# uci -q batch <<-EOF -# set macvlan.$1=macvlan -# set macvlan.$1.device=$_ifname -# commit macvlan -# EOF -#} - -_setup_mptcp_handover_to_on() { - if [ "$(uci -q get network.$1.multipath)" = "handover" ]; then - uci -q set network.$1.multipath=on - fi - if [ "$(uci -q get openmptcprouter.$1.multipath)" = "handover" ]; then - uci -q set openmptcprouter.$1.multipath=on - fi -} - -_setup_multipath_off() { - uci -q get "network.$1.multipath" >/dev/null && return - uci -q set "network.$1.multipath=off" -} - -_setup_wan_interface() { - uci -q batch <<-EOF - set network.$1=interface - set network.$1.device=$2 - set network.$1.proto=static - set network.$1.ip4table=wan - set network.$1.multipath=$3 - set network.$1.defaultroute=0 - set network.${1}_dev=device - set network.${1}_dev.name=$2 - commit network - add_list firewall.@zone[1].network=$1 - commit firewall - EOF - [ -n "$4" ] && uci -q set network.$1.type=$4 -} - -config_load network -#config_foreach _setup_macvlan_update interface -config_foreach _setup_mptcp_handover_to_on interface - -if [ "$(uci -q show network.lan | grep multipath)" != "" ]; then - exit 0 -fi - -lanif="eth0" -if [ "$(grep rockchip /etc/os-release)" != "" ]; then - lanif="eth1" -elif [ -d /sys/class/net/lan0 -o -n "$(ip link | grep ' lan0')" ] && [ -d /sys/class/net/wan -o -n "$(ip link | grep ' wan@')" -o -n "$(ip link | grep ' wan:')" ]; then - lanif="wan" -elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/class/net/wan -o -n "$(ip link | grep ' wan@')" -o -n "$(ip link | grep ' wan:')" ]; then - lanif="wan" -elif [ -d /sys/class/net/lan ] || [ -n "$(ip link | grep ' lan')" ]; then - lanif="lan" -elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d '/sys/class/net/eth1.5' ]; then - lanif="eth1.5" - uci -q batch <<-EOF - set network.@switch_vlan[0]=switch_vlan - set network.@switch_vlan[0].device='switch0' - set network.@switch_vlan[0].vlan=1 - set network.@switch_vlan[0].vid=1 - set network.@switch_vlan[0].ports='3 5t' - add network switch_vlan - set network.@switch_vlan[1].device='switch0' - set network.@switch_vlan[1].vlan=2 - set network.@switch_vlan[1].vid=2 - set network.@switch_vlan[1].ports='2 5t' - add network switch_vlan - set network.@switch_vlan[2].device='switch0' - set network.@switch_vlan[2].vlan=3 - set network.@switch_vlan[2].vid=3 - set network.@switch_vlan[2].ports='1 5t' - add network switch_vlan - set network.@switch_vlan[3].device='switch0' - set network.@switch_vlan[3].vlan=4 - set network.@switch_vlan[3].vid=4 - set network.@switch_vlan[3].ports='0 5t' - add network switch_vlan - set network.@switch_vlan[4].device='switch0' - set network.@switch_vlan[4].vlan=5 - set network.@switch_vlan[4].vid=5 - set network.@switch_vlan[4].ports='4 6t' - EOF -elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d /sys/class/net/eth1 ] && [ "$(grep ipq806x /etc/os-release)" != "" ]; then - lanif="eth0.2" -elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d /sys/class/net/eth1 ]; then - lanif="eth1" -elif [ ! -d /sys/class/net/eth1 ] && [ -d /sys/class/net/eth0 ]; then - lanif="eth0" -fi -uci -q batch <<-EOF -delete network.lan.type -set network.lan=interface -set network.lan.proto=static -set network.lan.ipaddr=192.168.100.1 -set network.lan.netmask=255.255.255.0 -set network.lan.device=${lanif} -set network.lan.metric=2048 -set network.lan.ipv6=0 -set network.lan.delegate=0 -EOF - -uci -q batch <<-EOF -delete network.none -delete network.wan -delete network.if6rd -reorder network.loopback=0 -reorder network.globals=1 -reorder network.lan=2 -set network.globals.multipath=enable -EOF - -# Set the ip rule for the lan with a pref of 100 -uci -q show network.lan_rule >/dev/null || \ - uci -q batch <<-EOF - set network.lan_rule=rule - set network.lan_rule.lookup=lan - set network.lan_rule.priority=100 - EOF - -if [ "$(uci -q get network.vpn0.proto)" = "none" ]; then - uci -q delete network.vpn0 -fi - -config_load network -config_foreach _setup_multipath_off interface - -# Add the lan as a named routing table -if ! grep -s -q "lan" /etc/iproute2/rt_tables; then - echo "50 lan" >> /etc/iproute2/rt_tables -fi -uci -q set network.lan.ip4table='lan' - -#uci -q set "network.lan.ip6assign=64" - -# Create WAN interfaces -if [ "$(uci -q show network.wan1 | grep multipath)" = "" ] && [ -z "$(uci -q get network.wan1.multipath)" ]; then - if [ "$(grep ipq806x /etc/os-release)" != "" ]; then - _setup_wan_interface wan1 eth1.1 master - _setup_wan_interface wan2 eth1.2 on - _setup_wan_interface wan3 eth1.3 on - _setup_wan_interface wan4 eth1.4 on - elif [ "$(grep rockchip /etc/os-release)" != "" ]; then - _setup_wan_interface wan1 eth0 master macvlan - _setup_wan_interface wan2 eth0 on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ]; then - _setup_wan_interface wan1 eth0.1 master - _setup_wan_interface wan2 eth0.2 on - _setup_wan_interface wan3 eth0.3 on - _setup_wan_interface wan4 eth0.4 on - elif [ -d /sys/class/net/wan ] || [ -n "$(ip link | grep ' wan:')" ] || [ -n "$(ip link | grep ' wan@')" ]; then - if [ -d /sys/class/net/lan0 -o -n "$(ip link | grep ' lan0')" ] && [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ]; then - _setup_wan_interface wan1 lan0 master - _setup_wan_interface wan2 lan1 on - - _macaddr=$(uci -q get "network.lan0.macaddr") - _setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - _macaddr=$(uci -q get "network.lan1.macaddr") - _setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/lan2 ] || [ -n "$(ip link | grep ' lan2')" ]; then - _setup_wan_interface wan3 lan2 on - _macaddr=$(uci -q get "network.lan2.macaddr") - _setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/lan3 ] || [ -n "$(ip link | grep ' lan3')" ]; then - _setup_wan_interface wan4 lan3 on - _macaddr=$(uci -q get "network.lan3.macaddr") - _setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - fi - fi - elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/class/net/lan2 -o -n "$(ip link | grep ' lan2')" ]; then - _setup_wan_interface wan1 lan1 master - _setup_wan_interface wan2 lan2 on - - _macaddr=$(uci -q get "network.lan1.macaddr") - _setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - _macaddr=$(uci -q get "network.lan2.macaddr") - _setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/lan3 ] || [ -n "$(ip link | grep ' lan3')" ]; then - _setup_wan_interface wan3 lan3 on - _macaddr=$(uci -q get "network.lan3.macaddr") - _setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/lan4 ] || [ -n "$(ip link | grep ' lan4')" ]; then - _setup_wan_interface wan4 lan4 on - _macaddr=$(uci -q get "network.lan4.macaddr") - _setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - fi - fi - else - _setup_wan_interface wan1 wan master macvlan - _setup_wan_interface wan2 wan on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - fi - elif [ -d /sys/class/net/wan1 ] || [ -n "$(ip link | grep ' wan1')" ]; then - if [ -d /sys/class/net/wan2 ] || [ -n "$(ip link | grep ' wan2')" ]; then - _setup_wan_interface wan1 wan1 master - _setup_wan_interface wan2 wan2 on - - _macaddr=$(uci -q get "network.wan1.macaddr") - _setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - _macaddr=$(uci -q get "network.wan2.macaddr") - _setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - - if [ -d /sys/class/net/wan3 ] || [ -n "$(ip link | grep ' wan3')" ]; then - _setup_wan_interface wan3 wan3 on - _macaddr=$(uci -q get "network.wan3.macaddr") - _setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/wan4 ] || [ -n "$(ip link | grep ' wan4')" ]; then - _setup_wan_interface wan4 wan4 on - _macaddr=$(uci -q get "network.wan4.macaddr") - _setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - fi - fi - else - _setup_wan_interface wan1 wan1 master macvlan - _setup_wan_interface wan2 wan1 on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - fi - elif [ -d /sys/class/net/eth1 ] || [ -n "$(ip link | grep ' eth1:')" ]; then - if [ -d /sys/class/net/eth2 ] || [ -n "$(ip link | grep ' eth2:')" ]; then - _setup_wan_interface wan1 eth1 master - _setup_wan_interface wan2 eth2 on - if [ -d /sys/class/net/eth3 ] || [ -n "$(ip link | grep ' eth3:')" ]; then - _setup_wan_interface wan3 eth3 on - fi - if [ -d /sys/class/net/eth4 ] || [ -n "$(ip link | grep ' eth4:')" ]; then - _setup_wan_interface wan4 eth4 on - fi - if [ -d /sys/class/net/eth5 ] || [ -n "$(ip link | grep ' eth5:')" ]; then - _setup_wan_interface wan5 eth5 on - fi - if [ -d /sys/class/net/eth6 ] || [ -n "$(ip link | grep ' eth6:')" ]; then - _setup_wan_interface wan6 eth6 on - fi - if [ -d /sys/class/net/eth7 ] || [ -n "$(ip link | grep ' eth7:')" ]; then - _setup_wan_interface wan7 eth7 on - fi - if [ -d /sys/class/net/eth8 ] || [ -n "$(ip link | grep ' eth8:')" ]; then - _setup_wan_interface wan8 eth8 on - fi - else - _setup_wan_interface wan1 eth1 master macvlan - _setup_wan_interface wan2 eth1 on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - fi - elif [ -d /sys/class/net/eth0.1 ] && [ -d /sys/class/net/eth0.2 ]; then - _setup_wan_interface wan1 eth0.1 master - _setup_wan_interface wan2 eth0.2 on - else - _setup_wan_interface wan1 eth0 master macvlan - _setup_wan_interface wan2 eth0 on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - fi - #uci -q batch <<-EOF - #add network route6 - #set network.@route6[-1].interface='lan' - #set network.@route6[-1].target='::/0' - #EOF -fi - -# Replace omrip to oip in config for old config -sed -i 's/omrip/oip/g' /etc/config/* - -# Fix config from ifname to device for loopback -uci -q delete network.loopback.ifname -uci -q set network.loopback.device='lo' - -uci -q commit macvlan -uci -q commit network -rm -f /tmp/luci-indexcache -exit 0 diff --git a/openmptcprouter/files/etc/uci-defaults/1940-omr-dns b/openmptcprouter/files/etc/uci-defaults/1940-omr-dns index 2d4e3cbd9..ecb75b2f5 100755 --- a/openmptcprouter/files/etc/uci-defaults/1940-omr-dns +++ b/openmptcprouter/files/etc/uci-defaults/1940-omr-dns @@ -42,7 +42,7 @@ if [ "$(uci -q get dhcp.lan.dhcp_options)" = "" ]; then EOF fi -if [ -n "$(uci -q dhcp.@dnsmasq[0].server | grep 127.0.0.1)" ] && [ -z "$(uci -q dhcp.@dnsmasq[0].server | grep 127.0.0.1#5353)" ]; then +if [ -n "$(uci -q get dhcp.@dnsmasq[0].server | grep 127.0.0.1)" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep 127.0.0.1#5353)" ]; then /etc/init.d/https-dns-proxy start /etc/init.d/https-dns-proxy enable else @@ -59,7 +59,7 @@ fi # commit unbound #EOF -if [ -z "$(uci -q unbound.auth_icann)" ]; then +if [ -z "$(uci -q show unbound.auth_icann)" ]; then uci -q batch <<-EOF >/dev/null set unbound.auth_icann=zone set unbound.auth_icann.fallback='1' diff --git a/openmptcprouter/files/etc/uci-defaults/2060-omr-system b/openmptcprouter/files/etc/uci-defaults/2060-omr-system index 92e9a5fd3..4a4a37962 100755 --- a/openmptcprouter/files/etc/uci-defaults/2060-omr-system +++ b/openmptcprouter/files/etc/uci-defaults/2060-omr-system @@ -1,8 +1,15 @@ #!/bin/sh uci -q batch <<-EOF >/dev/null set system.@system[-1].ttylogin=1 + set system.ntp=timeserver set system.ntp.use_dhcp='0' set system.ntp.enable_server='1' + set system.ntp.enabled='1' + del system.ntp.server + add_list system.ntp.server='0.pool.ntp.org' + add_list system.ntp.server='1.pool.ntp.org' + add_list system.ntp.server='2.pool.ntp.org' + add_list system.ntp.server='3.pool.ntp.org' commit system set rpcd.@rpcd[0].timeout=120 commit rpcd @@ -31,6 +38,51 @@ fi EOF } +if [ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep rutx)" ]; then + uci -q batch <<-EOF >/dev/null + add system led + set system.@led[-1].sysfs='wan_wifi_4' + set system.@led[-1].name='WAN_ETH' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='eth0' + add_list system.@led[-1].mode='tx' + add_list system.@led[-1].mode='rx' + add system led + set system.@led[-1].sysfs='wan_eth_3' + set system.@led[-1].name='WAN_WIFI' + set system.@led[-1].trigger='netdev' + add_list system.@led[-1].mode='tx' + add_list system.@led[-1].mode='rx' + add system led + set system.@led[-1].sysfs='wan_sim_1' + set system.@led[-1].name='WAN_MODEM1' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='wwan0' + set system.@led[-1].mode='rx' + add system led + set system.@led[-1].name='WAN_MODEM2' + set system.@led[-1].sysfs='wan_sim_2' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='wwan1' + set system.@led[-1].mode='rx' + add system led + set system.@led[-1].name='WIFI24' + set system.@led[-1].sysfs='wifi_gen_2' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='radio0.network1' + add_list system.@led[-1].mode='tx' + add_list system.@led[-1].mode='rx' + add system led + set system.@led[-1].name='WIFI5' + set system.@led[-1].sysfs='wifi_gen_5' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='radio1.network1' + add_list system.@led[-1].mode='tx' + add_list system.@led[-1].mode='rx' + commit system + EOF +fi + #sed -i 's/^\tlogger -t/\t[ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] \&\& logger -t/g' /usr/share/ModemManager/modemmanager.common exit 0 \ No newline at end of file diff --git a/shadowsocks-v2ray-plugin/Makefile b/shadowsocks-v2ray-plugin/Makefile index f9e700fe1..5cc81054e 100755 --- a/shadowsocks-v2ray-plugin/Makefile +++ b/shadowsocks-v2ray-plugin/Makefile @@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git #PKG_SOURCE_URL:=https://github.com/shadowsocks/v2ray-plugin.git PKG_SOURCE_URL:=https://github.com/teddysun/v2ray-plugin.git #PKG_SOURCE_VERSION:=63a74bef9e9f639bc199255db9d452d96f01d11a -PKG_SOURCE_VERSION:=6c0c5fb15851e13b36fe2eeaaba97fd27c9d291b +PKG_SOURCE_VERSION:=5cafcf9a0ae316cb268120eb1994adf5255eb7f0 PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 diff --git a/speedtestcpp/Makefile b/speedtestcpp/Makefile new file mode 100644 index 000000000..db25f5bb8 --- /dev/null +++ b/speedtestcpp/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2021 Ycarus (Yannick Chabanois) for OpenMPTCProuter project +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=speedtestcpp +PKG_VERSION:=1.12 +PKG_RELEASE:=2 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=a01ae6eb04c5d3f4847aef73bf77849275ccc6eb +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/fmantz/SpeedTest.git + +PKG_MAINTAINER:=Ycarus +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +CMAKE_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/speedtestcpp + SECTION:=net + CATEGORY:=Network + TITLE:=Yet another unofficial speedtest.net client cli interface + URL:=https://github.com/fmantz/SpeedTest + DEPENDS:=+curl +libstdcpp +libopenssl +libxml2 +endef + +define Package/speedtestcpp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/SpeedTest $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/speedtestJson $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,speedtestcpp)) \ No newline at end of file