mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2026-02-03 00:00:38 +03:00
Compare commits
7 Commits
v72.202601
...
v72.202602
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3652a55f17 | ||
|
|
a3e435f752 | ||
|
|
13b0f7e634 | ||
|
|
dd7f797898 | ||
|
|
fdf19d24c8 | ||
|
|
4cccfa7917 | ||
|
|
2e4b55def5 |
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -155,7 +155,6 @@ jobs:
|
|||||||
- mipsel_24kc_24kf
|
- mipsel_24kc_24kf
|
||||||
- mipsel_74kc
|
- mipsel_74kc
|
||||||
- mipsel_mips32
|
- mipsel_mips32
|
||||||
- riscv64_riscv64
|
|
||||||
- riscv64_generic
|
- riscv64_generic
|
||||||
- x86_64
|
- x86_64
|
||||||
isTestOrFake:
|
isTestOrFake:
|
||||||
@@ -165,8 +164,6 @@ jobs:
|
|||||||
arch: arm_cortex-a9_vfpv3-d16
|
arch: arm_cortex-a9_vfpv3-d16
|
||||||
- branch: ${{ needs.var.outputs.APK_BRANCH }}
|
- branch: ${{ needs.var.outputs.APK_BRANCH }}
|
||||||
arch: mips_4kec
|
arch: mips_4kec
|
||||||
- branch: ${{ needs.var.outputs.APK_BRANCH }}
|
|
||||||
arch: riscv64_riscv64
|
|
||||||
- branch: ${{ needs.var.outputs.IPK_BRANCH }}
|
- branch: ${{ needs.var.outputs.IPK_BRANCH }}
|
||||||
arch: riscv64_generic
|
arch: riscv64_generic
|
||||||
- { isTestOrFake: true }
|
- { isTestOrFake: true }
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-zapret
|
PKG_NAME:=luci-app-zapret
|
||||||
PKG_VERSION:=72.20260131
|
PKG_VERSION:=72.20260202
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
PKG_MAINTAINER:=remittor <https://github.com/remittor>
|
PKG_MAINTAINER:=remittor <https://github.com/remittor>
|
||||||
|
|||||||
@@ -783,47 +783,78 @@ return baseclass.extend({
|
|||||||
const logFile = log; // file for reading: '/tmp/zapret_pkg_install.log'
|
const logFile = log; // file for reading: '/tmp/zapret_pkg_install.log'
|
||||||
const rcFile = logFile + '.rc';
|
const rcFile = logFile + '.rc';
|
||||||
try {
|
try {
|
||||||
await fs.exec('/bin/busybox', [ 'rm', '-f', logFile + '*' ], null);
|
await fs.exec('/bin/busybox', [ 'rm', '-f', logFile ], null);
|
||||||
appendLog('Output file cleared!');
|
await fs.exec('/bin/busybox', [ 'rm', '-f', rcFile ], null);
|
||||||
|
//appendLog('Output file cleared!');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return callback.call(ctx, 500, 'ERROR: Failed to clear output file');
|
return callback.call(ctx, 500, 'ERROR: Failed to clear output file');
|
||||||
}
|
}
|
||||||
let processStarted = false;
|
let execRetCode = -1;
|
||||||
let opt_list = [ logFile ];
|
let opt_list = [ logFile ];
|
||||||
try {
|
try {
|
||||||
opt_list.push(...cmd);
|
opt_list.push(...cmd);
|
||||||
//console.log('script-exec.sh ... '+JSON.stringify(opt_list));
|
//console.log('script-exec.sh ... '+JSON.stringify(opt_list));
|
||||||
let proc = new Promise((resolve) => {
|
fs.exec(this.appDir+'/script-exec.sh', opt_list, null)
|
||||||
fs.exec(this.appDir+'/script-exec.sh', opt_list, null)
|
.then( (res) => {
|
||||||
.then (() => { resolve(); })
|
if (execRetCode < 0) {
|
||||||
.catch(() => { resolve(); });
|
execRetCode = res.code;
|
||||||
|
fixLogEnd();
|
||||||
|
if (res.code == 0) {
|
||||||
|
appendLog('Process started....');
|
||||||
|
} else {
|
||||||
|
if (res.stdout) appendLog(res.stdout);
|
||||||
|
appendLog('ERROR: process not executed! ret_code = '+res.code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch( (e) => {
|
||||||
|
console.log('ERROR: execAndRead: process not exec: '+e.message);
|
||||||
|
execRetCode = -100;
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return callback.call(ctx, 520, 'ERROR: Failed on execute process: ' + e.message);
|
return callback.call(ctx, 520, 'ERROR: Failed on execute process: ' + e.message);
|
||||||
}
|
}
|
||||||
let lastLen = 0;
|
let lastLen = 0;
|
||||||
let retCode = -1;
|
let retCode = -2; // rc file not found
|
||||||
return await new Promise(async (resolve, reject) => {
|
return await new Promise(async (resolve, reject) => {
|
||||||
let ticks = 0;
|
let ticks = 0;
|
||||||
async function epoll()
|
async function epoll()
|
||||||
{
|
{
|
||||||
ticks += 1;
|
ticks += 1;
|
||||||
try {
|
try {
|
||||||
|
if (retCode < 0) {
|
||||||
|
let rc = await fs.exec('/bin/cat', [ rcFile ], null);
|
||||||
|
if (rc.code != 0) {
|
||||||
|
if (ticks >= 2) {
|
||||||
|
console.log('ERROR: execAndRead: '+JSON.stringify(opt_list));
|
||||||
|
fixLogEnd();
|
||||||
|
resolve(callback.call(ctx, 542, 'ERROR: Failed on read process rc-file: code = ' + rc.code));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log('WARN: execAndRead: read rc-file res.code = '+rc.code);
|
||||||
|
}
|
||||||
|
if (rc.code == 0) {
|
||||||
|
if (rc.stdout) {
|
||||||
|
retCode = parseInt(rc.stdout.trim(), 10);
|
||||||
|
} else {
|
||||||
|
retCode = -1; // rc file exists, but empty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (retCode <= -2) {
|
||||||
|
setTimeout(epoll, 500);
|
||||||
|
return; // skip first step with error
|
||||||
|
}
|
||||||
|
}
|
||||||
let res = await fs.exec('/bin/cat', [ logFile ], null);
|
let res = await fs.exec('/bin/cat', [ logFile ], null);
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
if (ticks > 1) {
|
fixLogEnd();
|
||||||
console.log('ERROR: execAndRead: '+JSON.stringify(opt_list));
|
resolve(callback.call(ctx, 546, 'ERROR: Failed on read process log: code = ' + res.code));
|
||||||
resolve(callback.call(ctx, 541, 'ERROR: Failed on read process log: code = ' + res.code));
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
setTimeout(epoll, 500);
|
|
||||||
return; // skip first step with error
|
|
||||||
}
|
}
|
||||||
if (!processStarted) {
|
if (execRetCode < 0) {
|
||||||
|
execRetCode = 9999;
|
||||||
appendLog('Process started...');
|
appendLog('Process started...');
|
||||||
processStarted = true;
|
|
||||||
}
|
}
|
||||||
if (res.stdout && res.stdout.length > lastLen) {
|
if (res.code == 0 && res.stdout && res.stdout.length > lastLen) {
|
||||||
let log = res.stdout.slice(lastLen);
|
let log = res.stdout.slice(lastLen);
|
||||||
hide_rows.forEach(re => {
|
hide_rows.forEach(re => {
|
||||||
log = log.replace(re, '');
|
log = log.replace(re, '');
|
||||||
@@ -831,17 +862,6 @@ return baseclass.extend({
|
|||||||
appendLog(log, '');
|
appendLog(log, '');
|
||||||
lastLen = res.stdout.length;
|
lastLen = res.stdout.length;
|
||||||
}
|
}
|
||||||
if (retCode < 0) {
|
|
||||||
let rc = await fs.exec('/bin/cat', [ rcFile ], null);
|
|
||||||
if (rc.code != 0) {
|
|
||||||
fixLogEnd();
|
|
||||||
resolve(callback.call(ctx, 545, 'ERROR: cannot read file "' + rcFile + '"'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (rc.stdout) {
|
|
||||||
retCode = parseInt(rc.stdout.trim(), 10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (retCode >= 0) {
|
if (retCode >= 0) {
|
||||||
fixLogEnd();
|
fixLogEnd();
|
||||||
if (retCode == 0 && res.stdout) {
|
if (retCode == 0 && res.stdout) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=zapret
|
PKG_NAME:=zapret
|
||||||
PKG_VERSION:=72.20260131
|
PKG_VERSION:=72.20260202
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=bol-van
|
PKG_MAINTAINER:=bol-van
|
||||||
@@ -15,7 +15,7 @@ PKG_LICENSE_FILES:=docs/LICENSE.txt
|
|||||||
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
|
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_VERSION:=119e243b3664d6a512ed8b6ab61dcba00987105c
|
PKG_SOURCE_VERSION:=119e243b3664d6a512ed8b6ab61dcba00987105c
|
||||||
PKG_SOURCE_DATE:=2026-01-31
|
PKG_SOURCE_DATE:=2026-02-02
|
||||||
|
|
||||||
#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
#PKG_SOURCE_URL:=https://github.com/bol-van/zapret/archive/refs/tags/v$(PKG_VERSION).tar.gz?
|
#PKG_SOURCE_URL:=https://github.com/bol-van/zapret/archive/refs/tags/v$(PKG_VERSION).tar.gz?
|
||||||
|
|||||||
@@ -316,10 +316,11 @@ function set_cfg_nfqws_strat
|
|||||||
--dpi-desync=fake,multisplit
|
--dpi-desync=fake,multisplit
|
||||||
--dpi-desync-split-seqovl=654
|
--dpi-desync-split-seqovl=654
|
||||||
--dpi-desync-split-pos=1
|
--dpi-desync-split-pos=1
|
||||||
--dpi-desync-fooling=ts
|
--dpi-desync-fooling=badseq,badsum
|
||||||
--dpi-desync-repeats=8
|
--dpi-desync-repeats=8
|
||||||
--dpi-desync-split-seqovl-pattern=/opt/zapret/files/fake/max.bin
|
--dpi-desync-split-seqovl-pattern=/opt/zapret/files/fake/max.bin
|
||||||
--dpi-desync-fake-tls=/opt/zapret/files/fake/max.bin
|
--dpi-desync-fake-tls=/opt/zapret/files/fake/max.bin
|
||||||
|
--dpi-desync-badseq-increment=0
|
||||||
|
|
||||||
--new
|
--new
|
||||||
--filter-udp=443 <HOSTLIST_NOAUTO>
|
--filter-udp=443 <HOSTLIST_NOAUTO>
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ if [ "$opt_sites" = true ]; then
|
|||||||
lkfl2.nalog.ru | | | https://lkfl2.nalog.ru/lkfl/static/assets/main-desktop-1920-CvJsHANg.jpg
|
lkfl2.nalog.ru | | | https://lkfl2.nalog.ru/lkfl/static/assets/main-desktop-1920-CvJsHANg.jpg
|
||||||
rutube.ru | @ | 40000 | https://static.rutube.ru/static/wdp/fonts/Semibold/OpenSans-Semibold.woff2?20231026
|
rutube.ru | @ | 40000 | https://static.rutube.ru/static/wdp/fonts/Semibold/OpenSans-Semibold.woff2?20231026
|
||||||
youtube.com | @# | 300000 | https://youtube.com
|
youtube.com | @# | 300000 | https://youtube.com
|
||||||
|
googlevideo.com | | 210000 | https://redirector.googlevideo.com/report_mapping
|
||||||
instagram.com | @# | 300000 | https://instagram.com
|
instagram.com | @# | 300000 | https://instagram.com
|
||||||
rutracker.org | @# | 80000 | https://rutracker.org
|
rutracker.org | @# | 80000 | https://rutracker.org
|
||||||
nnmclub.to | @# | 120000 | https://nnmclub.to
|
nnmclub.to | @# | 120000 | https://nnmclub.to
|
||||||
|
|||||||
@@ -323,4 +323,14 @@ windowsupdate.com
|
|||||||
microsoftonline.com
|
microsoftonline.com
|
||||||
microsoftonline-p.com
|
microsoftonline-p.com
|
||||||
minecraftservices.com
|
minecraftservices.com
|
||||||
|
#################################### Arknights: Endfield
|
||||||
|
skport.com
|
||||||
|
hg-cdn.com
|
||||||
|
helpshift.com
|
||||||
|
gryphline.com
|
||||||
|
#################################### Samsung
|
||||||
|
samsungosp.com
|
||||||
|
samsungqbe.com
|
||||||
|
amazontrust.com
|
||||||
|
samsungcloudsolution.com
|
||||||
####################################
|
####################################
|
||||||
|
|||||||
@@ -1,22 +1,37 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2024 remittor
|
# Copyright (c) 2024 remittor
|
||||||
PID_FILE=/tmp/zapret-script-exec.pid
|
PID_FILE=/tmp/zapret-script-exec.pid
|
||||||
[ -f $PID_FILE ] && exit 70
|
if [ -f $PID_FILE ]; then
|
||||||
|
echo "ERROR: file $PID_FILE already exists!" | awk 'NR==1'
|
||||||
|
exit 70
|
||||||
|
fi
|
||||||
LOG_FILE=$1
|
LOG_FILE=$1
|
||||||
RC_FILE=$1.rc
|
RC_FILE=$1.rc
|
||||||
SH_FILE=$2
|
SH_FILE=$2
|
||||||
shift 2
|
shift 2
|
||||||
[ ! -f $SH_FILE ] && exit 71
|
if [ ! -e $SH_FILE ]; then
|
||||||
: > $LOG_FILE
|
echo "ERROR: script $SH_FILE not found!" | awk 'NR==1'
|
||||||
: > $RC_FILE
|
exit 71
|
||||||
|
fi
|
||||||
|
if [ ! -x $SH_FILE ]; then
|
||||||
|
echo "ERROR: script $SH_FILE not Found!" | awk 'NR==1'
|
||||||
|
exit 72
|
||||||
|
fi
|
||||||
start-stop-daemon -S -b -p $PID_FILE -x /bin/sh -- -c '
|
start-stop-daemon -S -b -p $PID_FILE -x /bin/sh -- -c '
|
||||||
LOG_FILE=$1
|
LOG_FILE=$1
|
||||||
RC_FILE=$2
|
RC_FILE=$2
|
||||||
SH_FILE=$3
|
SH_FILE=$3
|
||||||
shift 3
|
shift 3
|
||||||
sh $SH_FILE "$@" > $LOG_FILE 2>&1
|
printf "" > $LOG_FILE
|
||||||
|
printf "" > $RC_FILE
|
||||||
|
$SH_FILE "$@" >> $LOG_FILE 2>&1
|
||||||
RET_CODE=$?
|
RET_CODE=$?
|
||||||
sleep 1
|
|
||||||
echo $RET_CODE > $RC_FILE
|
echo $RET_CODE > $RC_FILE
|
||||||
' sh $LOG_FILE $RC_FILE $SH_FILE "$@"
|
' sh $LOG_FILE $RC_FILE $SH_FILE "$@"
|
||||||
|
RET_CODE=$?
|
||||||
|
if [ $RET_CODE != 0 ]; then
|
||||||
|
echo "ERROR: script $SH_FILE not executed! ret_code = $RET_CODE" | awk 'NR==1'
|
||||||
|
exit $RET_CODE
|
||||||
|
fi
|
||||||
|
echo "Script $SH_FILE running..." | awk 'NR==1'
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user