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

Merge pull request #242 from Ysurac/develop

sync
This commit is contained in:
suyuan 2022-06-03 16:07:02 +08:00 committed by GitHub
commit fb7398172e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 38 additions and 15 deletions

View file

@ -66,25 +66,27 @@ jobs:
OMR_PORT: ${{ secrets.OMR_PORT }}
run: |
OMR_KERNEL="${OMR_KERNEL}" OMR_FEED_SRC="${SOURCE_NAME}" sh build.sh prepare {tools,toolchain}/install -j$(nproc) || OMR_KERNEL="${OMR_KERNEL}" OMR_FEED_SRC="${SOURCE_NAME}" sh build.sh prepare {tools,toolchain}/install -j1 V=s
#echo -e "${{ secrets.OMR_PRIVKEY }}" > $OMR_TARGET/source/key-build
#echo -e "${{ secrets.OMR_PUBKEY }}" > $OMR_TARGET/source/key-build.pub
#echo -e "${{ secrets.OMR_PRIVKEY }}" > $OMR_TARGET/$OMR_KERNEL/source/key-build
#echo -e "${{ secrets.OMR_PUBKEY }}" > $OMR_TARGET/$OMR_KERNEL/source/key-build.pub
- name: Build packages
working-directory: ../../omr
env:
OMR_TARGET: ${{ matrix.OMR_TARGET }}
OMR_KERNEL: ${{ matrix.OMR_KERNEL }}
run: |
make IGNORE_ERRORS=m -C $OMR_TARGET/source package/{compile,install,index} -j$(nproc) || make IGNORE_ERRORS=m -C $OMR_TARGET/source package/{compile,install,index} -j1 V=s
make IGNORE_ERRORS=m -C $OMR_TARGET/$OMR_KERNEL/source package/{compile,install,index} -j$(nproc) || make IGNORE_ERRORS=m -C $OMR_TARGET/$OMR_KERNEL/source package/{compile,install,index} -j1 V=s
- name: Build image
working-directory: ../../omr
env:
OMR_TARGET: ${{ matrix.OMR_TARGET }}
OMR_KERNEL: ${{ matrix.OMR_KERNEL }}
run: |
make IGNORE_ERRORS=m -C $OMR_TARGET/source target/install -j$(nproc) || make IGNORE_ERRORS=m -C $OMR_TARGET/source target/install -j1 V=s
make IGNORE_ERRORS=m -C $OMR_TARGET/$OMR_KERNEL/source target/install -j$(nproc) || make IGNORE_ERRORS=m -C $OMR_TARGET/$OMR_KERNEL/source target/install -j1 V=s
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.OMR_TARGET }}
path: /home/runner/work/omr/${{ matrix.OMR_TARGET }}/source/bin
path: /home/runner/work/omr/${{ matrix.OMR_TARGET }}/${{ matrix.OMR_KERNEL }}/source/bin
- if: steps.branch_name.outputs.SOURCE_BRANCH == ''
name: Deploy - Create directory
uses: ysurac/ssh-action@master
@ -119,9 +121,10 @@ jobs:
working-directory: ../../omr
env:
OMR_TARGET: ${{ matrix.OMR_TARGET }}
OMR_KERNEL: ${{ matrix.OMR_KERNEL }}
GITHUB_WORKSPACE: ${{ steps.branch_name.outputs.WORKSPACE }}
run: |
mv ${OMR_TARGET}/source/bin ${GITHUB_WORKSPACE}/
mv ${OMR_TARGET}/${OMR_KERNEL}/source/bin ${GITHUB_WORKSPACE}/
- if: steps.branch_name.outputs.SOURCE_BRANCH == ''
name: Deploy - Upload via rsync
uses: ysurac/action-rsync@master

View file

@ -283,6 +283,7 @@ function wizard_add()
local auth = luci.http.formvalue("cbid.network.%s.auth" % intf) or ""
local mode = luci.http.formvalue("cbid.network.%s.mode" % intf) or ""
local sqmenabled = luci.http.formvalue("cbid.sqm.%s.enabled" % intf) or "0"
local qosenabled = luci.http.formvalue("cbid.qos.%s.enabled" % intf) or "0"
local multipath = luci.http.formvalue("cbid.network.%s.multipath" % intf) or "on"
local lan = luci.http.formvalue("cbid.network.%s.lan" % intf) or "0"
local ttl = luci.http.formvalue("cbid.network.%s.ttl" % intf) or ""
@ -463,9 +464,12 @@ function wizard_add()
--ucic:set("sqm",intf,"iqdisc_opts","autorate-ingress dual-dsthost")
--ucic:set("sqm",intf,"eqdisc_opts","dual-srchost")
ucic:set("sqm",intf,"enabled","1")
ucic:set("qos",intf,"enabled","1")
else
ucic:set("sqm",intf,"enabled","0")
end
if qosenabled == "1" then
ucic:set("qos",intf,"enabled","1")
else
ucic:set("qos",intf,"enabled","0")
end
end

View file

@ -478,6 +478,7 @@ set_server_all_routes() {
fi
fi
}
config_load openmptcprouter
config_list_foreach $server ip server_route
}
@ -525,6 +526,7 @@ set_server_all_routes6() {
fi
fi
}
config_load openmptcprouter
config_list_foreach $server ip server_route
}

View file

@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libell
DEPENDS:=+libell @LINUX_5_15
TITLE:=mptcpd
URL:=https://github.com/intel/mptcpd
endef

View file

@ -153,7 +153,7 @@ _ping() {
"${host}" 2>&1
) && echo "$ret" | grep -sq "bytes from" && {
if [ "$localip" = "yes" ]; then
OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1)
OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n')
_update_rto "$OMR_TRACKER_LATENCY"
fi
return
@ -166,7 +166,7 @@ _ping() {
"${host}" 2>&1
) && echo "$ret" | grep -sq "bytes from" && {
if [ "$localip" = "yes" ]; then
OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1)
OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n')
_update_rto "$OMR_TRACKER_LATENCY"
fi
return

View file

@ -82,6 +82,8 @@ _check_master() {
commit v2ray
set glorytun.vpn.host=$ip
commit glorytun
glorytun-udp.vpn.host=$ip
commit glorytun
set dsvpn.vpn.host=$ip
commit dsvpn
set mlvpn.general.host=$ip
@ -98,16 +100,20 @@ _check_master() {
/etc/init.d/openvpn restart >/dev/null 2>/dev/null
/etc/init.d/dsvpn restart >/dev/null 2>/dev/null
fi
else
logger -t "OMR-Tracker-Server" "Master server already up"
fi
config_load shadowsocks-libev
config_foreach _enable_redir ss_redir
count=$((count+1))
else
logger -t "OMR-Tracker-Server" "Master server down"
config_load shadowsocks-libev
config_foreach _disable_redir ss_redir
fi
countips=$((countips+1))
}
config_load openmptcprouter
config_list_foreach $1 ip set_ip
#if [ "$server_ping" = true ] && [ "$countips" = "1" ]; then
# uci -q batch <<-EOF >/dev/null
@ -149,6 +155,8 @@ _check_backup() {
commit v2ray
set glorytun.vpn.host=$ip
commit glorytun
glorytun-udp.vpn.host=$ip
commit glorytun
set dsvpn.vpn.host=$ip
commit dsvpn
set mlvpn.general.host=$ip
@ -176,6 +184,7 @@ _check_backup() {
fi
countips=$((countips+1))
}
config_load openmptcprouter
config_list_foreach $1 ip set_ip
#if [ "$server_ping" = true ] && [ "$countips" = "1" ]; then
# uci -q batch <<-EOF >/dev/null
@ -202,6 +211,7 @@ while true; do
config_load openmptcprouter
config_foreach _check_master server
[ "$server_ping" = false ] && {
config_load openmptcprouter
config_foreach _check_backup server
}
sleep "${interval}"

View file

@ -28,7 +28,7 @@ MY_DEPENDS := \
iperf3-ssl luci-app-iperf \
arptables \
bind-dig \
libnetfilter-conntrack ebtables ebtables-utils ip-full nstat \
libnetfilter-conntrack ip-full nstat \
iptables-mod-iface iptables-mod-ipmark iptables-mod-hashlimit iptables-mod-condition iptables-mod-trace iptables-mod-conntrack-extra iptables-mod-account \
kmod-nf-nat kmod-nf-nathelper kmod-nf-nathelper-extra iptables-mod-extra conntrack \
iptables-mod-ipsec kmod-crypto-authenc kmod-ipsec kmod-ipsec4 kmod-ipsec6 kmod-ipt-ipsec \
@ -78,11 +78,14 @@ MY_DEPENDS := \
!TARGET_mvebu:kmod-usb-net-huawei-cdc-ncm !TARGET_mvebu:kmod-usb-net-rndis !TARGET_mvebu:kmod-usb-net-cdc-ether !TARGET_mvebu:kmod-usb-net-ipheth !TARGET_mvebu:usbmuxd \
kmod-rt2800-usb kmod-rtl8xxxu kmod-rtl8192cu kmod-net-rtl8192su kmod-rtl8812au-ct \
!TARGET_mvebu:luci-proto-qmi wpad-basic kmod-mt7601u kmod-rtl8187 TARGET_r4s:kmod-r8168 (TARGET_x86||TARGET_x86_64):kmod-usb-net-rtl8152 \
luci-app-mlvpn mlvpn 464xlat !TARGET_mvebu:kmod-usb-net-smsc75xx kmod-zram kmod-swconfig swconfig kmod-ipt-nat kmod-ipt-nat6 luci-app-https-dns-proxy kmod-tcp-nanqinlang (TARGET_x86_64||aarch64):kmod-tcp-bbr2 iptables-mod-ipopt igmpproxy ss iptraf-ng \
luci-app-mlvpn mlvpn 464xlat kmod-zram kmod-swconfig swconfig kmod-ipt-nat kmod-ipt-nat6 luci-app-https-dns-proxy kmod-tcp-nanqinlang (TARGET_x86_64||aarch64):kmod-tcp-bbr2 iptables-mod-ipopt igmpproxy ss iptraf-ng \
luci-app-acl block-mount blockd fstools luci-app-shutdown libwebp luci-proto-gre tcptraceroute luci-proto-mbim kmod-rtl8xxxu kmod-ath9k-htc luci-app-ttyd luci-mod-dashboard (TARGET_x86||TARGET_x86_64):rtl8192eu-firmware kmod-usb2 libustream-openssl (TARGET_x86||TARGET_x86_64):kmod-ixgbevf (TARGET_x86||TARGET_x86_64):kmod-igbvf \
hwinfo (TARGET_x86||TARGET_x86_64):dmidecode luci-app-packet-capture kmod-bonding luci-proto-bonding luci-app-sysupgrade \
luci-theme-openwrt-2020 luci-proto-wireguard luci-app-wireguard (TARGET_x86||TARGET_x86_64):kmod-r8125 TARGET_x86_64:kmod-atlantic \
mptcpd
luci-theme-openwrt-2020 luci-proto-wireguard luci-app-wireguard kmod-crypto-lib-blake2s (TARGET_x86||TARGET_x86_64):kmod-r8125 TARGET_x86_64:kmod-atlantic \
LINUX_5_15:mptcpd (TARGET_x86||TARGET_x86_64):kmod-igc kmod-mmc-spi kmod-macsec
# !TARGET_mvebu:kmod-usb-net-smsc75xx
# libnetfilter-conntrack ebtables ebtables-utils ip-full nstat \
# luci-theme-bootstrap luci-theme-openwrt-2020 luci-theme-openwrt luci-app-status
# luci-proto-bonding luci-app-statistics luci-proto-gre
# softethervpn5-client softethervpn5-server luci-app-nginx-ha

View file

@ -60,7 +60,8 @@ GO_PKG:=github.com/v2fly/v2ray-core/v4
GO_PKG_LDFLAGS:=-s -w
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
#include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
include $(TOPDIR)/feeds/openmptcprouter/golang/golang-package.mk
define Package/v2ray-core
TITLE:=A platform for building proxies