Skip to content

Commit

Permalink
sfe in
Browse files Browse the repository at this point in the history
update
Update Build-Machine-Single-2410.yml
  • Loading branch information
lunatickochiya committed Feb 12, 2025
1 parent 28d72a0 commit e76200d
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 10 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/Build-Machine-Single-2410.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ on:
options:
- 'true'
- 'false'
SFE_BUILDIN:
description: 'Build sfe'
default: 'true'
type: choice
options:
- 'true'
- 'false'
# TEST-KERNEL:
# description: 'Use kernel 6.1'
# default: 'false'
Expand Down Expand Up @@ -208,19 +215,17 @@ jobs:
#if [ ${{github.event.inputs.TEST-KERNEL}} = true ]; then
#echo "Kernel_Test=_Kernel_Test_Ver" >> $GITHUB_ENV
#fi
chmod +x $DIY_SH $DIY_SH_AFB $DIY_SH_RFC gen-sha256sum.sh add-test-packages.sh
chmod +x $DIY_SH $DIY_SH_AFB $DIY_SH_RFC gen-sha256sum.sh add-test-packages.sh add-sfe-packages.sh
- name: 导入机器及安装包config
run: |
if [ ${{github.event.inputs.TEST-KERNEL}} = true ]; then
$GITHUB_WORKSPACE/$DIY_SH add-test-config
fi
if [ ${{matrix.target}} == 'mt798x-nftables' ] || [ ${{ matrix.target }} == 'mt798x-nousb-nftables' ] || [ ${{ matrix.target }} == 'ramips-nftables' ] || [ ${{ matrix.target }} == 'ath79-nftables' ]; then
bash $GITHUB_WORKSPACE/add-test-packages.sh nft
echo "----${{matrix.target}}-----NFT-test---"
fi
if [ ${{matrix.target}} == 'mt798x-iptables' ] || [ ${{ matrix.target }} == 'mt798x-nousb-iptables' ] || [ ${{ matrix.target }} == 'ramips-iptables' ] || [ ${{ matrix.target }} == 'ath79-iptables' ]; then
mv -f machine-configs/single/${{github.event.inputs.MACH}}-iptables.config machine-configs/${{matrix.target}}.config
echo "----${{matrix.target}}-----IPT-Machine--------"
Expand Down Expand Up @@ -294,6 +299,30 @@ jobs:
fi
echo "status=success" >> $GITHUB_OUTPUT
- name: 添加 SFE
if: github.event.inputs.SFE_BUILDIN == 'true'
id: sfe
run: |
if [ ${{matrix.target}} == 'mt798x-iptables' ] || [ ${{ matrix.target }} == 'mt798x-nousb-iptables' ] || [ ${{ matrix.target }} == 'ramips-iptables' ] || [ ${{ matrix.target }} == 'ath79-iptables' ]; then
bash $GITHUB_WORKSPACE/add-sfe-packages.sh ipt
echo "----${{matrix.target}}-----ipt-sfe---"
cd openwrt
wget -N https://raw.githubusercontent.com/chenmozhijin/turboacc/refs/heads/package/pending-6.6/613-netfilter_optional_tcp_window_check.patch -P target/linux/generic/pending-6.6/
wget -N https://raw.githubusercontent.com/chenmozhijin/turboacc/refs/heads/package/hack-6.6/952-add-net-conntrack-events-support-multiple-registrant.patch -P target/linux/generic/hack-6.6/
wget -N https://raw.githubusercontent.com/chenmozhijin/turboacc/refs/heads/package/hack-6.6/953-net-patch-linux-kernel-to-support-shortcut-fe.patch -P target/linux/generic/hack-6.6/
echo "# CONFIG_NF_CONNTRACK_CHAIN_EVENTS is not set" >> "./target/linux/generic/config-6.6"
echo "# CONFIG_SHORTCUT_FE is not set" >> "./target/linux/generic/config-6.6"
git clone https://github.com/lunatickochiya/luci-app-turboacc-js package/luci-app-turboacc-js
rm -rf package/luci-app-turboacc-js/.git/
git clone --depth=1 --single-branch --branch "package" https://github.com/chenmozhijin/turboacc && mv -n turboacc/shortcut-fe ./package ; rm -rf turboacc
cd ../
fi
sed -i 's/kmod-shortcut-fe-cm,kmod-shortcut-fe,kmod-fast-classifier,kmod-fast-classifier-noload,kmod-shortcut-fe-drv,//g' package-configs/kmod_exclude_list*
# sed -i 's/"feeds\/lunatic7\/shortcut-fe"//g' diy-2410.sh
# sed -i 's/"feeds\/lunatic7\/luci-app-turboacc"//g' diy-2410.sh
echo "status=success" >> $GITHUB_OUTPUT
- name: 自定义安装包(优先于feeds)
if: steps.clone.outputs.status == 'success'
id: files
Expand Down
45 changes: 45 additions & 0 deletions add-sfe-packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
#=================================================
# this script is from https://github.com/lunatickochiya/Lunatic-s805-rockchip-Action
# Written By lunatickochiya
# QQ group :286754582 https://jq.qq.com/?_wv=1027&k=5QgVYsC
#=================================================
function add_nft_config() {
for file in package-configs/single/*-nftables.config; do echo "# ADD TURBOACC
CONFIG_PACKAGE_luci-app-turboacc=y
CONFIG_PACKAGE_luci-app-turboacc_INCLUDE_PDNSD=n
#offload
CONFIG_PACKAGE_kmod-nft-offload=y
# sfe
CONFIG_PACKAGE_kmod-fast-classifier=y
CONFIG_PACKAGE_kmod-shortcut-fe=y
CONFIG_PACKAGE_kmod-shortcut-fe-cm=n
CONFIG_PACKAGE_kmod-nft-fullcone=y
" >> "$file"; done
}

function add_ipt_config() {
for file in package-configs/single/*-iptables.config; do echo "# ADD TURBOACC
CONFIG_PACKAGE_luci-app-turboacc=y
CONFIG_PACKAGE_luci-app-turboacc_INCLUDE_PDNSD=n
CONFIG_PACKAGE_luci-app-fullconenat=y
#offload
CONFIG_PACKAGE_kmod-ipt-offload=y
# sfe
CONFIG_PACKAGE_kmod-fast-classifier=y
CONFIG_PACKAGE_kmod-shortcut-fe=y
CONFIG_PACKAGE_kmod-shortcut-fe-cm=n
" >> "$file"; done
}

if [ "$1" == "nft" ]; then
add_nft_config
elif [ "$1" == "ipt" ]; then
add_ipt_config
else
echo "Invalid argument"
fi
11 changes: 4 additions & 7 deletions add-test-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ function add_nft_config() {
for file in package-configs/single/*-nftables.config; do echo "# ADD TURBOACC
CONFIG_PACKAGE_luci-app-turboacc=y
# iptable legacy in nft
CONFIG_PACKAGE_ip6tables-zz-legacy=y
CONFIG_PACKAGE_iptables-zz-legacy=y
# sfe
CONFIG_PACKAGE_kmod-fast-classifier=m
CONFIG_PACKAGE_kmod-shortcut-fe=m
CONFIG_PACKAGE_kmod-shortcut-fe-cm=m
CONFIG_PACKAGE_kmod-fast-classifier=y
CONFIG_PACKAGE_kmod-shortcut-fe=y
CONFIG_PACKAGE_kmod-shortcut-fe-cm=n
CONFIG_PACKAGE_kmod-nft-fullcone=y
" >> "$file"; done
}

Expand Down

0 comments on commit e76200d

Please sign in to comment.