mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2026-01-04 07:38:50 +03:00
Compare commits
23 Commits
v64-202410
...
v65-202410
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
030b243bd6 | ||
|
|
f72a82bfe7 | ||
|
|
ed09612065 | ||
|
|
144b9369b9 | ||
|
|
79af08d99e | ||
|
|
8d915f3e1d | ||
|
|
241a733eec | ||
|
|
6cfcaf2a03 | ||
|
|
2e58533b4e | ||
|
|
6999144837 | ||
|
|
a6b89f3c2f | ||
|
|
facc4ac2bd | ||
|
|
8940c4bfa7 | ||
|
|
256c357554 | ||
|
|
6c0c3498bd | ||
|
|
b28c89e569 | ||
|
|
0f6e981616 | ||
|
|
86310e3cf9 | ||
|
|
f8feb83348 | ||
|
|
80518c32dc | ||
|
|
8f84cf46a8 | ||
|
|
bdff1d6a50 | ||
|
|
f8a756dd77 |
227
.github/workflows/build.yml
vendored
Normal file
227
.github/workflows/build.yml
vendored
Normal 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 {}).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
|
||||
6
README.md
Normal file
6
README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
[](https://github.com/remittor/zapret-openwrt/actions/workflows/build.yml)
|
||||
# zapret-openwrt
|
||||
|
||||
[Instructions for installing](https://github.com/remittor/zapret-openwrt/wiki/Installing-zapret‐openwrt-package)
|
||||
|
||||
[Download page](https://github.com/remittor/zapret-openwrt/releases)
|
||||
@@ -5,8 +5,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-zapret
|
||||
PKG_RELEASE:=20241012
|
||||
PKG_VERSION:=64-$(PKG_RELEASE)
|
||||
PKG_RELEASE:=20241023
|
||||
PKG_VERSION:=65-$(PKG_RELEASE)
|
||||
PKG_LICENSE:=MIT
|
||||
|
||||
LUCI_TITLE:=LuCI support for zapret
|
||||
|
||||
@@ -14,111 +14,92 @@ const btn_style_warning = 'btn cbi-button-negative';
|
||||
const btn_style_success = 'btn cbi-button-success important';
|
||||
|
||||
return view.extend({
|
||||
disableButtons: function(flag, btn, elems = [ ]) {
|
||||
let btn_start = elems[1] || document.getElementById("btn_start");
|
||||
//let btn_destroy = elems[4] || document.getElementById("btn_destroy");
|
||||
let btn_enable = elems[2] || document.getElementById("btn_enable");
|
||||
let btn_update = elems[3] || document.getElementById("btn_update");
|
||||
|
||||
disableButtons: function(flag, btn, elems = { }) {
|
||||
let btn_enable = elems.btn_enable || document.getElementById('btn_enable');
|
||||
let btn_disable = elems.btn_disable || document.getElementById('btn_disable');
|
||||
let btn_start = elems.btn_start || document.getElementById('btn_start');
|
||||
let btn_restart = elems.btn_restart || document.getElementById('btn_restart');
|
||||
let btn_stop = elems.btn_stop || document.getElementById('btn_stop');
|
||||
let btn_update = elems.btn_update || document.getElementById('btn_update');
|
||||
btn_enable.disabled = flag;
|
||||
btn_disable.disabled = flag;
|
||||
btn_start.disabled = flag;
|
||||
btn_restart.disabled = flag;
|
||||
btn_stop.disabled = flag;
|
||||
btn_update.disabled = true; // TODO
|
||||
//btn_destroy.disabled = flag;
|
||||
if (btn === btn_update) {
|
||||
btn_enable.disabled = false;
|
||||
} else {
|
||||
btn_enable.disabled = flag;
|
||||
}
|
||||
},
|
||||
|
||||
getAppStatus: function() {
|
||||
return Promise.all([
|
||||
{ code: -1 }, //fs.exec(tools.execPath, [ 'raw-status' ]),
|
||||
{ code: -1 }, //fs.exec(tools.execPath, [ 'vpn-route-status' ]),
|
||||
tools.getInitStatus(tools.appName),
|
||||
//L.resolveDefault(fs.read(tools.tokenFile), 0),
|
||||
uci.load(tools.appName),
|
||||
tools.getInitState(tools.appName), // svc_state
|
||||
fs.exec(tools.execPath, [ 'info' ]), // svc_info
|
||||
fs.exec('/bin/ps'), // process list
|
||||
uci.load(tools.appName), // config
|
||||
]).catch(e => {
|
||||
ui.addNotification(null, E('p', _('Unable to execute or read contents')
|
||||
+ ': %s [ %s | %s | %s ]'.format(
|
||||
e.message, tools.execPath, 'tools.getInitStatus', 'uci.zapret'
|
||||
e.message, tools.execPath, 'tools.getInitState', 'uci.zapret'
|
||||
)));
|
||||
});
|
||||
},
|
||||
|
||||
setAppStatus: function(status_array, elems = [ ], force_app_code = 0) {
|
||||
let section = uci.get(tools.appName, 'config');
|
||||
if (!status_array || section == null || typeof(section) !== 'object') {
|
||||
(elems[0] || document.getElementById("status")).innerHTML = tools.makeStatusString(1);
|
||||
setAppStatus: function(status_array, elems = { }, force_app_status = 0) {
|
||||
let cfg = uci.get(tools.appName, 'config');
|
||||
if (!status_array || cfg == null || typeof(cfg) !== 'object') {
|
||||
let elem_status = elems.status || document.getElementById("status");
|
||||
elem_status.innerHTML = tools.makeStatusString(null);
|
||||
ui.addNotification(null, E('p', _('Unable to read the contents') + ': setAppStatus()'));
|
||||
this.disableButtons(true, null, elems);
|
||||
return;
|
||||
}
|
||||
|
||||
let app_status_code = (force_app_code) ? force_app_code : status_array[0].code;
|
||||
let vpn_route_status_code = status_array[1].code;
|
||||
let enabled_flag = status_array[2];
|
||||
let z_fwtype = section.FWTYPE;
|
||||
let z_mode = section.MODE;
|
||||
let bllist_preset = 'user_only';
|
||||
|
||||
let btn_enable = elems[2] || document.getElementById('btn_enable');
|
||||
/*
|
||||
if (enabled_flag == true) {
|
||||
btn_enable.onclick = ui.createHandlerFn(this, this.serviceAction, 'disable', 'btn_enable');
|
||||
btn_enable.textContent = _('Enabled');
|
||||
btn_enable.className = btn_style_positive;
|
||||
} else {
|
||||
btn_enable.onclick = ui.createHandlerFn(this, this.serviceAction, 'enable', 'btn_enable');
|
||||
btn_enable.textContent = _('Disabled');
|
||||
btn_enable.className = btn_style_negative;
|
||||
}
|
||||
*/
|
||||
let btn_start = elems[1] || document.getElementById('btn_start');
|
||||
let btn_update = elems[3] || document.getElementById('btn_update');
|
||||
//let btn_destroy = elems[4] || document.getElementById('btn_destroy');
|
||||
|
||||
let btnStartStateOn = () => {
|
||||
//btn_start.onclick = ui.createHandlerFn(this, this.appAction, 'stop', 'btn_start');
|
||||
//btn_start.textContent = _('Enabled');
|
||||
//btn_start.className = btn_style_positive;
|
||||
};
|
||||
|
||||
let btnStartStateOff = () => {
|
||||
//btn_start.onclick = ui.createHandlerFn(this, this.appAction, 'start', 'btn_start');
|
||||
//btn_start.textContent = _('Disabled');
|
||||
//btn_start.className = btn_style_negative;
|
||||
};
|
||||
|
||||
if (app_status_code == -1) {
|
||||
this.disableButtons(false, null, elems);
|
||||
btnStartStateOn();
|
||||
}
|
||||
else if (app_status_code == 0) {
|
||||
this.disableButtons(false, null, elems);
|
||||
btnStartStateOn();
|
||||
//btn_destroy.disabled = false;
|
||||
btn_update.disabled = false;
|
||||
}
|
||||
else if (app_status_code == 2) {
|
||||
this.disableButtons(false, null, elems);
|
||||
btnStartStateOff();
|
||||
btn_update.disabled = true;
|
||||
}
|
||||
else if (app_status_code == 3) {
|
||||
btnStartStateOff();
|
||||
this.disableButtons(true, btn_start, elems);
|
||||
}
|
||||
else if (app_status_code == 4) {
|
||||
btnStartStateOn();
|
||||
this.disableButtons(true, btn_update, elems);
|
||||
}
|
||||
else {
|
||||
ui.addNotification(null, E('p', _('Error')
|
||||
+ ' %s: return code = %s'.format(tools.execPath, app_status_code)));
|
||||
let svc_autorun = status_array[0] ? true : false;
|
||||
let svc_info = status_array[1]; // stdout: JSON as text
|
||||
let proc_list = status_array[2]; // stdout: multiline text
|
||||
if (svc_info.code != 0) {
|
||||
ui.addNotification(null, E('p', _('Unable to read the service info') + ': setAppStatus()'));
|
||||
this.disableButtons(true, null, elems);
|
||||
return;
|
||||
}
|
||||
if (proc_list.code != 0) {
|
||||
ui.addNotification(null, E('p', _('Unable to read process list') + ': setAppStatus()'));
|
||||
this.disableButtons(true, null, elems);
|
||||
return;
|
||||
}
|
||||
let svcinfo;
|
||||
if (force_app_status) {
|
||||
svcinfo = force_app_status;
|
||||
} else {
|
||||
svcinfo = tools.decode_svc_info(svc_autorun, svc_info, proc_list, cfg);
|
||||
}
|
||||
let btn_enable = elems.btn_enable || document.getElementById('btn_enable');
|
||||
let btn_disable = elems.btn_disable || document.getElementById('btn_disable');
|
||||
|
||||
(elems[0] || document.getElementById("status")).innerHTML = tools.makeStatusString(app_status_code, z_fwtype, bllist_preset);
|
||||
let btn_start = elems.btn_start || document.getElementById('btn_start');
|
||||
let btn_restart = elems.btn_restart || document.getElementById('btn_restart');
|
||||
let btn_stop = elems.btn_stop || document.getElementById('btn_stop');
|
||||
|
||||
let btn_update = elems.btn_update || document.getElementById('btn_update');
|
||||
btn_update.disabled = true; // TODO
|
||||
|
||||
if (Number.isInteger(svcinfo)) {
|
||||
ui.addNotification(null, E('p', _('Error')
|
||||
+ ' %s: return code = %s'.format('decode_svc_info', svcinfo + ' ')));
|
||||
this.disableButtons(true, null, elems);
|
||||
} else {
|
||||
btn_enable.disabled = (svc_autorun) ? true : false;
|
||||
btn_disable.disabled = (svc_autorun) ? false : true;
|
||||
if (svcinfo.dmn.total == 0) {
|
||||
btn_start.disabled = false;
|
||||
btn_restart.disabled = true;
|
||||
btn_stop.disabled = true;
|
||||
} else {
|
||||
btn_start.disabled = true;
|
||||
btn_restart.disabled = false;
|
||||
btn_stop.disabled = false;
|
||||
}
|
||||
}
|
||||
let elem_status = elems.status || document.getElementById("status");
|
||||
elem_status.innerHTML = tools.makeStatusString(svcinfo, cfg.FWTYPE, 'user_only');
|
||||
|
||||
if (!poll.active()) {
|
||||
poll.start();
|
||||
@@ -130,12 +111,33 @@ return view.extend({
|
||||
let elem = document.getElementById(button);
|
||||
this.disableButtons(true, elem);
|
||||
}
|
||||
|
||||
poll.stop();
|
||||
|
||||
let _this = this;
|
||||
|
||||
return fs.exec('/opt/zapret/sync_config.sh')
|
||||
return tools.handleServiceAction(tools.appName, action)
|
||||
.then(() => {
|
||||
return _this.getAppStatus().then(
|
||||
(status_array) => {
|
||||
_this.setAppStatus(status_array);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(e => {
|
||||
ui.addNotification(null, E('p', _('Unable to run service action.') + ' Error: ' + e.message));
|
||||
});
|
||||
},
|
||||
|
||||
serviceActionEx: function(action, button) {
|
||||
if (button) {
|
||||
let elem = document.getElementById(button);
|
||||
this.disableButtons(true, elem);
|
||||
}
|
||||
poll.stop();
|
||||
|
||||
let _this = this;
|
||||
|
||||
return fs.exec(tools.syncCfgPath)
|
||||
.then(function(res) {
|
||||
if (res.code != 0) {
|
||||
ui.addNotification(null, E('p', _('Unable to run sync_config.sh script.') + ' res.code = ' + res.code));
|
||||
@@ -145,13 +147,7 @@ return view.extend({
|
||||
}
|
||||
);
|
||||
}
|
||||
return tools.handleServiceAction(tools.appName, action).then(() => {
|
||||
return _this.getAppStatus().then(
|
||||
(status_array) => {
|
||||
_this.setAppStatus(status_array);
|
||||
}
|
||||
);
|
||||
});
|
||||
return _this.serviceAction(action, null);
|
||||
})
|
||||
.catch(e => {
|
||||
ui.addNotification(null, E('p', _('Unable to run sync_config.sh script.') + ' Error: ' + e.message));
|
||||
@@ -225,8 +221,7 @@ return view.extend({
|
||||
if (!status_array) {
|
||||
return;
|
||||
}
|
||||
|
||||
let section = uci.get(tools.appName, 'config');
|
||||
let cfg = uci.get(tools.appName, 'config');
|
||||
|
||||
let status_string = E('div', {
|
||||
'id' : 'status',
|
||||
@@ -236,15 +231,15 @@ return view.extend({
|
||||
|
||||
let layout = E('div', { 'class': 'cbi-section-node' });
|
||||
|
||||
function layout_append(title, descr, elem) {
|
||||
function layout_append(title, descr, elems) {
|
||||
descr = (descr) ? E('div', { 'class': 'cbi-value-description' }, descr) : '';
|
||||
let elist;
|
||||
if (elem instanceof E) {
|
||||
elist = [ elem ];
|
||||
} else {
|
||||
elist = elem;
|
||||
let elist = elems;
|
||||
let elem_list = [ ];
|
||||
for (let i = 0; i < elist.length; i++) {
|
||||
elem_list.push(elist[i]);
|
||||
elem_list.push(' ');
|
||||
}
|
||||
let vlist = [ E('div', {}, elist ) ];
|
||||
let vlist = [ E('div', {}, elem_list ) ];
|
||||
for (let i = 0; i < elist.length; i++) {
|
||||
let input = E('input', {
|
||||
'id' : elist[i].id + '_hidden',
|
||||
@@ -252,9 +247,10 @@ return view.extend({
|
||||
});
|
||||
vlist.push(input);
|
||||
}
|
||||
let elem_name = (elist.length == 1) ? elist[0].id + '_hidden' : null;
|
||||
layout.append(
|
||||
E('div', { 'class': 'cbi-value' }, [
|
||||
E('label', { 'class': 'cbi-value-title', 'for': elem.id + '_hidden' || null }, title),
|
||||
E('label', { 'class': 'cbi-value-title', 'for': elem_name }, title),
|
||||
E('div', { 'class': 'cbi-value-field' }, vlist),
|
||||
])
|
||||
);
|
||||
@@ -272,26 +268,32 @@ return view.extend({
|
||||
btn_enable.onclick = ui.createHandlerFn(this, this.serviceAction, 'enable', 'btn_enable');
|
||||
let btn_disable = create_btn('btn_disable', btn_style_warning, _('Disable'));
|
||||
btn_disable.onclick = ui.createHandlerFn(this, this.serviceAction, 'disable', 'btn_disable');
|
||||
layout_append(_('Service Status'), null, [ btn_enable, btn_disable ] );
|
||||
layout_append(_('Service autorun control'), null, [ btn_enable, btn_disable ] );
|
||||
|
||||
let btn_start = create_btn('btn_start', btn_style_action, _('Start'));
|
||||
btn_start.onclick = ui.createHandlerFn(this, this.serviceAction, 'start', 'btn_start');
|
||||
btn_start.onclick = ui.createHandlerFn(this, this.serviceActionEx, 'start', 'btn_start');
|
||||
let btn_restart = create_btn('btn_restart', btn_style_action, _('Restart'));
|
||||
btn_restart.onclick = ui.createHandlerFn(this, this.serviceAction, 'restart', 'btn_restart');
|
||||
btn_restart.onclick = ui.createHandlerFn(this, this.serviceActionEx, 'restart', 'btn_restart');
|
||||
let btn_stop = create_btn('btn_stop', btn_style_warning, _('Stop'));
|
||||
btn_stop.onclick = ui.createHandlerFn(this, this.serviceAction, 'stop', 'btn_stop');
|
||||
layout_append(_('Service Control'), null, [ btn_start, btn_restart, btn_stop ] );
|
||||
layout_append(_('Service daemons control'), null, [ btn_start, btn_restart, btn_stop ] );
|
||||
|
||||
let btn_update = create_btn('btn_update', btn_style_action, _('Update'));
|
||||
btn_update.onclick = ui.createHandlerFn(this, () => { this.appAction('update', 'btn_update') });
|
||||
layout_append(_('Update blacklist'), null, btn_update);
|
||||
layout_append(_('Update blacklist'), null, [ btn_update ] );
|
||||
|
||||
let btn_destroy = create_btn('btn_destroy', btn_style_negative, _('Shutdown'));
|
||||
btn_destroy.onclick = L.bind(this.dialogDestroy, this);
|
||||
//layout_append(_('Shutdown'), _('Complete service shutdown'), btn_destroy);
|
||||
|
||||
//let elems = [ status_string, btn_start, btn_enable, btn_update, btn_destroy ];
|
||||
let elems = [ status_string, btn_start, btn_enable, btn_update ];
|
||||
let elems = {
|
||||
"status": status_string,
|
||||
"btn_enable": btn_enable,
|
||||
"btn_disable": btn_disable,
|
||||
"btn_start": btn_start,
|
||||
"btn_restart": btn_restart,
|
||||
"btn_stop": btn_stop,
|
||||
"btn_update": btn_update,
|
||||
};
|
||||
this.setAppStatus(status_array, elems);
|
||||
|
||||
poll.add(L.bind(this.statusPoll, this));
|
||||
@@ -309,7 +311,6 @@ return view.extend({
|
||||
),
|
||||
E('div', { 'class': 'cbi-section fade-in' }, [
|
||||
status_string,
|
||||
E('hr'),
|
||||
]),
|
||||
E('div', { 'class': 'cbi-section fade-in' },
|
||||
layout
|
||||
|
||||
@@ -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,43 @@ 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.Value, 'HTTP_PORTS', _('HTTP_PORTS'));
|
||||
o.rmempty = false;
|
||||
o.datatype = 'string';
|
||||
|
||||
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_HTTPS', _('MODE_HTTPS'));
|
||||
o.rmempty = false;
|
||||
o.default = 0;
|
||||
|
||||
o = s.taboption(tabname, form.Value, 'HTTPS_PORTS', _('HTTPS_PORTS'));
|
||||
o.rmempty = false;
|
||||
o.datatype = 'string';
|
||||
|
||||
o = s.taboption(tabname, form.Flag, 'MODE_QUIC', _('MODE_QUIC'));
|
||||
o.rmempty = false;
|
||||
o.default = 0;
|
||||
|
||||
o = s.taboption(tabname, form.Value, 'QUIC_PORTS', _('QUIC_PORTS'));
|
||||
o.rmempty = false;
|
||||
o.datatype = 'string';
|
||||
|
||||
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 +200,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.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.ipFilterFile,
|
||||
_('IP filter'),
|
||||
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;
|
||||
|
||||
@@ -36,18 +36,34 @@ 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',
|
||||
syncCfgPath : '/opt/zapret/sync_config.sh',
|
||||
|
||||
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',
|
||||
|
||||
infoLabelRunning : '<span class="label-status running">' + _('Running') + '</span>',
|
||||
infoLabelStarting : '<span class="label-status starting">' + _('Starting') + '</span>',
|
||||
infoLabelRunning : '<span class="label-status running">' + _('Enabled') + '</span>',
|
||||
infoLabelUpdating : '<span class="label-status updating">' + _('Updating') + '</span>',
|
||||
infoLabelStopped : '<span class="label-status stopped">' + _('Disabled') + '</span>',
|
||||
infoLabelError : '<span class="label-status error">' + _('Error') + '</span>',
|
||||
infoLabelStopped : '<span class="label-status stopped">' + _('Stopped') + '</span>',
|
||||
infoLabelDisabled : '<span class="label-status stopped">' + _('Disabled') + '</span>',
|
||||
infoLabelError : '<span class="label-status error">' + _('Error') + '</span>',
|
||||
|
||||
callInitStatus: rpc.declare({
|
||||
infoLabelUpdating : '<span class="label-status updating">' + _('Updating') + '</span>',
|
||||
|
||||
statusDict: {
|
||||
error : { code: 0, name: _('Error') , label: this.infoLabelError },
|
||||
disabled : { code: 1, name: _('Disabled') , label: this.infoLabelDisabled },
|
||||
stopped : { code: 2, name: _('Stopped') , label: this.infoLabelStopped },
|
||||
starting : { code: 3, name: _('Starting') , label: this.infoLabelStarting },
|
||||
running : { code: 4, name: _('Running') , label: this.infoLabelRunning },
|
||||
},
|
||||
|
||||
callInitState: rpc.declare({
|
||||
object: 'luci',
|
||||
method: 'getInitList',
|
||||
params: [ 'name' ],
|
||||
@@ -61,10 +77,10 @@ return baseclass.extend({
|
||||
expect: { result: false }
|
||||
}),
|
||||
|
||||
getInitStatus: function(name) {
|
||||
return this.callInitStatus(name).then(res => {
|
||||
getInitState: function(name) {
|
||||
return this.callInitState(name).then(res => {
|
||||
if (res) {
|
||||
return res[name].enabled;
|
||||
return res[name].enabled ? true : false;
|
||||
} else {
|
||||
throw _('Command failed');
|
||||
}
|
||||
@@ -88,72 +104,130 @@ return baseclass.extend({
|
||||
return (v && typeof(v) === 'string') ? v.trim().replace(/\r?\n/g, '') : v;
|
||||
},
|
||||
|
||||
makeStatusString: function(app_status_code, fwtype, bllist_preset) {
|
||||
let app_status_label;
|
||||
let spinning = '';
|
||||
/*
|
||||
switch(app_status_code) {
|
||||
case 0:
|
||||
app_status_label = this.infoLabelRunning;
|
||||
break;
|
||||
case 2:
|
||||
app_status_label = this.infoLabelStopped;
|
||||
break;
|
||||
case 3:
|
||||
app_status_label = this.infoLabelStarting;
|
||||
spinning = ' spinning';
|
||||
break;
|
||||
case 4:
|
||||
app_status_label = this.infoLabelUpdating;
|
||||
spinning = ' spinning';
|
||||
break;
|
||||
default:
|
||||
app_status_label = this.infoLabelError;
|
||||
return `<table class="table">
|
||||
<tr class="tr">
|
||||
<td class="td left" style="min-width:33%%">
|
||||
${_('Status')}:
|
||||
</td>
|
||||
<td class="td left">
|
||||
${app_status_label}
|
||||
</td>
|
||||
</tr>
|
||||
</table>`;
|
||||
get_pid_list: function(proc_list) {
|
||||
let plist = [ ];
|
||||
let lines = proc_list.trim().split('\n');
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
let line = lines[i].trim();
|
||||
if (line.length > 5) {
|
||||
let word_list = line.split(/\s+/);
|
||||
let pid = word_list[0];
|
||||
let isnum = /^\d+$/.test(pid);
|
||||
if (isnum) {
|
||||
plist.push(parseInt(pid));
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
return `<table class="table">
|
||||
return plist;
|
||||
},
|
||||
|
||||
decode_svc_info: function(svc_autorun, svc_info, proc_list, cfg) {
|
||||
let result = {
|
||||
"autorun": svc_autorun,
|
||||
"dmn": {
|
||||
total: 0,
|
||||
running: 0,
|
||||
working: 0,
|
||||
},
|
||||
"status": this.statusDict.error,
|
||||
};
|
||||
if (svc_info.code != 0) {
|
||||
return -1;
|
||||
}
|
||||
if (proc_list.code != 0) {
|
||||
return -2;
|
||||
}
|
||||
let plist = this.get_pid_list(proc_list.stdout);
|
||||
|
||||
let jdata = JSON.parse(svc_info.stdout);
|
||||
if (typeof(jdata) !== 'object') {
|
||||
return -3;
|
||||
}
|
||||
if (typeof(jdata.zapret) == 'object') {
|
||||
let dmn_list = jdata.zapret.instances;
|
||||
if (typeof(dmn_list) !== 'object') {
|
||||
return -4;
|
||||
}
|
||||
for (const [dmn_name, daemon] of Object.entries(dmn_list)) {
|
||||
result.dmn.total += 1;
|
||||
if (daemon.running) {
|
||||
result.dmn.running += 1;
|
||||
}
|
||||
if (daemon.pid !== undefined && daemon.pid != null) {
|
||||
if (plist.includes(daemon.pid)) {
|
||||
result.dmn.working += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//console.log('SVC_DAEMONS: ' + result.dmn.working + ' / ' + result.dmn.total);
|
||||
if (result.dmn.total == 0) {
|
||||
result.status = (!svc_autorun) ? this.statusDict.disabled : this.statusDict.stopped;
|
||||
} else {
|
||||
result.status = (!result.dmn.working) ? this.statusDict.started : this.statusDict.running;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
makeStatusString: function(svcinfo, fwtype, bllist_preset) {
|
||||
let svc_autorun = _('Unknown');
|
||||
let svc_daemons = _('Unknown');
|
||||
|
||||
if (typeof(svcinfo) == 'object') {
|
||||
svc_autorun = (svcinfo.autorun) ? _('Enabled') : _('Disabled');
|
||||
if (svcinfo.dmn.total == 0) {
|
||||
svc_daemons = _('Stopped');
|
||||
} else {
|
||||
svc_daemons = (!svcinfo.dmn.working) ? _('Starting') : _('Running');
|
||||
svc_daemons += ' [' + svcinfo.dmn.working + '/' + svcinfo.dmn.total + ']';
|
||||
}
|
||||
}
|
||||
let update_mode = _('user entries only');
|
||||
|
||||
let td_name_width = 40;
|
||||
let td_name_style = `style="width: ${td_name_width}%; min-width:${td_name_width}%; max-width:${td_name_width}%;"`;
|
||||
let out = `
|
||||
<table class="table">
|
||||
<tr class="tr">
|
||||
<td class="td left" style="min-width:33%%">
|
||||
${_('Status')}:
|
||||
<td class="td left" ${td_name_style}>
|
||||
${_('Service autorun status')}:
|
||||
</td>
|
||||
<td class="td left%s">
|
||||
%s %s
|
||||
<td class="td left">
|
||||
${svc_autorun}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr">
|
||||
<td class="td left">
|
||||
<td class="td left" ${td_name_style}>
|
||||
${_('Service daemons status')}:
|
||||
</td>
|
||||
<td class="td left %s">
|
||||
${svc_daemons}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr">
|
||||
<td class="td left" ${td_name_style}>
|
||||
${_('FW type')}:
|
||||
</td>
|
||||
<td class="td left">
|
||||
%s
|
||||
${fwtype}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr">
|
||||
<td class="td left">
|
||||
<td class="td left" ${td_name_style}>
|
||||
${_('Blacklist update mode')}:
|
||||
</td>
|
||||
<td class="td left">
|
||||
%s
|
||||
${update_mode}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
`.format(
|
||||
spinning,
|
||||
app_status_label,
|
||||
'',
|
||||
fwtype,
|
||||
_('user entries only')
|
||||
);
|
||||
<tr class="tr">
|
||||
<td class="td left" ${td_name_style}>
|
||||
</td>
|
||||
<td class="td left">
|
||||
</td>
|
||||
</tr>
|
||||
</table>`;
|
||||
return out;
|
||||
},
|
||||
|
||||
fileEditDialog: baseclass.extend({
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"/opt/zapret/ipset/*": [ "read" ],
|
||||
"/etc/crontabs/root": [ "read" ],
|
||||
"/etc/init.d/zapret*": [ "exec" ],
|
||||
"/bin/ps*": [ "exec" ],
|
||||
"/opt/zapret/sync_config.sh*": [ "exec" ]
|
||||
},
|
||||
"uci": [ "zapret", "network" ],
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret-ip2net
|
||||
PKG_VERSION:=64
|
||||
PKG_RELEASE:=20241012
|
||||
PKG_VERSION:=65
|
||||
PKG_RELEASE:=20241023
|
||||
|
||||
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:=5cd5ab176ebe020f0af66829254dc29f275c1840
|
||||
PKG_SOURCE_DATE:=2024-10-23
|
||||
|
||||
#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
|
||||
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret-mdig
|
||||
PKG_VERSION:=64
|
||||
PKG_RELEASE:=20241012
|
||||
PKG_VERSION:=65
|
||||
PKG_RELEASE:=20241023
|
||||
|
||||
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:=5cd5ab176ebe020f0af66829254dc29f275c1840
|
||||
PKG_SOURCE_DATE:=2024-10-23
|
||||
|
||||
#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
|
||||
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret-tpws
|
||||
PKG_VERSION:=64
|
||||
PKG_RELEASE:=20241012
|
||||
PKG_VERSION:=65
|
||||
PKG_RELEASE:=20241023
|
||||
|
||||
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:=5cd5ab176ebe020f0af66829254dc29f275c1840
|
||||
PKG_SOURCE_DATE:=2024-10-23
|
||||
|
||||
#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
|
||||
|
||||
113
zapret/Makefile
113
zapret/Makefile
@@ -5,21 +5,26 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret
|
||||
PKG_VERSION:=64
|
||||
PKG_RELEASE:=20241012
|
||||
PKG_VERSION:=65
|
||||
PKG_RELEASE:=20241023
|
||||
|
||||
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:=5cd5ab176ebe020f0af66829254dc29f275c1840
|
||||
PKG_SOURCE_DATE:=2024-10-23
|
||||
|
||||
#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)))
|
||||
|
||||
@@ -42,9 +42,9 @@ GZIP_LISTS=0
|
||||
#LISTS_RELOAD="pfctl -f /etc/pf.conf"
|
||||
|
||||
# override ports
|
||||
#HTTP_PORTS=80-81,85
|
||||
#HTTPS_PORTS=443,500-501
|
||||
#QUIC_PORTS=443,444
|
||||
HTTP_PORTS=80
|
||||
HTTPS_PORTS=443
|
||||
QUIC_PORTS=443
|
||||
|
||||
# CHOOSE OPERATION MODE
|
||||
# MODE : nfqws,tpws,tpws-socks,filter,custom
|
||||
@@ -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=""
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -46,20 +46,25 @@ 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
|
||||
sync_param MODE_HTTP_KEEPALIVE
|
||||
sync_param HTTP_PORTS
|
||||
sync_param NFQWS_OPT_DESYNC_HTTP str
|
||||
sync_param NFQWS_OPT_DESYNC_HTTP_SUFFIX str
|
||||
sync_param NFQWS_OPT_DESYNC_HTTP6 str
|
||||
sync_param NFQWS_OPT_DESYNC_HTTP6_SUFFIX str
|
||||
sync_param MODE_HTTPS
|
||||
sync_param HTTPS_PORTS
|
||||
sync_param NFQWS_OPT_DESYNC_HTTPS str
|
||||
sync_param NFQWS_OPT_DESYNC_HTTPS_SUFFIX str
|
||||
sync_param NFQWS_OPT_DESYNC_HTTPS6 str
|
||||
sync_param NFQWS_OPT_DESYNC_HTTPS6_SUFFIX str
|
||||
sync_param MODE_QUIC
|
||||
sync_param QUIC_PORTS
|
||||
sync_param NFQWS_OPT_DESYNC_QUIC str
|
||||
sync_param NFQWS_OPT_DESYNC_QUIC_SUFFIX str
|
||||
sync_param NFQWS_OPT_DESYNC_QUIC6 str
|
||||
|
||||
@@ -7,21 +7,26 @@ 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'
|
||||
option HTTP_PORTS '80'
|
||||
option NFQWS_OPT_DESYNC_HTTP ''
|
||||
option NFQWS_OPT_DESYNC_HTTP_SUFFIX ''
|
||||
option NFQWS_OPT_DESYNC_HTTP6 ''
|
||||
option NFQWS_OPT_DESYNC_HTTP6_SUFFIX ''
|
||||
option MODE_HTTPS '1'
|
||||
option HTTPS_PORTS '443'
|
||||
option NFQWS_OPT_DESYNC_HTTPS ''
|
||||
option NFQWS_OPT_DESYNC_HTTPS_SUFFIX ''
|
||||
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 QUIC_PORTS '443'
|
||||
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 ''
|
||||
|
||||
Reference in New Issue
Block a user