Compare commits

...

16 Commits

Author SHA1 Message Date
remittor
3652a55f17 Bump version to v72.20260202 2026-02-02 13:32:39 +03:00
remittor
a3e435f752 ipset: Update zapret-hosts-user-exclude.txt 2026-02-02 12:43:55 +03:00
remittor
13b0f7e634 config: Fix for v7_by_StressOzz 2026-02-02 12:42:49 +03:00
remittor
dd7f797898 diag: Add check googlevideo.com 2026-02-02 12:37:55 +03:00
remittor
fdf19d24c8 luci: Fix func execAndRead 2026-02-01 13:05:32 +03:00
remittor
4cccfa7917 executor: Fix error "XHR request timed out" 2026-01-31 21:26:58 +03:00
remittor
2e4b55def5 build: Delete arch riscv64_riscv64 2026-01-31 17:05:23 +03:00
remittor
b949b2af81 Bump version to v72.20260131 2026-01-31 16:56:28 +03:00
remittor
a99b8ae13b diag: dwc: Update DPI check suites 2026-01-31 16:54:28 +03:00
remittor
0dead01ffa updater: Fix error "XHR request timed out" 2026-01-31 16:50:21 +03:00
remittor
85a07b1ff0 luci: Fix buttons on modal dialogues 2026-01-31 13:17:57 +03:00
remittor
c5ecd94b9b luci: service: Stop update status when modal dialog active 2026-01-31 13:13:30 +03:00
remittor
57a85c8a68 updater: Add retry for package download 2026-01-29 21:35:06 +03:00
remittor
21536aee23 makefile: Fix check for installed packages 2026-01-29 21:14:38 +03:00
remittor
8c070b162e diag: dwc: Update DPI check suites 2026-01-29 19:28:10 +03:00
remittor
788dc60586 build: Replace CONFIG_LUCI_CSSMIN to CONFIG_LUCI_CSSTIDY 2026-01-29 14:10:54 +03:00
12 changed files with 172 additions and 77 deletions

View File

@@ -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 }
@@ -276,8 +273,8 @@ jobs:
run: | run: |
make defconfig make defconfig
sed -i 's/CONFIG_LUCI_JSMIN=y/CONFIG_LUCI_JSMIN=n/g' .config sed -i 's/CONFIG_LUCI_JSMIN=y/CONFIG_LUCI_JSMIN=n/g' .config
sed -i 's/CONFIG_LUCI_CSSMIN=y/CONFIG_LUCI_CSSMIN=n/g' .config sed -i 's/CONFIG_LUCI_CSSTIDY=y/CONFIG_LUCI_CSSTIDY=n/g' .config
grep -q '^CONFIG_LUCI_CSSMIN=' .config || echo 'CONFIG_LUCI_CSSMIN=n' >> .config grep -q '^CONFIG_LUCI_CSSTIDY=' .config || echo 'CONFIG_LUCI_CSSTIDY=n' >> .config
echo "status=success" >> $GITHUB_OUTPUT echo "status=success" >> $GITHUB_OUTPUT
- name: Show config - name: Show config

View File

@@ -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.20260128 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>

View File

@@ -158,13 +158,17 @@ return baseclass.extend({
E('br'), E('br'), E('br'), E('br'),
this.logArea, this.logArea,
]), ]),
E('div', { 'class': 'right' }, [ E('div', { 'style': 'display:flex; justify-content:space-between; align-items:center; margin-top:1px;' }, [
E('div', { 'class': 'left' }, [
this.btn_sitescheck, this.btn_sitescheck,
' ', ' ',
this.btn_dpicheck, this.btn_dpicheck,
]),
E('div', { 'class': 'right' }, [
' ', ' ',
this.btn_cancel, this.btn_cancel,
]) ]),
]),
]); ]);
} }
}); });

View File

@@ -175,6 +175,10 @@ return view.extend({
statusPoll: function() statusPoll: function()
{ {
if (tools.isModalActive()) {
this.POLL.running = false;
return; // not update page when any modal dialog is active
}
this.getAppStatus().then( this.getAppStatus().then(
L.bind(this.setAppStatus, this) L.bind(this.setAppStatus, this)
); );
@@ -228,6 +232,7 @@ return view.extend({
let cancel_button = E('button', { let cancel_button = E('button', {
'class': btn_style_neutral, 'class': btn_style_neutral,
'click': ui.hideModal, 'click': ui.hideModal,
'class': btn_style_warning,
}, _('Cancel')); }, _('Cancel'));
let resetcfg_btn = E('button', { let resetcfg_btn = E('button', {
@@ -277,11 +282,14 @@ return view.extend({
nfqws_strat, nfqws_strat,
E('br'), E('br') E('br'), E('br')
]), ]),
E('div', { 'style': 'display:flex; justify-content:space-between; align-items:center; margin-top:1px;' }, [
E('div', { 'class': 'left' }, [
resetcfg_btn,
]),
E('div', { 'class': 'right' }, [ E('div', { 'class': 'right' }, [
cancel_button, cancel_button,
' ', ]),
resetcfg_btn, ]),
])
]); ]);
}, },

View File

@@ -761,7 +761,12 @@ return baseclass.extend({
}, },
}), }),
execAndRead: async function({ cmd = [ ], log = '', logArea = null, callback = null, ctx = null, hiderow = [ ], rpc_timeout = 5, rpc_root = false } = {}) isModalActive: function()
{
return document.body.classList.contains('modal-overlay-active');
},
execAndRead: async function({ cmd = [ ], log = '', logArea = null, callback = null, ctx = null, hiderow = [ ] } = {})
{ {
function appendLog(msg, end = '\n') function appendLog(msg, end = '\n')
{ {
@@ -775,37 +780,81 @@ return baseclass.extend({
} }
} }
let hide_rows = Array.isArray(hiderow) ? hiderow : [ hiderow ]; let hide_rows = Array.isArray(hiderow) ? hiderow : [ hiderow ];
let rpc_opt = { "timeout": rpc_timeout*1000 };
if (rpc_root) {
rpc_opt.uid = 0; // run under root
}
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, rpc_opt); 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');
} }
try { let execRetCode = -1;
let opt_list = [ logFile ]; let opt_list = [ logFile ];
try {
opt_list.push(...cmd); opt_list.push(...cmd);
let res = await fs.exec(this.appDir+'/script-exec.sh', opt_list, null, rpc_opt); //console.log('script-exec.sh ... '+JSON.stringify(opt_list));
if (res.code != 0) { fs.exec(this.appDir+'/script-exec.sh', opt_list, null)
return callback.call(ctx, 525, 'ERROR: cannot run "' + cmd[0] + '" script! (error = ' + res.code + ')'); .then( (res) => {
if (execRetCode < 0) {
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);
} }
appendLog('Process started...'); }
}).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;
async function epoll() async function epoll()
{ {
ticks += 1;
try { try {
let res = await fs.exec('/bin/cat', [ logFile ], null, rpc_opt); if (retCode < 0) {
if (res.stdout && res.stdout.length > lastLen) { 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);
if (res.code != 0) {
fixLogEnd();
resolve(callback.call(ctx, 546, 'ERROR: Failed on read process log: code = ' + res.code));
return;
}
if (execRetCode < 0) {
execRetCode = 9999;
appendLog('Process started...');
}
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, '');
@@ -813,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, rpc_opt);
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) {

View File

@@ -201,13 +201,17 @@ return baseclass.extend({
E('hr'), E('hr'),
this.logArea, this.logArea,
]), ]),
E('div', { 'class': 'right' }, [ E('div', { 'style': 'display:flex; justify-content:space-between; align-items:center; margin-top:1px;' }, [
E('div', { 'class': 'left' }, [
this.btn_check, this.btn_check,
' ', ' ',
this.btn_install, this.btn_install,
]),
E('div', { 'class': 'right' }, [
' ', ' ',
this.btn_cancel, this.btn_cancel,
]) ]),
]),
]); ]);
} },
}); });

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=zapret PKG_NAME:=zapret
PKG_VERSION:=72.20260128 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-28 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?
@@ -37,7 +37,7 @@ define Package/$(PKG_NAME)
DEPENDS:= +nftables +curl +gzip DEPENDS:= +nftables +curl +gzip
DEPENDS+= +coreutils +coreutils-sort +coreutils-sleep DEPENDS+= +coreutils +coreutils-sort +coreutils-sleep
DEPENDS+= +kmod-nft-nat +kmod-nft-offload +kmod-nft-queue DEPENDS+= +kmod-nft-nat +kmod-nft-offload +kmod-nft-queue
DEPENDS+= +libnetfilter-queue +libcap +zlib DEPENDS+= +libnetfilter-queue +libmnl +libcap +zlib
endef endef
define Build/Prepare define Build/Prepare
@@ -180,7 +180,7 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
$${ZAPRET_INITD} running && $${ZAPRET_INITD} stop >/dev/null 2>&1 $${ZAPRET_INITD} running && $${ZAPRET_INITD} stop >/dev/null 2>&1
fi fi
fi fi
if $${PKG_CHECK} zapret >/dev/null 2>&1; then if $${PKG_CHECK} zapret 2>/dev/null | grep -q . ; then
if [ ! -f "/opt/zapret/sync_config.sh" ]; then if [ ! -f "/opt/zapret/sync_config.sh" ]; then
echo "Please uninstall incompatible \"zapret\" package!" echo "Please uninstall incompatible \"zapret\" package!"
exit 47 exit 47
@@ -190,7 +190,7 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
exit 48 exit 48
fi fi
fi fi
if $${PKG_CHECK} luci-app-zapret >/dev/null 2>&1; then if $${PKG_CHECK} luci-app-zapret 2>/dev/null | grep -q . ; then
SVC_FILE=/www/luci-static/resources/view/zapret/service.js SVC_FILE=/www/luci-static/resources/view/zapret/service.js
if [ ! -f "$${SVC_FILE}" ] || ! grep -Fq "/remittor/zapret-openwrt" "$${SVC_FILE}"; then if [ ! -f "$${SVC_FILE}" ] || ! grep -Fq "/remittor/zapret-openwrt" "$${SVC_FILE}"; then
echo "Please uninstall incompatible \"luci-app-zapret\" package!" echo "Please uninstall incompatible \"luci-app-zapret\" package!"
@@ -206,10 +206,10 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
[ -d "$${ZAPRET_DIR}" ] && rm -rf $${ZAPRET_DIR} [ -d "$${ZAPRET_DIR}" ] && rm -rf $${ZAPRET_DIR}
echo "All files of the previously installed package have been removed!" echo "All files of the previously installed package have been removed!"
fi fi
if $${PKG_CHECK} zapret-mdig >/dev/null 2>&1; then if $${PKG_CHECK} zapret-mdig 2>/dev/null | grep -q . ; then
$${PKG_REMOVE} zapret-mdig $${PKG_REMOVE} zapret-mdig
fi fi
if $${PKG_CHECK} zapret-ip2net >/dev/null 2>&1; then if $${PKG_CHECK} zapret-ip2net 2>/dev/null | grep -q . ; then
$${PKG_REMOVE} zapret-ip2net $${PKG_REMOVE} zapret-ip2net
fi fi
if [ ! -d "$${ZAPRET_DIR}" ]; then if [ ! -d "$${ZAPRET_DIR}" ]; then

View File

@@ -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>

View File

@@ -76,7 +76,7 @@ TEST_SUITE='
{ id: "US.CF-04", provider: "🇨🇦 Cloudflare", times: 1, url: "https://www.bigcartel.com/" }, { id: "US.CF-04", provider: "🇨🇦 Cloudflare", times: 1, url: "https://www.bigcartel.com/" },
{ id: "US.DO-01", provider: "🇺🇸 DigitalOcean", times: 2, url: "https://genderize.io/" }, { id: "US.DO-01", provider: "🇺🇸 DigitalOcean", times: 2, url: "https://genderize.io/" },
{ id: "DE.HE-01", provider: "🇩🇪 Hetzner", times: 1, url: "https://j.dejure.org/jcg/doctrine/doctrine_banner.webp" }, { id: "DE.HE-01", provider: "🇩🇪 Hetzner", times: 1, url: "https://j.dejure.org/jcg/doctrine/doctrine_banner.webp" },
{ id: "DE.HE-02", provider: "🇩🇪 Hetzner", times: 1, url: "https://maps.gnosis.earth/ogcapi/api/swagger-ui/swagger-ui-standalone-preset.js#" }, { id: "DE.HE-02", provider: "🇩🇪 Hetzner", times: 1, url: "https://accesorioscelular.com/tienda/css/plugins.css" },
{ id: "FI.HE-01", provider: "🇫🇮 Hetzner", times: 1, url: "https://251b5cd9.nip.io/1MB.bin" }, { id: "FI.HE-01", provider: "🇫🇮 Hetzner", times: 1, url: "https://251b5cd9.nip.io/1MB.bin" },
{ id: "FI.HE-02", provider: "🇫🇮 Hetzner", times: 1, url: "https://nioges.com/libs/fontawesome/webfonts/fa-solid-900.woff2" }, { id: "FI.HE-02", provider: "🇫🇮 Hetzner", times: 1, url: "https://nioges.com/libs/fontawesome/webfonts/fa-solid-900.woff2" },
{ id: "FI.HE-03", provider: "🇫🇮 Hetzner", times: 1, url: "https://5fd8bdae.nip.io/1MB.bin" }, { id: "FI.HE-03", provider: "🇫🇮 Hetzner", times: 1, url: "https://5fd8bdae.nip.io/1MB.bin" },
@@ -88,11 +88,11 @@ TEST_SUITE='
{ id: "US.AWS-01", provider: "🇺🇸 AWS", times: 1, url: "https://corp.kaltura.com/wp-content/cache/min/1/wp-content/themes/airfleet/dist/styles/theme.css" }, { id: "US.AWS-01", provider: "🇺🇸 AWS", times: 1, url: "https://corp.kaltura.com/wp-content/cache/min/1/wp-content/themes/airfleet/dist/styles/theme.css" },
{ id: "US.GC-01", provider: "🇺🇸 Google Cloud", times: 1, url: "https://api.usercentrics.eu/gvl/v3/en.json" }, { id: "US.GC-01", provider: "🇺🇸 Google Cloud", times: 1, url: "https://api.usercentrics.eu/gvl/v3/en.json" },
{ id: "US.FST-01", provider: "🇺🇸 Fastly", times: 1, url: "https://www.jetblue.com/footer/footer-element-es2015.js" }, { id: "US.FST-01", provider: "🇺🇸 Fastly", times: 1, url: "https://www.jetblue.com/footer/footer-element-es2015.js" },
{ id: "CA.FST-01", provider: "🇨🇦 Fastly", times: 1, url: "https://www.cnn10.com/" }, { id: "CA.FST-01", provider: "🇨🇦 Fastly", times: 1, url: "https://ssl.p.jwpcdn.com/player/v/8.40.5/bidding.js" },
{ id: "US.AKM-01", provider: "🇺🇸 Akamai", times: 1, url: "https://www.roxio.com/static/roxio/images/products/creator/nxt9/call-action-footer-bg.jpg" }, { id: "US.AKM-01", provider: "🇺🇸 Akamai", times: 1, url: "https://www.roxio.com/static/roxio/images/products/creator/nxt9/call-action-footer-bg.jpg" },
{ id: "PL.AKM-01", provider: "🇵🇱 Akamai", times: 1, url: "https://media-assets.stryker.com/is/image/stryker/gateway_1?$max_width_1410$" }, { id: "PL.AKM-01", provider: "🇵🇱 Akamai", times: 1, url: "https://media-assets.stryker.com/is/image/stryker/gateway_1?$max_width_1410$" },
{ id: "US.CDN77-01", provider: "🇺🇸 CDN77", times: 1, url: "https://cdn.eso.org/images/banner1920/eso2520a.jpg" }, { id: "US.CDN77-01", provider: "🇺🇸 CDN77", times: 1, url: "https://cdn.eso.org/images/banner1920/eso2520a.jpg" },
{ id: "FR.CNTB-01", provider: "🇫🇷 Contabo", times: 1, url: "https://airsea.no/images/main_logo.png" }, { id: "FR.CNTB-01", provider: "🇫🇷 Contabo", times: 1, url: "https://xdmarineshop.gr/index.php?route=index" },
{ id: "NL.SW-01", provider: "🇳🇱 Scaleway", times: 1, url: "https://www.velivole.fr/img/header.jpg" }, { id: "NL.SW-01", provider: "🇳🇱 Scaleway", times: 1, url: "https://www.velivole.fr/img/header.jpg" },
{ id: "US.CNST-01", provider: "🇺🇸 Constant", times: 1, url: "https://cdn.xuansiwei.com/common/lib/font-awesome/4.7.0/fontawesome-webfont.woff2?v=4.7.0" } { id: "US.CNST-01", provider: "🇺🇸 Constant", times: 1, url: "https://cdn.xuansiwei.com/common/lib/font-awesome/4.7.0/fontawesome-webfont.woff2?v=4.7.0" }
' '
@@ -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

View File

@@ -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
#################################### ####################################

View File

@@ -1,15 +1,37 @@
#!/bin/sh #!/bin/sh
# Copyright (c) 2024 remittor # Copyright (c) 2024 remittor
PID_FILE=/tmp/zapret-script-exec.pid
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
shift 1 SH_FILE=$2
: > $LOG_FILE shift 2
: > $RC_FILE if [ ! -e $SH_FILE ]; then
( echo "ERROR: script $SH_FILE not found!" | awk 'NR==1'
exec </dev/null >/dev/null 2>&1 exit 71
"$@" >> $LOG_FILE 2>&1 fi
RETCODE=$? if [ ! -x $SH_FILE ]; then
sleep 1 echo "ERROR: script $SH_FILE not Found!" | awk 'NR==1'
echo $RETCODE > $RC_FILE exit 72
) & fi
start-stop-daemon -S -b -p $PID_FILE -x /bin/sh -- -c '
LOG_FILE=$1
RC_FILE=$2
SH_FILE=$3
shift 3
printf "" > $LOG_FILE
printf "" > $RC_FILE
$SH_FILE "$@" >> $LOG_FILE 2>&1
RET_CODE=$?
echo $RET_CODE > $RC_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

View File

@@ -89,6 +89,16 @@ fi
# ------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------
function check_pkg_installed
{
local pkg_name="$1"
if [ "$PKG_MGR" = apk ]; then
apk info -e "$pkg_name" >/dev/null 2>&1;
else
opkg status "$pkg_name" 2>/dev/null | grep -q .
fi
}
function get_distrib_param function get_distrib_param
{ {
local parname=$1 local parname=$1
@@ -475,7 +485,7 @@ if [ "$opt_update" != "" ]; then
mkdir $ZAP_PKG_DIR mkdir $ZAP_PKG_DIR
ZAP_PKG_FN="$ZAP_PKG_DIR/${ZAP_PKG_URL##*/}" ZAP_PKG_FN="$ZAP_PKG_DIR/${ZAP_PKG_URL##*/}"
echo "Download ZIP-file..." echo "Download ZIP-file..."
curl -s -L --max-time 15 -H "$CURL_HEADER2" "$ZAP_PKG_URL" -o "$ZAP_PKG_FN" curl -s -L --retry 5 --retry-delay 1 --retry-max-time 55 --retry-all-errors --max-time 30 -H "$CURL_HEADER2" "$ZAP_PKG_URL" -o "$ZAP_PKG_FN"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR: cannot download package!" echo "ERROR: cannot download package!"
return 215 return 215
@@ -529,11 +539,11 @@ if [ "$opt_update" != "" ]; then
if [ "$opt_forced" = true ]; then if [ "$opt_forced" = true ]; then
pkg_mgr_update pkg_mgr_update
fi fi
if ${PKG_CHECK} ${ZAPRET_CFG_NAME}-mdig >/dev/null 2>&1; then if check_pkg_installed ${ZAPRET_CFG_NAME}-mdig; then
echo "Uninstall mdig..." echo "Uninstall mdig..."
${PKG_REMOVE} ${ZAPRET_CFG_NAME}-mdig ${PKG_REMOVE} ${ZAPRET_CFG_NAME}-mdig
fi fi
if ${PKG_CHECK} ${ZAPRET_CFG_NAME}-ip2net >/dev/null 2>&1; then if check_pkg_installed ${ZAPRET_CFG_NAME}-ip2net; then
echo "Uninstall ip2net..." echo "Uninstall ip2net..."
${PKG_REMOVE} ${ZAPRET_CFG_NAME}-ip2net ${PKG_REMOVE} ${ZAPRET_CFG_NAME}-ip2net
fi fi