From c9d1b78f760f7aedbea0ad0612d78b0593aca8c8 Mon Sep 17 00:00:00 2001 From: Road <496814664@qq.com> Date: Wed, 13 Apr 2022 14:24:13 +0800 Subject: [PATCH] add mwan3 --- .github/workflows/build-openwrt.yml | 9 +++ .gitignore | 2 + mwan3.config | 93 +++++++++++++++++++++++++++++ openwrt.config | 70 ++++++++++++++-------- 4 files changed, 150 insertions(+), 24 deletions(-) create mode 100644 .gitignore create mode 100644 mwan3.config diff --git a/.github/workflows/build-openwrt.yml b/.github/workflows/build-openwrt.yml index c53d095..bbde9f5 100644 --- a/.github/workflows/build-openwrt.yml +++ b/.github/workflows/build-openwrt.yml @@ -24,6 +24,7 @@ env: REPO_BRANCH: openwrt-19.07 FEEDS_CONF: feeds.conf.default CONFIG_FILE: openwrt.config + MWAN3CONFIG: mwan3.config DIY_P1_SH: diy-part1.sh DIY_P2_SH: diy-part2.sh UPLOAD_BIN_DIR: true @@ -98,6 +99,14 @@ jobs: find dl -size -1024c -exec ls -l {} \; find dl -size -1024c -exec rm -f {} \; + - name: add mwan3 config + run: | + echo "orgine config:" + cat openwrt/feeds/packages/net/mwan3/files/etc/config/mwan3 + mv $MWAN3CONFIG openwrt/feeds/packages/net/mwan3/files/etc/config/mwan3 + echo "new config:" + cat openwrt/feeds/packages/net/mwan3/files/etc/config/mwan3 + - name: Compile the firmware id: compile run: | diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9bea433 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +.DS_Store diff --git a/mwan3.config b/mwan3.config new file mode 100644 index 0000000..135e116 --- /dev/null +++ b/mwan3.config @@ -0,0 +1,93 @@ + +config globals 'globals' + option mmx_mask '0x3F00' + option rtmon_interval '5' + option local_source 'lan' + +config interface 'wan' + option enabled '1' + option family 'ipv4' + option reliability '2' + option count '1' + option timeout '2' + option interval '5' + option down '3' + list track_ip '114.114.114.114' + list track_ip '223.6.6.6' + list track_ip '208.67.222.222' + list track_ip '208.67.220.220' + list track_ip '223.5.5.5' + option track_method 'ping' + option size '56' + option check_quality '0' + option failure_interval '5' + option recovery_interval '5' + option up '5' + option initial_state 'offline' + option flush_conntrack 'always' + +config member 'wan_m1_w3' + option interface 'wan' + option metric '1' + option weight '3' + +config member 'wan_m2_w3' + option interface 'wan' + option metric '2' + option weight '3' + +config policy 'wan_only' + list use_member 'wan_m1_w3' + option last_resort 'unreachable' + +config policy 'balanced' + option last_resort 'unreachable' + list use_member 'wan_m1_w3' + list use_member 'wwan_m1_w3' + +config rule 'https' + option sticky '1' + option dest_port '443' + option proto 'tcp' + option use_policy 'balanced' + +config rule 'default_rule' + option dest_ip '0.0.0.0/0' + option proto 'all' + option sticky '0' + option use_policy 'balanced' + +config interface 'wwan' + option enabled '1' + option family 'ipv4' + list track_ip '114.114.114.114' + list track_ip '223.5.5.5' + list track_ip '223.6.6.6' + option track_method 'ping' + option reliability '2' + option count '1' + option size '56' + option check_quality '0' + option timeout '2' + option interval '5' + option failure_interval '5' + option recovery_interval '5' + option down '3' + option up '5' + option initial_state 'offline' + option flush_conntrack 'always' + +config member 'wwan_m1_w3' + option metric '1' + option weight '3' + option interface 'wwan' + +config member 'wwan_m2_w3' + option metric '2' + option weight '3' + option interface 'wwan' + +config policy 'wwan_only' + option last_resort 'unreachable' + list use_member 'wwan_m1_w3' + diff --git a/openwrt.config b/openwrt.config index bef3def..9ae29a6 100644 --- a/openwrt.config +++ b/openwrt.config @@ -2177,7 +2177,7 @@ CONFIG_PACKAGE_kmod-ip6tables=y # CONFIG_PACKAGE_kmod-ipt-compat-xtables is not set # CONFIG_PACKAGE_kmod-ipt-condition is not set CONFIG_PACKAGE_kmod-ipt-conntrack=y -# CONFIG_PACKAGE_kmod-ipt-conntrack-extra is not set +CONFIG_PACKAGE_kmod-ipt-conntrack-extra=y # CONFIG_PACKAGE_kmod-ipt-conntrack-label is not set CONFIG_PACKAGE_kmod-ipt-core=y # CONFIG_PACKAGE_kmod-ipt-debug is not set @@ -2191,11 +2191,11 @@ CONFIG_PACKAGE_kmod-ipt-core=y # CONFIG_PACKAGE_kmod-ipt-hashlimit is not set # CONFIG_PACKAGE_kmod-ipt-iface is not set # CONFIG_PACKAGE_kmod-ipt-ipmark is not set -# CONFIG_PACKAGE_kmod-ipt-ipopt is not set +CONFIG_PACKAGE_kmod-ipt-ipopt=y # CONFIG_PACKAGE_kmod-ipt-ipp2p is not set # CONFIG_PACKAGE_kmod-ipt-iprange is not set # CONFIG_PACKAGE_kmod-ipt-ipsec is not set -# CONFIG_PACKAGE_kmod-ipt-ipset is not set +CONFIG_PACKAGE_kmod-ipt-ipset=y # CONFIG_PACKAGE_kmod-ipt-ipv4options is not set # CONFIG_PACKAGE_kmod-ipt-led is not set # CONFIG_PACKAGE_kmod-ipt-length2 is not set @@ -2212,7 +2212,7 @@ CONFIG_PACKAGE_kmod-ipt-offload=y # CONFIG_PACKAGE_kmod-ipt-physdev is not set # CONFIG_PACKAGE_kmod-ipt-psd is not set # CONFIG_PACKAGE_kmod-ipt-quota2 is not set -# CONFIG_PACKAGE_kmod-ipt-raw is not set +CONFIG_PACKAGE_kmod-ipt-raw=y # CONFIG_PACKAGE_kmod-ipt-raw6 is not set # CONFIG_PACKAGE_kmod-ipt-rpfilter is not set # CONFIG_PACKAGE_kmod-ipt-sysrq is not set @@ -2235,7 +2235,7 @@ CONFIG_PACKAGE_kmod-nf-nat=y # CONFIG_PACKAGE_kmod-nf-nathelper-extra is not set CONFIG_PACKAGE_kmod-nf-reject=y CONFIG_PACKAGE_kmod-nf-reject6=y -# CONFIG_PACKAGE_kmod-nfnetlink is not set +CONFIG_PACKAGE_kmod-nfnetlink=y # CONFIG_PACKAGE_kmod-nfnetlink-log is not set # CONFIG_PACKAGE_kmod-nfnetlink-queue is not set # CONFIG_PACKAGE_kmod-nft-arp is not set @@ -4132,6 +4132,7 @@ CONFIG_OPENSSL_ENGINE=y # CONFIG_PACKAGE_icu is not set # CONFIG_PACKAGE_icu-data-tools is not set # CONFIG_PACKAGE_icu-full-data is not set +# CONFIG_PACKAGE_libglpk is not set # CONFIG_PACKAGE_jansson is not set # CONFIG_PACKAGE_jsoncpp is not set # CONFIG_PACKAGE_knot-libs is not set @@ -4164,7 +4165,6 @@ CONFIG_PACKAGE_libcap=y # CONFIG_PACKAGE_libcoap is not set # CONFIG_PACKAGE_libcomerr is not set # CONFIG_PACKAGE_libconfig is not set -# CONFIG_PACKAGE_libcups is not set # CONFIG_PACKAGE_libcurl is not set # CONFIG_PACKAGE_libdaemon is not set # CONFIG_PACKAGE_libdaq is not set @@ -4191,7 +4191,6 @@ CONFIG_PACKAGE_libcap=y # CONFIG_PACKAGE_libevent2-extra is not set # CONFIG_PACKAGE_libevent2-openssl is not set # CONFIG_PACKAGE_libevent2-pthreads is not set -# CONFIG_PACKAGE_libevhtp is not set # CONFIG_PACKAGE_libexif is not set # CONFIG_PACKAGE_libexpat is not set # CONFIG_PACKAGE_libexslt is not set @@ -4220,7 +4219,6 @@ CONFIG_PACKAGE_libcap=y # CONFIG_PACKAGE_libgd is not set # CONFIG_PACKAGE_libgdbm is not set # CONFIG_PACKAGE_libgee is not set -# CONFIG_PACKAGE_libglpk is not set # CONFIG_PACKAGE_libgmp is not set # CONFIG_PACKAGE_libgnurl is not set # CONFIG_PACKAGE_libgpg-error is not set @@ -4268,7 +4266,7 @@ CONFIG_PACKAGE_liblucihttp-lua=y # CONFIG_PACKAGE_libmilter-sendmail is not set # CONFIG_PACKAGE_libminiupnpc is not set # CONFIG_PACKAGE_libmms is not set -# CONFIG_PACKAGE_libmnl is not set +CONFIG_PACKAGE_libmnl=y # CONFIG_PACKAGE_libmodbus is not set # CONFIG_PACKAGE_libmosquitto-nossl is not set # CONFIG_PACKAGE_libmosquitto-ssl is not set @@ -4314,7 +4312,6 @@ CONFIG_PACKAGE_libnl-tiny=y # CONFIG_PACKAGE_libopusenc is not set # CONFIG_PACKAGE_libopusfile is not set # CONFIG_PACKAGE_libout123 is not set -# CONFIG_PACKAGE_libowfat is not set # CONFIG_PACKAGE_libp11 is not set # CONFIG_PACKAGE_libpagekite is not set # CONFIG_PACKAGE_libpam is not set @@ -4401,13 +4398,12 @@ CONFIG_PACKAGE_librrd1=y # CONFIG_PACKAGE_libtiffxx is not set # CONFIG_PACKAGE_libtins is not set # CONFIG_PACKAGE_libtirpc is not set -# CONFIG_PACKAGE_libtorrent is not set CONFIG_PACKAGE_libubox=y # CONFIG_PACKAGE_libubox-lua is not set CONFIG_PACKAGE_libubus=y CONFIG_PACKAGE_libubus-lua=y CONFIG_PACKAGE_libuci=y -# CONFIG_PACKAGE_libuci-lua is not set +CONFIG_PACKAGE_libuci-lua=y CONFIG_PACKAGE_libuclient=y # CONFIG_PACKAGE_libudev-fbsd is not set # CONFIG_PACKAGE_libudns is not set @@ -4457,7 +4453,6 @@ CONFIG_PACKAGE_libwebsockets-full=y # CONFIG_PACKAGE_mtdev is not set # CONFIG_PACKAGE_musl-fts is not set # CONFIG_PACKAGE_mxml is not set -# CONFIG_PACKAGE_nacl is not set # CONFIG_PACKAGE_nspr is not set # CONFIG_PACKAGE_oniguruma is not set # CONFIG_PACKAGE_opencv is not set @@ -4583,7 +4578,6 @@ CONFIG_PACKAGE_luci-app-ddns=y CONFIG_PACKAGE_luci-app-firewall=y # CONFIG_PACKAGE_luci-app-freifunk-diagnostics is not set # CONFIG_PACKAGE_luci-app-freifunk-policyrouting is not set -# CONFIG_PACKAGE_luci-app-freifunk-widgets is not set # CONFIG_PACKAGE_luci-app-fwknopd is not set # CONFIG_PACKAGE_luci-app-hd-idle is not set # CONFIG_PACKAGE_luci-app-hnet is not set @@ -4593,7 +4587,7 @@ CONFIG_PACKAGE_luci-app-ksmbd=y # CONFIG_PACKAGE_luci-app-meshwizard is not set # CONFIG_PACKAGE_luci-app-minidlna is not set # CONFIG_PACKAGE_luci-app-mjpg-streamer is not set -# CONFIG_PACKAGE_luci-app-mwan3 is not set +CONFIG_PACKAGE_luci-app-mwan3=y # CONFIG_PACKAGE_luci-app-nextdns is not set # CONFIG_PACKAGE_luci-app-nft-qos is not set # CONFIG_PACKAGE_luci-app-nlbwmon is not set @@ -4838,6 +4832,35 @@ CONFIG_PACKAGE_luci-i18n-ksmbd-en=y # CONFIG_PACKAGE_luci-i18n-ksmbd-vi is not set CONFIG_PACKAGE_luci-i18n-ksmbd-zh-cn=y # CONFIG_PACKAGE_luci-i18n-ksmbd-zh-tw is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-bg is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-ca is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-cs is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-de is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-el is not set +CONFIG_PACKAGE_luci-i18n-mwan3-en=y +# CONFIG_PACKAGE_luci-i18n-mwan3-es is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-fr is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-he is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-hi is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-hu is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-it is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-ja is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-ko is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-mr is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-ms is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-no is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-pl is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-pt is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-pt-br is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-ro is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-ru is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-sk is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-sv is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-tr is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-uk is not set +# CONFIG_PACKAGE_luci-i18n-mwan3-vi is not set +CONFIG_PACKAGE_luci-i18n-mwan3-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-mwan3-zh-tw is not set # CONFIG_PACKAGE_luci-i18n-opkg-bg is not set # CONFIG_PACKAGE_luci-i18n-opkg-ca is not set # CONFIG_PACKAGE_luci-i18n-opkg-cs is not set @@ -5227,7 +5250,7 @@ CONFIG_PACKAGE_iptables=y # CONFIG_PACKAGE_iptables-mod-cluster is not set # CONFIG_PACKAGE_iptables-mod-clusterip is not set # CONFIG_PACKAGE_iptables-mod-condition is not set -# CONFIG_PACKAGE_iptables-mod-conntrack-extra is not set +CONFIG_PACKAGE_iptables-mod-conntrack-extra=y # CONFIG_PACKAGE_iptables-mod-delude is not set # CONFIG_PACKAGE_iptables-mod-dhcpmac is not set # CONFIG_PACKAGE_iptables-mod-dnetmap is not set @@ -5238,7 +5261,7 @@ CONFIG_PACKAGE_iptables=y # CONFIG_PACKAGE_iptables-mod-hashlimit is not set # CONFIG_PACKAGE_iptables-mod-iface is not set # CONFIG_PACKAGE_iptables-mod-ipmark is not set -# CONFIG_PACKAGE_iptables-mod-ipopt is not set +CONFIG_PACKAGE_iptables-mod-ipopt=y # CONFIG_PACKAGE_iptables-mod-ipp2p is not set # CONFIG_PACKAGE_iptables-mod-iprange is not set # CONFIG_PACKAGE_iptables-mod-ipsec is not set @@ -5508,11 +5531,11 @@ CONFIG_OPENLDAP_DEBUG=y # CONFIG_PACKAGE_igmpproxy is not set # CONFIG_PACKAGE_ip-bridge is not set # CONFIG_PACKAGE_ip-full is not set -# CONFIG_PACKAGE_ip-tiny is not set +CONFIG_PACKAGE_ip-tiny=y # CONFIG_PACKAGE_lldpd is not set # CONFIG_PACKAGE_mcproxy is not set # CONFIG_PACKAGE_mrmctl is not set -# CONFIG_PACKAGE_mwan3 is not set +CONFIG_PACKAGE_mwan3=y # CONFIG_PACKAGE_nstat is not set # CONFIG_PACKAGE_olsrd is not set # CONFIG_PACKAGE_prince is not set @@ -5842,7 +5865,7 @@ CONFIG_PACKAGE_hostapd-common=y # CONFIG_PACKAGE_iperf3 is not set # CONFIG_PACKAGE_iperf3-ssl is not set # CONFIG_PACKAGE_ipip is not set -# CONFIG_PACKAGE_ipset is not set +CONFIG_PACKAGE_ipset=y # CONFIG_PACKAGE_ipset-dns is not set # CONFIG_PACKAGE_iptraf-ng is not set # CONFIG_PACKAGE_iputils-arping is not set @@ -5865,7 +5888,7 @@ CONFIG_PACKAGE_iw=y # CONFIG_PACKAGE_krb5-libs is not set # CONFIG_PACKAGE_krb5-server is not set # CONFIG_PACKAGE_krb5-server-extras is not set -# CONFIG_PACKAGE_libipset is not set +CONFIG_PACKAGE_libipset=y # CONFIG_PACKAGE_libndp is not set # CONFIG_PACKAGE_linknx is not set # CONFIG_PACKAGE_lynx is not set @@ -5955,7 +5978,6 @@ CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL=-1 # CONFIG_PACKAGE_samba4-server is not set # CONFIG_PACKAGE_samba4-utils is not set # CONFIG_PACKAGE_scapy is not set -# CONFIG_PACKAGE_sctp is not set # CONFIG_PACKAGE_sctp-tools is not set # CONFIG_PACKAGE_seafile-ccnet is not set # CONFIG_PACKAGE_seafile-seahub is not set @@ -5966,7 +5988,6 @@ CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL=-1 # CONFIG_PACKAGE_snmp-mibs is not set # CONFIG_PACKAGE_snmp-utils is not set # CONFIG_PACKAGE_snmpd is not set -# CONFIG_PACKAGE_snmpd-static is not set # CONFIG_PACKAGE_snmptrapd is not set # CONFIG_PACKAGE_socat is not set # CONFIG_PACKAGE_softflowd is not set @@ -6136,6 +6157,8 @@ CONFIG_PACKAGE_uboot-envtools=y # CONFIG_PACKAGE_jupp is not set # CONFIG_PACKAGE_mg is not set # CONFIG_PACKAGE_nano is not set +# CONFIG_PACKAGE_nano-full is not set +# CONFIG_PACKAGE_nano-plus is not set # CONFIG_PACKAGE_vim is not set # CONFIG_PACKAGE_vim-full is not set # CONFIG_PACKAGE_vim-fuller is not set @@ -6534,7 +6557,6 @@ CONFIG_PACKAGE_libjson-script=y # CONFIG_PACKAGE_rtl-ais is not set # CONFIG_PACKAGE_rtl-sdr is not set # CONFIG_PACKAGE_rtl_433 is not set -# CONFIG_PACKAGE_sane-backends is not set # CONFIG_PACKAGE_sane-daemon is not set # CONFIG_PACKAGE_sane-frontends is not set # CONFIG_PACKAGE_setserial is not set