mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2026-01-06 08:38:50 +03:00
Compare commits
12 Commits
v66-202410
...
v68-202411
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0d77d6c8a | ||
|
|
d03ca95c93 | ||
|
|
f42c6da005 | ||
|
|
1b2bd2bdd5 | ||
|
|
2cf3d0b996 | ||
|
|
d463d2e39e | ||
|
|
148a397051 | ||
|
|
9f73af44dd | ||
|
|
40f0432b1c | ||
|
|
ca11a6cd55 | ||
|
|
39833fdcea | ||
|
|
425fde748f |
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
- v[0-9]+*
|
||||
|
||||
jobs:
|
||||
check:
|
||||
@@ -63,6 +63,7 @@ jobs:
|
||||
#if: needs.check.outputs.is_active == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
#branch: [ openwrt-22.03, openwrt-23.05 ]
|
||||
branch: [ openwrt-23.05 ]
|
||||
@@ -111,6 +112,17 @@ jobs:
|
||||
repository: 'remittor/zapret-openwrt'
|
||||
path: zapret-openwrt
|
||||
|
||||
- name: Setup OpenWrt SDK
|
||||
if: ${{ matrix.branch == 'openwrt-23.05' || matrix.branch == 'SNAPSHOT' }}
|
||||
working-directory: /builder
|
||||
shell: bash
|
||||
run: |
|
||||
# gpg --verbose --recv-keys 0x1D53D1877742E911
|
||||
gpg --verbose --import <(wget -qO- 'https://git.openwrt.org/?p=keyring.git;a=blob_plain;f=gpg/0x1D53D1877742E911.asc')
|
||||
sed -r -i 's/^rm.+//' setup.sh
|
||||
./setup.sh
|
||||
ls -lh
|
||||
|
||||
- name: Setup ccache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -132,8 +144,8 @@ jobs:
|
||||
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/
|
||||
#find $GITHUB_WORKSPACE/zapret-openwrt -type d -path '*/package/zapret' -exec cp -vr {} ./package \;
|
||||
cp -vr $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
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-zapret
|
||||
PKG_RELEASE:=20241026
|
||||
PKG_VERSION:=66-$(PKG_RELEASE)
|
||||
PKG_RELEASE:=20241110
|
||||
PKG_VERSION:=68-$(PKG_RELEASE)
|
||||
PKG_LICENSE:=MIT
|
||||
|
||||
LUCI_TITLE:=LuCI support for zapret
|
||||
|
||||
@@ -22,6 +22,7 @@ return view.extend({
|
||||
restart : elems.btn_restart || document.getElementById('btn_restart'),
|
||||
stop : elems.btn_stop || document.getElementById('btn_stop'),
|
||||
update : elems.btn_update || document.getElementById('btn_update'),
|
||||
reset : elems.btn_update || document.getElementById('btn_reset'),
|
||||
};
|
||||
},
|
||||
|
||||
@@ -33,6 +34,7 @@ return view.extend({
|
||||
btn.restart.disabled = flag;
|
||||
btn.stop.disabled = flag;
|
||||
btn.update.disabled = true; // TODO
|
||||
btn.reset.disabled = flag;
|
||||
},
|
||||
|
||||
getAppStatus: function() {
|
||||
@@ -86,6 +88,7 @@ return view.extend({
|
||||
}
|
||||
let btn = this.get_svc_buttons(elems);
|
||||
btn.update.disabled = true; // TODO
|
||||
btn.reset.disabled = false;
|
||||
|
||||
if (Number.isInteger(svcinfo)) {
|
||||
ui.addNotification(null, E('p', _('Error')
|
||||
@@ -134,7 +137,7 @@ return view.extend({
|
||||
});
|
||||
},
|
||||
|
||||
serviceActionEx: function(action, button) {
|
||||
serviceActionEx: function(action, button, hide_modal = false) {
|
||||
if (button) {
|
||||
let elem = document.getElementById(button);
|
||||
this.disableButtons(true, elem);
|
||||
@@ -142,11 +145,32 @@ return view.extend({
|
||||
poll.stop();
|
||||
|
||||
let _this = this;
|
||||
|
||||
return fs.exec(tools.syncCfgPath)
|
||||
let exec_cmd = null;
|
||||
let exec_arg = [ ];
|
||||
let errmsg = 'ERROR:';
|
||||
if (action == 'start' || action == 'restart') {
|
||||
exec_cmd = tools.syncCfgPath;
|
||||
errmsg = _('Unable to run sync_config.sh script.');
|
||||
}
|
||||
else if (action == 'reset') {
|
||||
exec_cmd = tools.defaultCfgPath;
|
||||
exec_arg = [ '-f' ];
|
||||
errmsg = _('Unable to run uci-def-cfg.sh script.');
|
||||
action = null;
|
||||
} else {
|
||||
ui.addNotification(null, E('p', 'ERROR: unknown action'));
|
||||
return null;
|
||||
}
|
||||
return fs.exec(exec_cmd, exec_arg)
|
||||
.then(function(res) {
|
||||
if (res.code != 0) {
|
||||
ui.addNotification(null, E('p', _('Unable to run sync_config.sh script.') + ' res.code = ' + res.code));
|
||||
ui.addNotification(null, E('p', errmsg + ' res.code = ' + res.code));
|
||||
action = null; // return with error
|
||||
}
|
||||
if (hide_modal) {
|
||||
ui.hideModal();
|
||||
}
|
||||
if (!action) {
|
||||
return _this.getAppStatus().then(
|
||||
(status_array) => {
|
||||
_this.setAppStatus(status_array);
|
||||
@@ -156,7 +180,7 @@ return view.extend({
|
||||
return _this.serviceAction(action, null);
|
||||
})
|
||||
.catch(e => {
|
||||
ui.addNotification(null, E('p', _('Unable to run sync_config.sh script.') + ' Error: ' + e.message));
|
||||
ui.addNotification(null, E('p', errmsg + ' Error: ' + e.message));
|
||||
});
|
||||
},
|
||||
|
||||
@@ -192,29 +216,29 @@ return view.extend({
|
||||
);
|
||||
},
|
||||
|
||||
dialogDestroy: function(ev) {
|
||||
dialogResetCfg: function(ev) {
|
||||
ev.target.blur();
|
||||
let cancel_button = E('button', {
|
||||
'class': btn_style_neutral,
|
||||
'click': ui.hideModal,
|
||||
}, _('Cancel'));
|
||||
|
||||
let shutdown_btn = E('button', {
|
||||
'class': btn_style_warning,
|
||||
}, _('Shutdown'));
|
||||
shutdown_btn.onclick = ui.createHandlerFn(this, () => {
|
||||
let resetcfg_btn = E('button', {
|
||||
'class': btn_style_action,
|
||||
}, _('Reset settings'));
|
||||
resetcfg_btn.onclick = ui.createHandlerFn(this, () => {
|
||||
cancel_button.disabled = true;
|
||||
return this.appAction('destroy');
|
||||
return this.serviceActionEx('reset', resetcfg_btn, true);
|
||||
});
|
||||
|
||||
ui.showModal(_('Shutdown'), [
|
||||
ui.showModal(_('Reset settings to default'), [
|
||||
E('div', { 'class': 'cbi-section' }, [
|
||||
E('p', _('The service will be disabled. Continue?')),
|
||||
E('p', _('All settings will be reset to default. Continue?')),
|
||||
]),
|
||||
E('div', { 'class': 'right' }, [
|
||||
shutdown_btn,
|
||||
' ',
|
||||
cancel_button,
|
||||
' ',
|
||||
resetcfg_btn,
|
||||
])
|
||||
]);
|
||||
},
|
||||
@@ -294,8 +318,9 @@ return view.extend({
|
||||
btn_update.onclick = ui.createHandlerFn(this, () => { this.appAction('update', '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);
|
||||
let btn_reset = create_btn('btn_reset', btn_style_action, _('Reset settings'));
|
||||
btn_reset.onclick = L.bind(this.dialogResetCfg, this);
|
||||
layout_append(_('Reset settings to default'), null, [ btn_reset ] );
|
||||
|
||||
let elems = {
|
||||
"status": status_string,
|
||||
@@ -305,6 +330,7 @@ return view.extend({
|
||||
"btn_restart": btn_restart,
|
||||
"btn_stop": btn_stop,
|
||||
"btn_update": btn_update,
|
||||
"btn_reset": btn_reset,
|
||||
};
|
||||
this.setAppStatus(status_array, elems);
|
||||
|
||||
|
||||
@@ -234,6 +234,18 @@ return view.extend({
|
||||
tabname = 'blacklist_tab';
|
||||
s.tab(tabname, _('Blacklist settings'));
|
||||
|
||||
o = s.taboption(tabname, form.Button, '_google_entries_btn', _('Google hostname entries'));
|
||||
o.inputtitle = _('Edit');
|
||||
o.inputstyle = 'edit btn';
|
||||
o.description = tools.hostsGoogleFN;
|
||||
o.onclick = () => new tools.fileEditDialog(
|
||||
tools.hostsGoogleFN,
|
||||
_('Google hostname entries'),
|
||||
_('One hostname per line.<br />Examples:'),
|
||||
'<code>youtube.com<br />googlevideo.com</code>',
|
||||
15
|
||||
).show();
|
||||
|
||||
o = s.taboption(tabname, form.Button, '_user_entries_btn', _('User hostname entries'));
|
||||
o.inputtitle = _('Edit');
|
||||
o.inputstyle = 'edit btn';
|
||||
|
||||
@@ -38,7 +38,9 @@ return baseclass.extend({
|
||||
appName : 'zapret',
|
||||
execPath : '/etc/init.d/zapret',
|
||||
syncCfgPath : '/opt/zapret/sync_config.sh',
|
||||
defaultCfgPath : '/opt/zapret/uci-def-cfg.sh',
|
||||
|
||||
hostsGoogleFN : '/opt/zapret/ipset/zapret-hosts-google.txt',
|
||||
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',
|
||||
@@ -158,10 +160,25 @@ return baseclass.extend({
|
||||
}
|
||||
let plist = this.get_pid_list(proc_list.stdout);
|
||||
|
||||
let jdata = JSON.parse(svc_info.stdout);
|
||||
if (typeof(jdata) !== 'object') {
|
||||
if (plist.length < 4) {
|
||||
return -3;
|
||||
}
|
||||
if (typeof(svc_info.stdout) !== 'string') {
|
||||
return -4;
|
||||
}
|
||||
if (svc_info.stdout.length < 3) {
|
||||
return -5;
|
||||
}
|
||||
let jdata;
|
||||
try {
|
||||
jdata = JSON.parse(svc_info.stdout);
|
||||
} catch (e) {
|
||||
console.log('Incorrect JSON: ' + svc_info.stdout);
|
||||
return -6;
|
||||
}
|
||||
if (typeof(jdata) !== 'object') {
|
||||
return -7;
|
||||
}
|
||||
if (typeof(jdata.zapret) == 'object') {
|
||||
result.dmn.inited = true;
|
||||
let dmn_list = jdata.zapret.instances;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"/etc/init.d/zapret*": [ "exec" ],
|
||||
"/bin/ps*": [ "exec" ],
|
||||
"/bin/opkg*": [ "exec" ],
|
||||
"/opt/zapret/uci-def-cfg.sh*": [ "exec" ],
|
||||
"/opt/zapret/sync_config.sh*": [ "exec" ]
|
||||
},
|
||||
"uci": [ "zapret", "network" ],
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret-ip2net
|
||||
PKG_VERSION:=66
|
||||
PKG_RELEASE:=20241026
|
||||
PKG_VERSION:=68
|
||||
PKG_RELEASE:=20241110
|
||||
|
||||
PKG_MAINTAINER:=bol-van
|
||||
PKG_LICENSE:=MIT
|
||||
@@ -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:=cd9b92e4d9b4deb55a057f13e0304ad7d9d76eca
|
||||
PKG_SOURCE_DATE:=2024-10-26
|
||||
PKG_SOURCE_VERSION:=41b4c6650b13707654066b5af007d531dd348286
|
||||
PKG_SOURCE_DATE:=2024-11-10
|
||||
|
||||
#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,8 +1,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret-mdig
|
||||
PKG_VERSION:=66
|
||||
PKG_RELEASE:=20241026
|
||||
PKG_VERSION:=68
|
||||
PKG_RELEASE:=20241110
|
||||
|
||||
PKG_MAINTAINER:=bol-van
|
||||
PKG_LICENSE:=MIT
|
||||
@@ -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:=cd9b92e4d9b4deb55a057f13e0304ad7d9d76eca
|
||||
PKG_SOURCE_DATE:=2024-10-26
|
||||
PKG_SOURCE_VERSION:=41b4c6650b13707654066b5af007d531dd348286
|
||||
PKG_SOURCE_DATE:=2024-11-10
|
||||
|
||||
#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,8 +1,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret-tpws
|
||||
PKG_VERSION:=66
|
||||
PKG_RELEASE:=20241026
|
||||
PKG_VERSION:=68
|
||||
PKG_RELEASE:=20241110
|
||||
|
||||
PKG_MAINTAINER:=bol-van
|
||||
PKG_LICENSE:=MIT
|
||||
@@ -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:=cd9b92e4d9b4deb55a057f13e0304ad7d9d76eca
|
||||
PKG_SOURCE_DATE:=2024-10-26
|
||||
PKG_SOURCE_VERSION:=41b4c6650b13707654066b5af007d531dd348286
|
||||
PKG_SOURCE_DATE:=2024-11-10
|
||||
|
||||
#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,8 +5,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zapret
|
||||
PKG_VERSION:=66
|
||||
PKG_RELEASE:=20241026
|
||||
PKG_VERSION:=68
|
||||
PKG_RELEASE:=20241110
|
||||
|
||||
PKG_MAINTAINER:=bol-van
|
||||
PKG_LICENSE:=MIT
|
||||
@@ -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:=cd9b92e4d9b4deb55a057f13e0304ad7d9d76eca
|
||||
PKG_SOURCE_DATE:=2024-10-26
|
||||
PKG_SOURCE_VERSION:=41b4c6650b13707654066b5af007d531dd348286
|
||||
PKG_SOURCE_DATE:=2024-11-10
|
||||
|
||||
#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?
|
||||
@@ -79,15 +79,9 @@ define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/openwrt/zapret $(1)/etc/init.d/zapret
|
||||
$(INSTALL_CONF) ./config.default $(1)/opt/zapret/config.default
|
||||
#$(INSTALL_CONF) ./ipset/zapret-hosts-auto.txt $(1)/opt/zapret/ipset/zapret-hosts-auto.txt
|
||||
$(INSTALL_CONF) ./ipset/zapret-hosts-user.txt $(1)/opt/zapret/ipset/zapret-hosts-user.txt
|
||||
$(INSTALL_CONF) ./ipset/zapret-hosts-google.txt $(1)/opt/zapret/ipset/zapret-hosts-google.txt
|
||||
$(INSTALL_CONF) ./ipset/zapret-hosts-user-exclude.txt $(1)/opt/zapret/ipset/zapret-hosts-user-exclude.txt
|
||||
$(INSTALL_CONF) ./ipset/zapret-hosts-user-ipban.txt $(1)/opt/zapret/ipset/zapret-hosts-user-ipban.txt
|
||||
#$(INSTALL_CONF) ./ipset/zapret-ip.txt $(1)/opt/zapret/ipset/zapret-ip.txt
|
||||
$(INSTALL_CONF) ./ipset/zapret-ip-exclude.txt $(1)/opt/zapret/ipset/zapret-ip-exclude.txt
|
||||
$(INSTALL_CONF) ./ipset/zapret-ip-user.txt $(1)/opt/zapret/ipset/zapret-ip-user.txt
|
||||
$(INSTALL_CONF) ./ipset/zapret-ip-user-exclude.txt $(1)/opt/zapret/ipset/zapret-ip-user-exclude.txt
|
||||
$(INSTALL_CONF) ./ipset/zapret-ip-user-ipban.txt $(1)/opt/zapret/ipset/zapret-ip-user-ipban.txt
|
||||
$(INSTALL_BIN) ./sync_config.sh $(1)/opt/zapret/sync_config.sh
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./uci-def-cfg.sh $(1)/etc/uci-defaults/zapret-uci-def-cfg.sh
|
||||
@@ -109,7 +103,15 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
# stop service if PKG_UPGRADE
|
||||
[ -x "/etc/init.d/zapret" ] && /etc/init.d/zapret stop >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if [ ! -f "/opt/zapret/ipset/zapret-hosts-google.txt" ]; then
|
||||
if [ -f "/opt/zapret/ipset/zapret-hosts-user.txt" ]; then
|
||||
CFGLISTHASH=$$( md5sum "/opt/zapret/ipset/zapret-hosts-user.txt" | awk '{print $$1;}' )
|
||||
if [ "$${CFGLISTHASH}" = "79e35df62b0d1ae455d0a7e04c4cecac" ]; then
|
||||
rm -f "/opt/zapret/ipset/zapret-hosts-user.txt"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
@@ -131,6 +133,15 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
echo "Current file $${ZAPRET_CONFIG} backuped to $${ZAPRET_CONFIG_BACKUP}"
|
||||
cp -f "$${ZAPRET_CONFIG_DEF}" "$${ZAPRET_CONFIG}"
|
||||
fi
|
||||
# create empty txt files into ipset directory
|
||||
[ ! -f "/opt/zapret/ipset/zapret-hosts-google.txt" ] && touch "/opt/zapret/ipset/zapret-hosts-google.txt"
|
||||
#[ ! -f "/opt/zapret/ipset/zapret-hosts-auto.txt" ] && touch "/opt/zapret/ipset/zapret-hosts-auto.txt"
|
||||
[ ! -f "/opt/zapret/ipset/zapret-hosts-user.txt" ] && touch "/opt/zapret/ipset/zapret-hosts-user.txt"
|
||||
[ ! -f "/opt/zapret/ipset/zapret-hosts-user-ipban.txt" ] && touch "/opt/zapret/ipset/zapret-hosts-user-ipban.txt"
|
||||
#[ ! -f "/opt/zapret/ipset/zapret-ip.txt" ] && touch "/opt/zapret/ipset/zapret-ip.txt"
|
||||
[ ! -f "/opt/zapret/ipset/zapret-ip-user.txt" ] && touch "/opt/zapret/ipset/zapret-ip-user.txt"
|
||||
[ ! -f "/opt/zapret/ipset/zapret-ip-user-exclude.txt" ] && touch "/opt/zapret/ipset/zapret-ip-user-exclude.txt"
|
||||
[ ! -f "/opt/zapret/ipset/zapret-ip-user-ipban.txt" ] && touch "/opt/zapret/ipset/zapret-ip-user-ipban.txt"
|
||||
# check existing uci-config
|
||||
[ -f "/etc/config/zapret" ] && ZAPRET_CFG_EXISTS=1 || ZAPRET_CFG_EXISTS=0
|
||||
# create or merge uci-config
|
||||
|
||||
@@ -56,14 +56,16 @@ DESYNC_MARK_POSTNAT=0x20000000
|
||||
TPWS_SOCKS_ENABLE=0
|
||||
# tpws socks listens on this port on localhost and LAN interfaces
|
||||
TPPORT_SOCKS=987
|
||||
# use <HOSTLIST> placeholders to engage standard hostlists and autohostlist in ipset dir
|
||||
# they are replaced to empty string if MODE_FILTER does not satisfy
|
||||
# use <HOSTLIST> and <HOSTLIST_NOAUTO> placeholders to engage standard hostlists and autohostlist in ipset dir
|
||||
# hostlist markers are replaced to empty string if MODE_FILTER does not satisfy
|
||||
# <HOSTLIST_NOAUTO> appends ipset/zapret-hosts-auto.txt as normal list
|
||||
TPWS_SOCKS_OPT="--filter-tcp=80 --methodeol <HOSTLIST> --new --filter-tcp=443 --split-tls=sni --disorder <HOSTLIST>"
|
||||
|
||||
TPWS_ENABLE=0
|
||||
TPWS_PORTS="80,443"
|
||||
# use <HOSTLIST> placeholders to engage standard hostlists and autohostlist in ipset dir
|
||||
# they are replaced to empty string if MODE_FILTER does not satisfy
|
||||
# use <HOSTLIST> and <HOSTLIST_NOAUTO> placeholders to engage standard hostlists and autohostlist in ipset dir
|
||||
# hostlist markers are replaced to empty string if MODE_FILTER does not satisfy
|
||||
# <HOSTLIST_NOAUTO> appends ipset/zapret-hosts-auto.txt as normal list
|
||||
TPWS_OPT="--filter-tcp=80 --methodeol <HOSTLIST> --new --filter-tcp=443 --split-tls=sni --disorder <HOSTLIST>"
|
||||
|
||||
|
||||
@@ -88,9 +90,10 @@ NFQWS_UDP_PKT_IN="0"
|
||||
NFQWS_PORTS_TCP_KEEPALIVE=0
|
||||
NFQWS_PORTS_UDP_KEEPALIVE=0
|
||||
|
||||
# use <HOSTLIST> placeholders to engage standard hostlists and autohostlist in ipset dir
|
||||
# they are replaced to empty string if MODE_FILTER does not satisfy
|
||||
NFQWS_OPT="--filter-tcp=80 <HOSTLIST> --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new --filter-tcp=443 <HOSTLIST> --dpi-desync=fake,split2 --dpi-desync-repeats=11 --dpi-desync-fooling=md5sig --dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin --new --filter-udp=443 <HOSTLIST> --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin --new --filter-udp=443 <HOSTLIST> --dpi-desync=fake --dpi-desync-repeats=11 --new --dpi-desync=fake,disorder2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig"
|
||||
# use <HOSTLIST> and <HOSTLIST_NOAUTO> placeholders to engage standard hostlists and autohostlist in ipset dir
|
||||
# hostlist markers are replaced to empty string if MODE_FILTER does not satisfy
|
||||
# <HOSTLIST_NOAUTO> appends ipset/zapret-hosts-auto.txt as normal list
|
||||
NFQWS_OPT="--filter-tcp=80 <HOSTLIST> --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new --filter-tcp=443 --hostlist=/opt/zapret/ipset/zapret-hosts-google.txt --dpi-desync=fake,split2 --dpi-desync-repeats=11 --dpi-desync-fooling=md5sig --dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin --new --filter-udp=443 --hostlist=/opt/zapret/ipset/zapret-hosts-google.txt --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-quic=/opt/zapret/files/fake/quic_initial_www_google_com.bin --new --filter-udp=443 <HOSTLIST_NOAUTO> --dpi-desync=fake --dpi-desync-repeats=11 --new --filter-tcp=80,443 <HOSTLIST> --dpi-desync=fake,disorder2 --dpi-desync-repeats=6 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig"
|
||||
|
||||
|
||||
# FlowOffload mode : donttouch,none,software,hardware
|
||||
|
||||
@@ -53,22 +53,24 @@ function set_default_values
|
||||
--dpi-desync-autottl=2
|
||||
--dpi-desync-fooling=md5sig
|
||||
--new
|
||||
--filter-tcp=443 <HOSTLIST>
|
||||
--filter-tcp=443 --hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||
--dpi-desync=fake,split2
|
||||
--dpi-desync-repeats=11
|
||||
--dpi-desync-fooling=md5sig
|
||||
--dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin
|
||||
--new
|
||||
--filter-udp=443 <HOSTLIST>
|
||||
--filter-udp=443 --hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||
--dpi-desync=fake
|
||||
--dpi-desync-repeats=11
|
||||
--dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin
|
||||
--dpi-desync-fake-quic=/opt/zapret/files/fake/quic_initial_www_google_com.bin
|
||||
--new
|
||||
--filter-udp=443 <HOSTLIST>
|
||||
--filter-udp=443 <HOSTLIST_NOAUTO>
|
||||
--dpi-desync=fake
|
||||
--dpi-desync-repeats=11
|
||||
--new
|
||||
--filter-tcp=80,443 <HOSTLIST>
|
||||
--dpi-desync=fake,disorder2
|
||||
--dpi-desync-repeats=6
|
||||
--dpi-desync-autottl=2
|
||||
--dpi-desync-fooling=md5sig
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user