Compare commits

...

17 Commits

Author SHA1 Message Date
241a733eec Bump version to v65-20241018
Some checks failed
build / check (push) Has been cancelled
build / build (aarch64_cortex-a53, openwrt-23.05) (push) Has been cancelled
build / build (aarch64_cortex-a72, openwrt-23.05) (push) Has been cancelled
build / build (aarch64_generic, openwrt-23.05) (push) Has been cancelled
build / build (arm_arm1176jzf-s_vfp, openwrt-23.05) (push) Has been cancelled
build / build (arm_arm926ej-s, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a15_neon-vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a5_vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a7, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a7_neon-vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a7_vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a8_vfpv3, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a9, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a9_neon, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a9_vfpv3-d16, openwrt-23.05) (push) Has been cancelled
build / build (arm_fa526, openwrt-23.05) (push) Has been cancelled
build / build (arm_mpcore, openwrt-23.05) (push) Has been cancelled
build / build (arm_xscale, openwrt-23.05) (push) Has been cancelled
build / build (mips64_octeonplus, openwrt-23.05) (push) Has been cancelled
build / build (mips_24kc, openwrt-23.05) (push) Has been cancelled
build / build (mips_4kec, openwrt-23.05) (push) Has been cancelled
build / build (mips_mips32, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_24kc, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_24kc_24kf, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_74kc, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_mips32, openwrt-23.05) (push) Has been cancelled
build / build (x86_64, openwrt-23.05) (push) Has been cancelled
build / release (23.05) (push) Has been cancelled
2024-10-18 10:14:11 +03:00
6cfcaf2a03 luci: Fix path to main zapret script 2024-10-18 10:11:30 +03:00
2e58533b4e [install] Add detect for installed original zapret 2024-10-18 08:07:46 +03:00
6999144837 [install] Fix syntax 2024-10-18 08:06:08 +03:00
a6b89f3c2f [install] Remove empty custom files from ipset 2024-10-18 07:54:38 +03:00
facc4ac2bd Bump version to v65-20241016
Some checks failed
build / check (push) Has been cancelled
build / build (aarch64_cortex-a53, openwrt-23.05) (push) Has been cancelled
build / build (aarch64_cortex-a72, openwrt-23.05) (push) Has been cancelled
build / build (aarch64_generic, openwrt-23.05) (push) Has been cancelled
build / build (arm_arm1176jzf-s_vfp, openwrt-23.05) (push) Has been cancelled
build / build (arm_arm926ej-s, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a15_neon-vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a5_vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a7, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a7_neon-vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a7_vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a8_vfpv3, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a9, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a9_neon, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a9_vfpv3-d16, openwrt-23.05) (push) Has been cancelled
build / build (arm_fa526, openwrt-23.05) (push) Has been cancelled
build / build (arm_mpcore, openwrt-23.05) (push) Has been cancelled
build / build (arm_xscale, openwrt-23.05) (push) Has been cancelled
build / build (mips64_octeonplus, openwrt-23.05) (push) Has been cancelled
build / build (mips_24kc, openwrt-23.05) (push) Has been cancelled
build / build (mips_4kec, openwrt-23.05) (push) Has been cancelled
build / build (mips_mips32, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_24kc, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_24kc_24kf, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_74kc, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_mips32, openwrt-23.05) (push) Has been cancelled
build / build (x86_64, openwrt-23.05) (push) Has been cancelled
build / release (23.05) (push) Has been cancelled
2024-10-16 21:45:20 +03:00
8940c4bfa7 Add support for custom txt-configs
Example: /opt/zapret/ipset/cust1.txt
2024-10-16 21:45:20 +03:00
256c357554 Add other configs from original ipset directory 2024-10-16 21:45:20 +03:00
6c0c3498bd Add params DESYNC_MARK and DESYNC_MARK_POSTNAT 2024-10-16 21:45:20 +03:00
b28c89e569 Reformat type of parameters 2024-10-16 21:45:13 +03:00
0f6e981616 [install] Fix upgrade and remove main package 2024-10-16 10:34:29 +03:00
86310e3cf9 [install] Disable copy directory "docs" 2024-10-15 22:03:14 +03:00
f8feb83348 Bump version to v64-20241014
Some checks failed
build / check (push) Has been cancelled
build / build (aarch64_cortex-a53, openwrt-23.05) (push) Has been cancelled
build / build (aarch64_cortex-a72, openwrt-23.05) (push) Has been cancelled
build / build (aarch64_generic, openwrt-23.05) (push) Has been cancelled
build / build (arm_arm1176jzf-s_vfp, openwrt-23.05) (push) Has been cancelled
build / build (arm_arm926ej-s, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a15_neon-vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a5_vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a7, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a7_neon-vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a7_vfpv4, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a8_vfpv3, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a9, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a9_neon, openwrt-23.05) (push) Has been cancelled
build / build (arm_cortex-a9_vfpv3-d16, openwrt-23.05) (push) Has been cancelled
build / build (arm_fa526, openwrt-23.05) (push) Has been cancelled
build / build (arm_mpcore, openwrt-23.05) (push) Has been cancelled
build / build (arm_xscale, openwrt-23.05) (push) Has been cancelled
build / build (mips64_octeonplus, openwrt-23.05) (push) Has been cancelled
build / build (mips_24kc, openwrt-23.05) (push) Has been cancelled
build / build (mips_4kec, openwrt-23.05) (push) Has been cancelled
build / build (mips_mips32, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_24kc, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_24kc_24kf, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_74kc, openwrt-23.05) (push) Has been cancelled
build / build (mipsel_mips32, openwrt-23.05) (push) Has been cancelled
build / build (x86_64, openwrt-23.05) (push) Has been cancelled
build / release (23.05) (push) Has been cancelled
2024-10-14 19:57:38 +03:00
80518c32dc [github] Update auto builder 2024-10-14 19:56:45 +03:00
8f84cf46a8 [ipset] Update youtube hostnames
src: https://github.com/bol-van/zapret/blob/master/binaries/win64/zapret-winws/list-youtube.txt
2024-10-14 15:31:36 +03:00
bdff1d6a50 [github] Add auto builder 2024-10-13 22:08:59 +03:00
f8a756dd77 [zapret] Update config for Youtube 2024-10-13 11:36:39 +03:00
12 changed files with 468 additions and 108 deletions

227
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,227 @@
name: build
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
check:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.gh.outputs.tag }}
date: ${{ steps.gh.outputs.date }}
sha: ${{ steps.gh.outputs.sha }}
url: ${{ steps.gh.outputs.url }}
message: ${{ steps.gh.outputs.message }}
is_active: ${{ steps.activity.outputs.is_active }}
steps:
- name: Get repo data via GH API
id: gh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: 'remittor/zapret-openwrt'
run: |
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
BRANCH=$(gh api repos/$REPO --jq '.default_branch')
DATE=$(gh api repos/$REPO/commits/$BRANCH --jq '.commit.committer.date')
{
echo "tag=$GITHUB_REF_NAME"
echo "date=$(date --utc -d $DATE +%Y%m%d)"
echo "sha=$(gh api repos/$REPO/commits/$BRANCH --jq '.sha[0:7]')"
echo "url=$(gh api repos/$REPO/commits/$BRANCH --jq '.html_url')"
echo "message<<EOF"
gh api repos/$REPO/commits/$BRANCH --jq '.commit.message'
echo EOF
} >> $GITHUB_OUTPUT
echo "DATE=$DATE" >> $GITHUB_ENV
- name: Check for repo activity
id: activity
env:
DATE: ${{ env.DATE }}
URL: ${{ steps.gh.outputs.url }}
run: |
TIMESTAMP=$(date --utc -d $DATE +%s)
DAYS=$(( ( $(date --utc +%s) - $TIMESTAMP ) / 86400 ))
echo "Repository activity: $(date --utc -d $DATE)"
echo "Commit: $URL"
if [ "${{ github.event_name }}" != "schedule" ]; then
is_active=true
elif [[ $DAYS -lt 1 ]] ; then
is_active=true
else
echo "Repository not updated within last 24 hours."
is_active=false
fi
echo "is_active=$is_active" >> $GITHUB_OUTPUT
build:
needs: check
#if: needs.check.outputs.is_active == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
#branch: [ openwrt-22.03, openwrt-23.05 ]
branch: [ openwrt-23.05 ]
arch:
- aarch64_cortex-a53
- aarch64_cortex-a72
- aarch64_generic
- arm_arm1176jzf-s_vfp
- arm_arm926ej-s
- arm_cortex-a15_neon-vfpv4
- arm_cortex-a5_vfpv4
- arm_cortex-a7
- arm_cortex-a7_neon-vfpv4
- arm_cortex-a7_vfpv4
- arm_cortex-a8_vfpv3
- arm_cortex-a9
- arm_cortex-a9_neon
- arm_cortex-a9_vfpv3-d16
- arm_fa526
- arm_mpcore
- arm_xscale
- mips64_octeonplus
- mips_24kc
- mips_4kec
- mips_mips32
- mipsel_24kc
- mipsel_24kc_24kf
- mipsel_74kc
- mipsel_mips32
- x86_64
#include:
# - branch: SNAPSHOT
# arch: x86_64
#exclude:
# - branch: openwrt-22.03
# arch: arm_fa526
# - branch: openwrt-22.03
# arch: arm_mpcore
container:
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: 'remittor/zapret-openwrt'
path: zapret-openwrt
- name: Setup ccache
uses: actions/cache@v4
with:
path: ${{ matrix.branch == 'openwrt-19.07' && '/home/build/openwrt/.ccache' || '/builder/.ccache' }}
key: ccache-${{ matrix.arch }}-${{ matrix.branch }}-${{ github.run_id }}
restore-keys: |
ccache-${{ matrix.arch }}-${{ matrix.branch }}-
- name: Build packages
id: build
working-directory: ${{ matrix.branch == 'openwrt-19.07' && '/home/build/openwrt' || '/builder' }}
env:
DATE: ${{ needs.check.outputs.date }}
SHA: ${{ needs.check.outputs.sha }}
ARCH: ${{ matrix.arch }}
BRANCH: ${{ matrix.branch }}
SIGN_KEY: ${{ secrets.SIGN_PRIVATE_KEY }}
CCACHE_DIR: ${{ matrix.branch == 'openwrt-19.07' && '/home/build/openwrt/.ccache' || '/builder/.ccache' }}
shell: bash
run: |
#export PKG_VERSION=$(date --utc -d $DATE +%Y%m%d)
#find $GITHUB_WORKSPACE/zapret-openwrt -type d -path '*/package/zapret' -exec cp -r {} ./package \;
cp -r $GITHUB_WORKSPACE/zapret-openwrt ./package/zapret-openwrt/
mv feeds.conf.default feeds.conf
sed -i -e 's|base.*\.git|base https://github.com/openwrt/openwrt.git|' feeds.conf
sed -i -e 's|packages.*\.git|packages https://github.com/openwrt/packages.git|' feeds.conf
sed -i -e 's|luci.*\.git|luci https://github.com/openwrt/luci.git|' feeds.conf
./scripts/feeds update base packages luci
./scripts/feeds install -a
make defconfig
echo "------------- .config BEG -------------------"
cat .config
echo "------------- .config END -------------------"
PKGLIST=`echo package/zapret-openwrt/{zapret,zapret-tpws,zapret-mdig,zapret-ip2net,luci-app-zapret}/compile`
make $PKGLIST V=s CONFIG_CCACHE=1 BUILD_LOG=1
find ./bin/packages/*/base -type f ! -regex ".*\(zapret\).*\.ipk$" -delete
#echo ">>>>>>> build a repository index to make the output directory usable as local OPKG source"
#ln -s `which usign` staging_dir/host/bin/usign
#echo "$SIGN_KEY" | base64 -d > key-build
#make package/index
tar -C ./bin/packages/*/base -cvf $GITHUB_WORKSPACE/ipk-$BRANCH-$ARCH.tar --transform "s|^\./|${BRANCH/openwrt-}/$ARCH/|" --show-transformed-names .
./staging_dir/host/bin/ccache --max-size=10M --show-stats
- name: Compress build logs
if: always()
env:
ARCH: ${{ matrix.arch }}
BRANCH: ${{ matrix.branch }}
LOGS_DIR: ${{ matrix.branch == 'openwrt-19.07' && '/home/build/openwrt/logs' || '/builder/logs' }}
run: |
tar -cJvf logs-$BRANCH-$ARCH.tar.xz $LOGS_DIR
- name: Upload packages
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: ipk-${{ matrix.branch }}-${{ matrix.arch }}
path: ./**/ipk-${{ matrix.branch }}-${{ matrix.arch }}.tar
if-no-files-found: error
- name: Upload build logs
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.branch }}-${{ matrix.arch }}
path: ./**/logs-*.tar.xz
release:
needs: [ check, build ]
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
#branch: [ '22.03', '23.05' ]
branch: [ '23.05' ]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: ipk-*
- name: Put ipk into zip
env:
BRANCH: ${{ matrix.branch }}
TAG: ${{ needs.check.outputs.tag }}
DATE: ${{ needs.check.outputs.date }}
run: |
mkdir -p public
find . -name "ipk-openwrt-$BRANCH-*.tar" -exec tar -xvf {} --wildcards '*.ipk' \;
find $BRANCH -mindepth 1 -type d -exec sh -c 'zip -0 ./public/zapret_${TAG}_$(basename {}).ipk.zip -j {} {}/*' \;
ls -lh ./public/*.zip
- name: Upload assets
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: ${{ matrix.branch }}
TAG: ${{ needs.check.outputs.tag }}
with:
prerelease: false
tag_name: ${{ needs.check.outputs.tag }}-${{ matrix.branch }}
name: '${{ needs.check.outputs.tag }} for OpenWrt ${{ matrix.branch }}'
body: |
${{ needs.check.outputs.url }}: ${{ needs.check.outputs.message }}
files: ./public/*.zip

View File

@ -5,8 +5,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-zapret
PKG_RELEASE:=20241012
PKG_VERSION:=64-$(PKG_RELEASE)
PKG_RELEASE:=20241018
PKG_VERSION:=65-$(PKG_RELEASE)
PKG_LICENSE:=MIT
LUCI_TITLE:=LuCI support for zapret

View File

@ -60,8 +60,8 @@ return view.extend({
s.tab(tabname, _('Main settings'));
o = s.taboption(tabname, form.ListValue, 'FWTYPE', _('FWTYPE'));
o.value('nftables', 'NFTables');
//o.value('iptables', 'IPTables');
o.value('nftables', 'nftables');
//o.value('iptables', 'iptables');
//o.value('ipfw', 'ipfw');
o = s.taboption(tabname, form.ListValue, 'MODE', _('MODE'));
@ -74,17 +74,17 @@ return view.extend({
o.value('software', 'software');
o.value('hardware', 'hardware');
o = s.taboption(tabname, form.ListValue, 'INIT_APPLY_FW', _('INIT_APPLY_FW'));
o.value('0', 'False');
o.value('1', 'True');
o = s.taboption(tabname, form.Flag, 'INIT_APPLY_FW', _('INIT_APPLY_FW'));
o.rmempty = false;
o.default = 0;
o = s.taboption(tabname, form.ListValue, 'DISABLE_IPV4', _('DISABLE_IPV4'));
o.value('0', 'False');
o.value('1', 'True');
o = s.taboption(tabname, form.Flag, 'DISABLE_IPV4', _('DISABLE_IPV4'));
o.rmempty = false;
o.default = 1;
o = s.taboption(tabname, form.ListValue, 'DISABLE_IPV6', _('DISABLE_IPV6'));
o.value('0', 'False');
o.value('1', 'True');
o = s.taboption(tabname, form.Flag, 'DISABLE_IPV6', _('DISABLE_IPV6'));
o.rmempty = false;
o.default = 0;
o = s.taboption(tabname, form.ListValue, 'MODE_FILTER', _('MODE_FILTER'));
//o.value('none', 'none');
@ -92,21 +92,31 @@ return view.extend({
o.value('hostlist', 'hostlist');
o.value('autohostlist', 'autohostlist');
o = s.taboption(tabname, form.ListValue, 'MODE_HTTP', _('MODE_HTTP'));
o.value('0', 'False');
o.value('1', 'True');
o = s.taboption(tabname, form.Flag, 'MODE_HTTP', _('MODE_HTTP'));
o.rmempty = false;
o.default = 0;
o = s.taboption(tabname, form.ListValue, 'MODE_HTTP_KEEPALIVE', _('MODE_HTTP_KEEPALIVE'));
o.value('0', 'False');
o.value('1', 'True');
o = s.taboption(tabname, form.Flag, 'MODE_HTTP_KEEPALIVE', _('MODE_HTTP_KEEPALIVE'));
o.rmempty = false;
o.default = 0;
o = s.taboption(tabname, form.ListValue, 'MODE_HTTPS', _('MODE_HTTPS'));
o.value('0', 'False');
o.value('1', 'True');
o = s.taboption(tabname, form.Flag, 'MODE_HTTPS', _('MODE_HTTPS'));
o.rmempty = false;
o.default = 0;
o = s.taboption(tabname, form.ListValue, 'MODE_QUIC', _('MODE_QUIC'));
o.value('0', 'False');
o.value('1', 'True');
o = s.taboption(tabname, form.Flag, 'MODE_QUIC', _('MODE_QUIC'));
o.rmempty = false;
o.default = 0;
o = s.taboption(tabname, form.Value, 'DESYNC_MARK', _('DESYNC_MARK'));
//o.description = _("nfqws option for DPI desync attack");
o.rmempty = false;
o.datatype = 'string';
o = s.taboption(tabname, form.Value, 'DESYNC_MARK_POSTNAT', _('DESYNC_MARK_POSTNAT'));
//o.description = _("nfqws option for DPI desync attack");
o.rmempty = false;
o.datatype = 'string';
/* NFQWS_OPT_DESYNC tab */
@ -178,25 +188,77 @@ return view.extend({
o = s.taboption(tabname, form.Button, '_user_entries_btn', _('User hostname entries'));
o.inputtitle = _('Edit');
o.inputstyle = 'edit btn';
o.description = tools.hostsUserFN;
o.onclick = () => new tools.fileEditDialog(
tools.userEntriesFile,
tools.hostsUserFN,
_('User entries'),
_('One hostname per line.<br />Examples:'),
'<code>domain.net<br />sub.domain.com<br />googlevideo.com</code>',
15
).show();
o = s.taboption(tabname, form.Button, '_ip_filter_btn', _('User IP entries'));
o = s.taboption(tabname, form.Button, '_user_excluded_entries_btn', _('User excluded hostname entries'));
o.inputtitle = _('Edit');
o.inputstyle = 'edit btn';
o.description = tools.hostsUserExcludeFN;
o.onclick = () => new tools.fileEditDialog(
tools.ipFilterFile,
_('IP filter'),
tools.hostsUserExcludeFN,
_('User excluded entries'),
_('One hostname per line.<br />Examples:'),
'<code>domain.net<br />sub.domain.com<br />googlevideo.com</code>',
15
).show();
add_delim(s);
o = s.taboption(tabname, form.Button, '_ip_exclude_filter_btn', _('Excluded IP entries'));
o.inputtitle = _('Edit');
o.inputstyle = 'edit btn';
o.description = tools.iplstExcludeFN;
o.onclick = () => new tools.fileEditDialog(
tools.iplstExcludeFN,
_('Excluded IP filter'),
_('Patterns can be strings or regular expressions. Each pattern in a separate line<br />Examples:'),
'<code>128.199.0.0/16<br />34.217.90.52<br />162.13.190.77</code>',
15
).show();
o = s.taboption(tabname, form.Button, '_user_ip_filter_btn', _('User IP entries'));
o.inputtitle = _('Edit');
o.inputstyle = 'edit btn';
o.description = tools.iplstUserFN;
o.onclick = () => new tools.fileEditDialog(
tools.iplstUserFN,
_('User IP filter'),
_('Patterns can be strings or regular expressions. Each pattern in a separate line<br />Examples:'),
'<code>128.199.0.0/16<br />34.217.90.52<br />162.13.190.77</code>',
15
).show();
o = s.taboption(tabname, form.Button, '_user_excluded_ip_filter_btn', _('User excluded IP entries'));
o.inputtitle = _('Edit');
o.inputstyle = 'edit btn';
o.description = tools.iplstUserExcludeFN;
o.onclick = () => new tools.fileEditDialog(
tools.iplstUserExcludeFN,
_('User excluded IP filter'),
_('Patterns can be strings or regular expressions. Each pattern in a separate line<br />Examples:'),
'<code>128.199.0.0/16<br />34.217.90.52<br />162.13.190.77</code>',
15
).show();
add_delim(s);
for (let num = 1; num <= tools.custFileMax; num++) {
let fn = tools.custFileTemplate.format(num.toString());
let name = _('Custom file #' + num);
o = s.taboption(tabname, form.Button, '_cust_file%d_btn'.format(num), name);
o.inputtitle = _('Edit');
o.inputstyle = 'edit btn';
o.description = fn;
o.onclick = () => new tools.fileEditDialog(fn, name, '', '', 15).show();
}
let map_promise = m.render();
map_promise.then(node => node.classList.add('fade-in'));
return map_promise;

View File

@ -36,10 +36,14 @@ document.head.append(E('style', {'type': 'text/css'},
return baseclass.extend({
appName : 'zapret',
execPath : '/opt/zapret/init.d/openwrt/zapret',
parsersDir : '/usr/libexec/ruantiblock',
userEntriesFile : '/opt/zapret/ipset/zapret-hosts-user.txt',
ipFilterFile : '/opt/zapret/ipset/zapret-ip-user.txt',
execPath : '/etc/init.d/zapret',
hostsUserFN : '/opt/zapret/ipset/zapret-hosts-user.txt',
hostsUserExcludeFN: '/opt/zapret/ipset/zapret-hosts-user-exclude.txt',
iplstExcludeFN : '/opt/zapret/ipset/zapret-ip-exclude.txt',
iplstUserFN : '/opt/zapret/ipset/zapret-ip-user.txt',
iplstUserExcludeFN: '/opt/zapret/ipset/zapret-ip-user-exclude.txt',
custFileMax : 4,
custFileTemplate : '/opt/zapret/ipset/cust%s.txt',
infoLabelStarting : '<span class="label-status starting">' + _('Starting') + '</span>',
infoLabelRunning : '<span class="label-status running">' + _('Enabled') + '</span>',

View File

@ -1,21 +1,26 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=zapret-ip2net
PKG_VERSION:=64
PKG_RELEASE:=20241012
PKG_VERSION:=65
PKG_RELEASE:=20241018
PKG_MAINTAINER:=bol-van
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=docs/LICENSE.txt
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_HASH:=skip
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d97e7920cc79ff93a46a0ad30d8803a8e635157c
PKG_SOURCE_DATE:=2024-10-18
#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_HASH:=skip
include $(INCLUDE_DIR)/package.mk
TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
#TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
#TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
MAKE_PATH:=ip2net

View File

@ -1,21 +1,26 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=zapret-mdig
PKG_VERSION:=64
PKG_RELEASE:=20241012
PKG_VERSION:=65
PKG_RELEASE:=20241018
PKG_MAINTAINER:=bol-van
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=docs/LICENSE.txt
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_HASH:=skip
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d97e7920cc79ff93a46a0ad30d8803a8e635157c
PKG_SOURCE_DATE:=2024-10-18
#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_HASH:=skip
include $(INCLUDE_DIR)/package.mk
TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
#TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
#TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
MAKE_PATH:=mdig

View File

@ -1,21 +1,26 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=zapret-tpws
PKG_VERSION:=64
PKG_RELEASE:=20241012
PKG_VERSION:=65
PKG_RELEASE:=20241018
PKG_MAINTAINER:=bol-van
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=docs/LICENSE.txt
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_HASH:=skip
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d97e7920cc79ff93a46a0ad30d8803a8e635157c
PKG_SOURCE_DATE:=2024-10-18
#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_HASH:=skip
include $(INCLUDE_DIR)/package.mk
TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
#TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
#TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
MAKE_PATH:=tpws
@ -24,7 +29,7 @@ define Package/$(PKG_NAME)
CATEGORY:=Network
TITLE:=tpws
SUBMENU:=Zapret
DEPENDS:=+zlib +zapret
DEPENDS:=+zlib +libcap +zapret
endef
define Build/Prepare

View File

@ -5,21 +5,26 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=zapret
PKG_VERSION:=64
PKG_RELEASE:=20241012
PKG_VERSION:=65
PKG_RELEASE:=20241018
PKG_MAINTAINER:=bol-van
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=opt/zapret/docs/LICENSE.txt
PKG_LICENSE_FILES:=docs/LICENSE.txt
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_HASH:=skip
PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d97e7920cc79ff93a46a0ad30d8803a8e635157c
PKG_SOURCE_DATE:=2024-10-18
#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_HASH:=skip
include $(INCLUDE_DIR)/package.mk
TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
#TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
#TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
MAKE_PATH:=nfq
@ -29,7 +34,8 @@ define Package/$(PKG_NAME)
TITLE:=$(PKG_NAME)
SUBMENU:=Zapret
URL:=https://github.com/bol-van/zapret
DEPENDS:= +nftables +curl +gzip +coreutils +coreutils-sort +coreutils-sleep
DEPENDS:= +nftables +curl +gzip
DEPENDS+= +coreutils +coreutils-sort +coreutils-sleep
DEPENDS+= +kmod-nft-nat +kmod-nft-offload +kmod-nft-queue
DEPENDS+= +libnetfilter-queue +libcap +zlib
endef
@ -39,31 +45,26 @@ define Build/Prepare
rm -f $(PKG_BUILD_DIR)/$(MAKE_PATH)/nfqws
endef
define Package/$(PKG_NAME)/conffiles
/etc/config/zapret
/opt/zapret/config
/opt/zapret/ipset/zapret-hosts-user.txt
/opt/zapret/ipset/zapret-hosts-user-exclude.txt
/opt/zapret/ipset/zapret-hosts-user-ipban.txt
/opt/zapret/ipset/zapret-ip-user.txt
/opt/zapret/ipset/zapret-ip-user-exclude.txt
/opt/zapret/ipset/zapret-ip-user-ipban.txt
endef
#define Build/Configure
#endef
#define Build/Compile
#endef
define Package/$(PKG_NAME)/conffiles
/etc/config/zapret
/opt/zapret/config
/opt/zapret/ipset/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/opt/zapret
$(INSTALL_DIR) $(1)/opt/zapret/$(MAKE_PATH)
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/nfqws $(1)/opt/zapret/$(MAKE_PATH)/
$(INSTALL_DIR) $(1)/opt/zapret/common
$(CP) $(PKG_BUILD_DIR)/common/* $(1)/opt/zapret/common/
$(INSTALL_DIR) $(1)/opt/zapret/docs
$(CP) $(PKG_BUILD_DIR)/docs/* $(1)/opt/zapret/docs/
#$(INSTALL_DIR) $(1)/opt/zapret/docs
#$(CP) $(PKG_BUILD_DIR)/docs/* $(1)/opt/zapret/docs/
$(INSTALL_DIR) $(1)/opt/zapret/files
$(CP) $(PKG_BUILD_DIR)/files/* $(1)/opt/zapret/files/
$(INSTALL_DIR) $(1)/opt/zapret/ipset
@ -92,14 +93,58 @@ define Package/$(PKG_NAME)/install
$(INSTALL_BIN) ./sync_config.sh $(1)/opt/zapret/sync_config.sh
endef
define Package/$(PKG_NAME)/preinst
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
if [ -f "/etc/init.d/zapret" ]; then
SCRIPT=$$( readlink /etc/init.d/zapret )
if [ -n "$${SCRIPT}" ]; then
echo "Please uninstall original zapret utility!"
exit 44
fi
fi
if [ "$${PKG_UPGRADE}" = "1" ]; then
# stop service if PKG_UPGRADE
[ -x "/etc/init.d/zapret" ] && /etc/init.d/zapret stop >/dev/null 2>&1
fi
fi
exit 0
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
NEWCFGNAME=zapret-opkg
NEWCFGFILE=/etc/config/$${NEWCFGNAME}
if [ -f "$${NEWCFGFILE}" ]; then
uci -m -f /etc/config/zapret import "$${NEWCFGNAME}"
uci commit "$${NEWCFGNAME}"
uci -m -f "$${NEWCFGFILE}" import zapret
uci commit zapret
rm -f "$${NEWCFGFILE}"
echo "File /etc/config/zapret merged from IPK"
fi
NEWCONFIG=/opt/zapret/config-opkg
if [ -f "$${NEWCONFIG}" ]; then
# backup current main config
mv -f /opt/zapret/config /opt/zapret/config.backup
# renew main config
mv -f "$${NEWCONFIG}" /opt/zapret/config
echo "File /opt/zapret/config replaced from IPK"
fi
# synchnonize main config
/opt/zapret/sync_config.sh
# enable main service
/etc/init.d/zapret enable
# stop all
/etc/init.d/zapret stop_fw
/etc/init.d/zapret stop_daemons
ps w | grep '/opt/zapret/nfq/nfqws' | grep -v grep | awk '{print $$1}' | xargs -r kill -9
# start main service
/etc/init.d/zapret start
# restart firewall
[ -x /sbin/fw4 ] && fw4 -q restart || fw3 -q restart
fi
exit 0
@ -108,17 +153,19 @@ endef
define Package/$(PKG_NAME)/prerm
#!/bin/sh
# check if we are on real system
if [ -n "$${IPKG_INSTROOT}" ]; then
if [ -z "$${IPKG_INSTROOT}" ]; then
EXEDIR=/opt/zapret
ZAPRET_BASE=/opt/zapret
ZAPRET_CONFIG=/opt/zapret/config
OPENWRT_FW_INCLUDE=/etc/firewall.zapret
. "$ZAPRET_CONFIG"
. "$ZAPRET_BASE/common/base.sh"
. "$ZAPRET_BASE/common/fwtype.sh"
. "$ZAPRET_BASE/common/installer.sh"
. "$${ZAPRET_CONFIG}"
. "$${ZAPRET_BASE}/common/base.sh"
. "$${ZAPRET_BASE}/common/fwtype.sh"
. "$${ZAPRET_BASE}/common/nft.sh"
. "$${ZAPRET_BASE}/common/installer.sh"
/etc/init.d/zapret disable
/etc/init.d/zapret stop
ps w | grep '/opt/zapret/nfq/nfqws' | grep -v grep | awk '{print $$1}' | xargs -r kill -9
remove_openwrt_firewall
nft_del_table
restart_openwrt_firewall
@ -126,4 +173,16 @@ fi
exit 0
endef
define Package/$(PKG_NAME)/postrm
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
[ -f "/etc/config/zapret-opkg" ] && rm -f "/etc/config/zapret-opkg"
[ -f "/opt/zapret/config" ] && cp -f /opt/zapret/config "/opt/zapret/config.backup2"
#rm -rf /opt/zapret
#echo "Directory /opt/zapret removed!"
fi
exit 0
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -68,7 +68,7 @@ DESYNC_MARK=0x40000000
DESYNC_MARK_POSTNAT=0x20000000
NFQWS_OPT_DESYNC="--dpi-desync=fake,disorder2 --dpi-desync-split-pos=1 --dpi-desync-ttl=0 --dpi-desync-fooling=md5sig,badsum --dpi-desync-repeats=6 --dpi-desync-any-protocol --dpi-desync-cutoff=d4 --dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin"
NFQWS_OPT_DESYNC="--dpi-desync=fake,split2 --dpi-desync-ttl=7 --dpi-desync-ttl6=0 --dpi-desync-repeats=20 --dpi-desync-fooling=md5sig,badseq --dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin"
NFQWS_OPT_DESYNC_SUFFIX=""
@ -88,7 +88,7 @@ NFQWS_OPT_DESYNC_HTTPS6=""
NFQWS_OPT_DESYNC_HTTPS6_SUFFIX=""
NFQWS_OPT_DESYNC_QUIC="--dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-ttl=0 --dpi-desync-any-protocol --dpi-desync-cutoff=d4 --dpi-desync-fooling=md5sig,badsum --dpi-desync-fake-quic=/opt/zapret/files/fake/quic_initial_google_com.bin"
NFQWS_OPT_DESYNC_QUIC="--dpi-desync=fake,split2 --dpi-desync-repeats=15 --dpi-desync-fake-quic=/opt/zapret/files/fake/quic_initial_www_google_com.bin --new --dpi-desync=fake --dpi-desync-repeats=15"
NFQWS_OPT_DESYNC_QUIC_SUFFIX=""

View File

@ -1,24 +1,13 @@
googlevideo.com
youtube.com
m.youtube.com
ytimg.com
s.ytimg.com
ytimg.l.google.com
youtube.l.google.com
i.google.com
youtu.be
yt.be
accounts.youtube.com
consent.youtube.com
realtimesupport.youtube.com
studio.youtube.com
i9.ytimg.com
i.ytimg.com
yt3.ggpht.com
youtubekids.com
googleusercontent.com
googleapis.com
youtubei.googleapis.com
notifications-pa.googleapis.com
gstatic.com
suggestqueries.google.com
ytimg.com
yt3.ggpht.com
yt4.ggpht.com
youtube.com
youtubeembeddedplayer.googleapis.com
ytimg.l.google.com
jnn-pa.googleapis.com
youtube-nocookie.com
youtube-ui.l.google.com
yt-video-upload.l.google.com
wide-youtube.l.google.com

View File

@ -46,6 +46,8 @@ sync_param INIT_APPLY_FW
sync_param DISABLE_IPV4
sync_param DISABLE_IPV6
sync_param MODE_FILTER
sync_param DESYNC_MARK
sync_param DESYNC_MARK_POSTNAT
sync_param NFQWS_OPT_DESYNC str
sync_param NFQWS_OPT_DESYNC_SUFFIX str
sync_param MODE_HTTP

View File

@ -7,7 +7,9 @@ config main 'config'
option DISABLE_IPV4 '0'
option DISABLE_IPV6 '1'
option MODE_FILTER 'hostlist'
option NFQWS_OPT_DESYNC '--dpi-desync=fake,disorder2 --dpi-desync-split-pos=1 --dpi-desync-ttl=0 --dpi-desync-fooling=md5sig,badsum --dpi-desync-repeats=6 --dpi-desync-any-protocol --dpi-desync-cutoff=d4 --dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin'
option DESYNC_MARK '0x40000000'
option DESYNC_MARK_POSTNAT '0x20000000'
option NFQWS_OPT_DESYNC '--dpi-desync=fake,split2 --dpi-desync-ttl=7 --dpi-desync-ttl6=0 --dpi-desync-repeats=20 --dpi-desync-fooling=md5sig,badseq --dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin'
option NFQWS_OPT_DESYNC_SUFFIX ''
option MODE_HTTP '1'
option MODE_HTTP_KEEPALIVE '0'
@ -21,7 +23,7 @@ config main 'config'
option NFQWS_OPT_DESYNC_HTTPS6 ''
option NFQWS_OPT_DESYNC_HTTPS6_SUFFIX ''
option MODE_QUIC '1'
option NFQWS_OPT_DESYNC_QUIC '--dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-ttl=0 --dpi-desync-any-protocol --dpi-desync-cutoff=d4 --dpi-desync-fooling=md5sig,badsum --dpi-desync-fake-quic=/opt/zapret/files/fake/quic_initial_google_com.bin'
option NFQWS_OPT_DESYNC_QUIC '--dpi-desync=fake,split2 --dpi-desync-repeats=15 --dpi-desync-fake-quic=/opt/zapret/files/fake/quic_initial_www_google_com.bin --new --dpi-desync=fake --dpi-desync-repeats=15'
option NFQWS_OPT_DESYNC_QUIC_SUFFIX ''
option NFQWS_OPT_DESYNC_QUIC6 ''
option NFQWS_OPT_DESYNC_QUIC6_SUFFIX ''