mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2026-01-03 15:18:50 +03:00
Compare commits
10 Commits
v0.8.20251
...
v72.202512
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
101382faf7 | ||
|
|
21229ef152 | ||
|
|
9aaf2b29e3 | ||
|
|
246f4a08a0 | ||
|
|
3d3eb82b7b | ||
|
|
8aff441b88 | ||
|
|
1c866d5de1 | ||
|
|
57d5ab5060 | ||
|
|
5a685cfa27 | ||
|
|
21017047a8 |
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-zapret
|
||||
PKG_VERSION:=72.20251218
|
||||
PKG_VERSION:=72.20251225
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_MAINTAINER:=remittor <https://github.com/remittor>
|
||||
|
||||
@@ -544,8 +544,6 @@ return baseclass.extend({
|
||||
}
|
||||
value = value.replace(/˂/g, '<');
|
||||
value = value.replace(/˃/g, '>');
|
||||
uci.set('zapret', this.cfgsec, this.cfgparam, value);
|
||||
uci.save();
|
||||
let elem = document.getElementById("cbi-zapret-" + this.cfgsec + "-_" + this.cfgparam);
|
||||
if (elem) {
|
||||
let val = value.trim();
|
||||
@@ -558,19 +556,8 @@ return baseclass.extend({
|
||||
elem.querySelector('div').textContent = val;
|
||||
}
|
||||
}
|
||||
ui.hideModal();
|
||||
/*
|
||||
return uci.save()
|
||||
.then(L.bind(ui.changes.init, ui.changes))
|
||||
.then(L.bind(ui.changes.displayChanges, ui.changes))
|
||||
//.then(L.bind(ui.changes.apply, ui.changes))
|
||||
.then(ui.addNotification(null, E('p', _('Contents have been saved.')), 'info'))
|
||||
.catch(e => {
|
||||
ui.addNotification(null, E('p', _('Unable to save the contents') + ': %s'.format(e.message)));
|
||||
}).finally(() => {
|
||||
ui.hideModal();
|
||||
});
|
||||
*/
|
||||
uci.set('zapret2', this.cfgsec, this.cfgparam, value);
|
||||
uci.save().then(ui.hideModal);
|
||||
},
|
||||
|
||||
error: function(e) {
|
||||
|
||||
@@ -132,7 +132,11 @@ return baseclass.extend({
|
||||
}
|
||||
let lastLen = 0;
|
||||
let retCode = -1;
|
||||
let timerBusy = false;
|
||||
let timer = setInterval(async () => {
|
||||
if (timerBusy)
|
||||
return; // skip iteration
|
||||
timerBusy = true;
|
||||
try {
|
||||
let res = await fs.exec('/bin/cat', [ logFile ], null, rpc_opt);
|
||||
if (res.stdout && res.stdout.length > lastLen) {
|
||||
@@ -169,7 +173,10 @@ return baseclass.extend({
|
||||
} catch (e) {
|
||||
clearInterval(timer);
|
||||
this.appendLog('ERROR: installUpdates: ' + e.message);
|
||||
this.appendLog('ERROR: installUpdates: ' + e.stack?.trim().split('\n').pop());
|
||||
this.setStage(999);
|
||||
} finally {
|
||||
timerBusy = false;
|
||||
}
|
||||
}, 500);
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret-ip2net
|
||||
PKG_VERSION:=72.20251218
|
||||
PKG_VERSION:=72.20251225
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=bol-van
|
||||
@@ -10,8 +10,8 @@ PKG_LICENSE_FILES:=docs/LICENSE.txt
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=994e9c34883ddc95e51c8285f134bd01fd6b6732
|
||||
PKG_SOURCE_DATE:=2025-12-18
|
||||
PKG_SOURCE_VERSION:=afce40981c89c6d80e3fba84b387fccee443cf2f
|
||||
PKG_SOURCE_DATE:=2025-12-25
|
||||
|
||||
#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?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret-mdig
|
||||
PKG_VERSION:=72.20251218
|
||||
PKG_VERSION:=72.20251225
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=bol-van
|
||||
@@ -10,8 +10,8 @@ PKG_LICENSE_FILES:=docs/LICENSE.txt
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=994e9c34883ddc95e51c8285f134bd01fd6b6732
|
||||
PKG_SOURCE_DATE:=2025-12-18
|
||||
PKG_SOURCE_VERSION:=afce40981c89c6d80e3fba84b387fccee443cf2f
|
||||
PKG_SOURCE_DATE:=2025-12-25
|
||||
|
||||
#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?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret-tpws
|
||||
PKG_VERSION:=72.20251218
|
||||
PKG_VERSION:=72.20251225
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=bol-van
|
||||
@@ -10,8 +10,8 @@ PKG_LICENSE_FILES:=docs/LICENSE.txt
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=994e9c34883ddc95e51c8285f134bd01fd6b6732
|
||||
PKG_SOURCE_DATE:=2025-12-18
|
||||
PKG_SOURCE_VERSION:=afce40981c89c6d80e3fba84b387fccee443cf2f
|
||||
PKG_SOURCE_DATE:=2025-12-25
|
||||
|
||||
#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?
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret
|
||||
PKG_VERSION:=72.20251218
|
||||
PKG_VERSION:=72.20251225
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=bol-van
|
||||
@@ -14,8 +14,8 @@ PKG_LICENSE_FILES:=docs/LICENSE.txt
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=994e9c34883ddc95e51c8285f134bd01fd6b6732
|
||||
PKG_SOURCE_DATE:=2025-12-18
|
||||
PKG_SOURCE_VERSION:=afce40981c89c6d80e3fba84b387fccee443cf2f
|
||||
PKG_SOURCE_DATE:=2025-12-25
|
||||
|
||||
#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?
|
||||
|
||||
@@ -168,7 +168,7 @@ function merge_cfg_with_def_values
|
||||
function remove_cron_task_logs
|
||||
{
|
||||
if [ -f "$CRONTAB_FILE" ]; then
|
||||
sed -i "/-name 'zapret\*.log' -size +/d" "$CRONTAB_FILE"
|
||||
sed -i "/-name 'zapret+\*.log' -size +/d" "$CRONTAB_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ function insert_cron_task_logs
|
||||
[ ! -f "$CRONTAB_FILE" ] && touch "$CRONTAB_FILE"
|
||||
[ ! -f "$CRONTAB_FILE" ] && return 1
|
||||
if ! grep -q -e "-name 'zapret\*\.log' -size \+" "$CRONTAB_FILE"; then
|
||||
echo "*/2 * * * * /usr/bin/find /tmp -maxdepth 1 -type f -name 'zapret*.log' -size +2600k -exec rm -f {} \;" >> "$CRONTAB_FILE"
|
||||
echo "*/2 * * * * /usr/bin/find /tmp -maxdepth 1 -type f -name 'zapret+*.log' -size +2600k -exec rm -f {} \;" >> "$CRONTAB_FILE"
|
||||
/etc/init.d/cron restart 2> /dev/null
|
||||
fi
|
||||
return 0
|
||||
@@ -190,7 +190,7 @@ function init_before_start
|
||||
[ ! -f "$HOSTLIST_FN" ] && touch "$HOSTLIST_FN"
|
||||
chmod 644 $ZAPRET_BASE/ipset/*.txt
|
||||
chmod 666 $ZAPRET_BASE/ipset/*.log
|
||||
rm -f /tmp/zapret*.log
|
||||
rm -f /tmp/zapret+*.log
|
||||
#*/
|
||||
if [ "$DAEMON_LOG_ENABLE" = "1" ]; then
|
||||
insert_cron_task_logs
|
||||
|
||||
@@ -247,6 +247,84 @@ function set_cfg_nfqws_strat
|
||||
commit $cfgname
|
||||
EOF
|
||||
fi
|
||||
if [ "$strat" = "ALT7_by_Flowseal" ]; then
|
||||
uci batch <<-EOF
|
||||
set $cfgname.config.NFQWS_PORTS_TCP='80,443'
|
||||
set $cfgname.config.NFQWS_PORTS_UDP='443'
|
||||
set $cfgname.config.NFQWS_OPT="
|
||||
# Strategy $strat
|
||||
|
||||
--filter-tcp=443
|
||||
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||
--hostlist-exclude=/opt/zapret/ipset/zapret-hosts-user-exclude.txt
|
||||
--hostlist-exclude-domains=openwrt.org
|
||||
--ip-id=zero
|
||||
--dpi-desync=multisplit
|
||||
--dpi-desync-split-pos=2,sniext+1
|
||||
--dpi-desync-split-seqovl=679
|
||||
--dpi-desync-split-seqovl-pattern=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin
|
||||
|
||||
--new
|
||||
--filter-tcp=80,443 <HOSTLIST>
|
||||
--hostlist-exclude-domains=openwrt.org
|
||||
--dpi-desync=multisplit
|
||||
--dpi-desync-split-pos=2,sniext+1
|
||||
--dpi-desync-split-seqovl=679
|
||||
--dpi-desync-split-seqovl-pattern=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin
|
||||
|
||||
--new
|
||||
--filter-udp=443
|
||||
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||
--hostlist-exclude=/opt/zapret/ipset/zapret-hosts-user-exclude.txt
|
||||
--dpi-desync=fake
|
||||
--dpi-desync-repeats=6
|
||||
--dpi-desync-fake-quic=/opt/zapret/files/fake/quic_initial_www_google_com.bin
|
||||
"
|
||||
commit $cfgname
|
||||
EOF
|
||||
fi
|
||||
if [ "$strat" = "TLS_AUTO_ALT3_by_Flowseal" ]; then
|
||||
uci batch <<-EOF
|
||||
set $cfgname.config.NFQWS_PORTS_TCP='80,443'
|
||||
set $cfgname.config.NFQWS_PORTS_UDP='443'
|
||||
set $cfgname.config.NFQWS_OPT="
|
||||
# Strategy $strat
|
||||
|
||||
--filter-tcp=443
|
||||
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||
--hostlist-exclude=/opt/zapret/ipset/zapret-hosts-user-exclude.txt
|
||||
--hostlist-exclude-domains=openwrt.org
|
||||
--ip-id=zero
|
||||
--dpi-desync=fake,multisplit
|
||||
--dpi-desync-split-seqovl=681
|
||||
--dpi-desync-split-pos=1
|
||||
--dpi-desync-fooling=ts
|
||||
--dpi-desync-repeats=8
|
||||
--dpi-desync-split-seqovl-pattern=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin
|
||||
--dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com
|
||||
|
||||
--new
|
||||
--filter-tcp=80,443 <HOSTLIST>
|
||||
--hostlist-exclude-domains=openwrt.org
|
||||
--dpi-desync=fake,multisplit
|
||||
--dpi-desync-split-seqovl=681
|
||||
--dpi-desync-split-pos=1
|
||||
--dpi-desync-fooling=ts
|
||||
--dpi-desync-repeats=8
|
||||
--dpi-desync-split-seqovl-pattern=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin
|
||||
--dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com
|
||||
|
||||
--new
|
||||
--filter-udp=443
|
||||
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||
--hostlist-exclude=/opt/zapret/ipset/zapret-hosts-user-exclude.txt
|
||||
--dpi-desync=fake
|
||||
--dpi-desync-repeats=11
|
||||
--dpi-desync-fake-quic=/opt/zapret/files/fake/quic_initial_www_google_com.bin
|
||||
"
|
||||
commit $cfgname
|
||||
EOF
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
BIN
zapret/files/fake/tls_clienthello_max_ru.bin
Normal file
BIN
zapret/files/fake/tls_clienthello_max_ru.bin
Normal file
Binary file not shown.
@@ -72,7 +72,7 @@ function download_json
|
||||
function get_pkg_version
|
||||
{
|
||||
local pkg_name="$1"
|
||||
local ver line pkg_prefix
|
||||
local ver line base
|
||||
if [ "$PKG_MGR" = opkg ]; then
|
||||
ver=$( opkg list-installed "$pkg_name" 2>/dev/null | awk -F' - ' '{print $2}' | tr -d '\r' )
|
||||
if [ -n "$ver" ]; then
|
||||
@@ -83,16 +83,16 @@ function get_pkg_version
|
||||
if [ "$PKG_MGR" = apk ]; then
|
||||
line=$( apk info -e "$pkg_name" 2>/dev/null || true )
|
||||
if [ -n "$line" ]; then
|
||||
pkg_prefix="${pkg_name}-"
|
||||
base=${line%-r[0-9]*}
|
||||
ver=${base##*-}
|
||||
case "$line" in
|
||||
"$pkg_prefix"*)
|
||||
ver=${line#"$pkg_prefix"}
|
||||
*-r[0-9]*)
|
||||
echo -n "$ver${line#$base}"
|
||||
;;
|
||||
*)
|
||||
ver=${line##*-}
|
||||
echo -n "$ver"
|
||||
;;
|
||||
esac
|
||||
echo -n "$ver"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
@@ -106,7 +106,7 @@ function normalize_version
|
||||
local base
|
||||
local major minor rel
|
||||
case "$ver" in
|
||||
*-r*)
|
||||
*-r[0-9]*)
|
||||
rel="${ver##*-r}"
|
||||
base="${ver%-r*}"
|
||||
;;
|
||||
@@ -356,6 +356,10 @@ if [ "$opt_update" != "" ]; then
|
||||
echo "ERROR: downloaded package is incorrect! (size = $ZAP_PKG_SZ)"
|
||||
return 216
|
||||
fi
|
||||
if ! command -v unzip >/dev/null 2>&1; then
|
||||
echo "ERROR: package \"upzip\" not installed!"
|
||||
return 218
|
||||
fi
|
||||
unzip -q "$ZAP_PKG_FN" -d $ZAP_PKG_DIR
|
||||
rm -f "$ZAP_PKG_FN"
|
||||
if [ "$PKG_MGR" = "apk" ]; then
|
||||
|
||||
Reference in New Issue
Block a user