mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Merge branch 'test' into qsdk
This commit is contained in:
commit
3207ddd8eb
7 changed files with 43 additions and 25 deletions
41
.github/workflows/main.yml
vendored
Executable file → Normal file
41
.github/workflows/main.yml
vendored
Executable file → Normal file
|
@ -2,13 +2,13 @@ name: openmptcprouter
|
|||
on: [push]
|
||||
|
||||
env:
|
||||
REPO_URL: 'https://github.com/suyuan168/3grouter'
|
||||
REPO_URL: 'https://github.com/ysurac/openmptcprouter'
|
||||
|
||||
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, rutx, l1000, zbt4019]
|
||||
OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx, r4s, r7800, rutx]
|
||||
OMR_KERNEL: [5.4, 5.15]
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
|
@ -39,7 +39,7 @@ jobs:
|
|||
- name: Clone source code
|
||||
working-directory: ../../
|
||||
env:
|
||||
REPO_URL: https://github.com/suyuan168/3grouter
|
||||
REPO_URL: https://github.com/ysurac/openmptcprouter
|
||||
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }}
|
||||
GITHUB_WORKSPACE: ${{ steps.branch_name.outputs.WORKSPACE }}
|
||||
run: |
|
||||
|
@ -58,7 +58,7 @@ jobs:
|
|||
- name: Build toolchain
|
||||
working-directory: ../../omr
|
||||
env:
|
||||
OMR_FEED_URL: https://github.com/suyuan168/openmptcprouter-feeds
|
||||
OMR_FEED_URL: https://github.com/ysurac/openmptcprouter-feeds
|
||||
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }}
|
||||
OMR_TARGET: ${{ matrix.OMR_TARGET }}
|
||||
OMR_KERNEL: ${{ matrix.OMR_KERNEL }}
|
||||
|
@ -66,27 +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: |
|
||||
cat "feeds/openmptcprouter/openmptcprouter/files/etc/init.d/getserveratboot"
|
||||
sudo rm -rf "feeds/openmptcprouter/openmptcprouter/files/etc/init.d/getserveratboot" >/dev/null 2>&1 || true
|
||||
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
|
||||
|
@ -96,9 +96,9 @@ jobs:
|
|||
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
|
||||
with:
|
||||
command: |
|
||||
mkdir -p /www/wwwroot/55860.com/bak/down/release/${{env.SOURCE_TAG}}/${{matrix.OMR_TARGET}}
|
||||
mkdir -p deploy/release/${{env.SOURCE_TAG}}/${{matrix.OMR_TARGET}}
|
||||
host: ${{ secrets.OMR_DEPLOY_HOST }}
|
||||
user: root
|
||||
user: deploy
|
||||
port: ${{ secrets.OMR_DEPLOY_PORT }}
|
||||
key: ${{ secrets.PRIVATE_KEY }}
|
||||
args: -tt
|
||||
|
@ -111,9 +111,9 @@ jobs:
|
|||
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
|
||||
with:
|
||||
command: |
|
||||
mkdir -p /www/wwwroot/55860.com/bak/down/${{env.SOURCE_BRANCH}}/${{matrix.OMR_KERNEL}}/${{matrix.OMR_TARGET}}
|
||||
mkdir -p deploy/${{env.SOURCE_BRANCH}}/${{matrix.OMR_KERNEL}}/${{matrix.OMR_TARGET}}
|
||||
host: ${{ secrets.OMR_DEPLOY_HOST }}
|
||||
user: root
|
||||
user: deploy
|
||||
port: ${{ secrets.OMR_DEPLOY_PORT }}
|
||||
key: ${{ secrets.PRIVATE_KEY }}
|
||||
args: -tt
|
||||
|
@ -121,18 +121,19 @@ 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
|
||||
env:
|
||||
ARGS: -av --delete-after
|
||||
TARGET: /www/wwwroot/55860.com/bak/down/release/${{steps.branch_name.outputs.SOURCE_TAG}}/${{matrix.OMR_TARGET}}
|
||||
TARGET: deploy/release/${{steps.branch_name.outputs.SOURCE_TAG}}/${{matrix.OMR_TARGET}}
|
||||
SOURCE: ./bin/
|
||||
KEY: ${{ secrets.PRIVATE_KEY }}
|
||||
USER: root
|
||||
USER: deploy
|
||||
HOST: ${{ secrets.OMR_DEPLOY_HOST }}
|
||||
PORT: ${{ secrets.OMR_DEPLOY_PORT }}
|
||||
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }}
|
||||
|
@ -144,10 +145,10 @@ jobs:
|
|||
uses: ysurac/action-rsync@master
|
||||
env:
|
||||
ARGS: -av --delete-after
|
||||
TARGET: /www/wwwroot/55860.com/bak/down/${{ steps.branch_name.outputs.SOURCE_BRANCH }}/${{matrix.OMR_KERNEL}}/${{matrix.OMR_TARGET}}
|
||||
TARGET: deploy/${{ steps.branch_name.outputs.SOURCE_BRANCH }}/${{matrix.OMR_KERNEL}}/${{matrix.OMR_TARGET}}
|
||||
SOURCE: ./bin/
|
||||
KEY: ${{ secrets.PRIVATE_KEY }}
|
||||
USER: root
|
||||
USER: deploy
|
||||
HOST: ${{ secrets.OMR_DEPLOY_HOST }}
|
||||
PORT: ${{ secrets.OMR_DEPLOY_PORT }}
|
||||
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -145,7 +145,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
|
||||
|
@ -158,7 +158,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
|
||||
|
|
|
@ -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}"
|
||||
|
|
|
@ -59,7 +59,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue