mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 20:20:53 +03:00
ipset: additional lists
This commit is contained in:
parent
3536dd45d7
commit
82b937ded0
@ -244,7 +244,7 @@ select_getlist()
|
|||||||
GETLIST="get_reestr_hostlist.sh"
|
GETLIST="get_reestr_hostlist.sh"
|
||||||
[ "$GL_OLD" != "$GET_LIST" ] && write_config_var GETLIST
|
[ "$GL_OLD" != "$GET_LIST" ] && write_config_var GETLIST
|
||||||
else
|
else
|
||||||
GETLISTS="get_user.sh get_antifilter_ip.sh get_antifilter_ipsmart.sh get_antifilter_ipsum.sh get_reestr_ip.sh get_reestr_combined.sh get_reestr_resolve.sh"
|
GETLISTS="get_user.sh get_antifilter_ip.sh get_antifilter_ipsmart.sh get_antifilter_ipsum.sh get_antifilter_ipresolve.sh get_antifilter_allyouneed.sh get_reestr_ip.sh get_reestr_combined.sh get_reestr_resolve.sh"
|
||||||
GETLIST_DEF="get_antifilter_ipsmart.sh"
|
GETLIST_DEF="get_antifilter_ipsmart.sh"
|
||||||
ask_list GETLIST "$GETLISTS" "$GETLIST_DEF" && write_config_var GETLIST
|
ask_list GETLIST "$GETLISTS" "$GETLIST_DEF" && write_config_var GETLIST
|
||||||
fi
|
fi
|
||||||
@ -291,25 +291,13 @@ ask_config_offload()
|
|||||||
[ "$FWTYPE" = nftables ] || is_ipt_flow_offload_avail && {
|
[ "$FWTYPE" = nftables ] || is_ipt_flow_offload_avail && {
|
||||||
echo
|
echo
|
||||||
echo flow offloading can greatly increase speed on slow devices and high speed links \(usually 150+ mbits\)
|
echo flow offloading can greatly increase speed on slow devices and high speed links \(usually 150+ mbits\)
|
||||||
if [ "$SYSTEM" = openwrt ]; then
|
echo unfortuantely its not compatible with most nfqws options. nfqws traffic must be exempted from flow offloading.
|
||||||
echo unfortuantely its not compatible with most nfqws options. nfqws traffic must be exempted from flow offloading.
|
echo donttouch = disable system flow offloading setting if nfqws mode was selected, dont touch it otherwise and dont configure selective flow offloading
|
||||||
echo donttouch = disable system flow offloading setting if nfqws mode was selected, dont touch it otherwise and dont configure selective flow offloading
|
echo none = always disable system flow offloading setting and dont configure selective flow offloading
|
||||||
echo none = always disable system flow offloading setting and dont configure selective flow offloading
|
echo software = always disable system flow offloading setting and configure selective software flow offloading
|
||||||
echo software = always disable system flow offloading setting and configure selective software flow offloading
|
echo hardware = always disable system flow offloading setting and configure selective hardware flow offloading
|
||||||
echo hardware = always disable system flow offloading setting and configure selective hardware flow offloading
|
|
||||||
else
|
|
||||||
echo offloading is applicable only to forwarded traffic. it has no effect on outgoing traffic
|
|
||||||
echo hardware flow offloading is available only on specific supporting hardware. most likely will not work on a generic system
|
|
||||||
fi
|
|
||||||
echo offloading breaks traffic shaper
|
|
||||||
echo select flow offloading :
|
echo select flow offloading :
|
||||||
local options="none software hardware"
|
ask_list FLOWOFFLOAD "donttouch none software hardware" donttouch && write_config_var FLOWOFFLOAD
|
||||||
local default="none"
|
|
||||||
[ "$SYSTEM" = openwrt ] && {
|
|
||||||
options="donttouch none software hardware"
|
|
||||||
default="donttouch"
|
|
||||||
}
|
|
||||||
ask_list FLOWOFFLOAD "$options" $default && write_config_var FLOWOFFLOAD
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,11 +319,6 @@ ask_config_tmpdir()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nft_flow_offload()
|
|
||||||
{
|
|
||||||
[ "$UNAME" = Linux -a "$FWTYPE" = nftables -a "$MODE" != "tpws-socks" ] && [ "$FLOWOFFLOAD" = software -o "$FLOWOFFLOAD" = hardware ]
|
|
||||||
}
|
|
||||||
|
|
||||||
ask_iface()
|
ask_iface()
|
||||||
{
|
{
|
||||||
# $1 - var to ask
|
# $1 - var to ask
|
||||||
@ -363,16 +346,12 @@ ask_iface()
|
|||||||
ask_iface_lan()
|
ask_iface_lan()
|
||||||
{
|
{
|
||||||
echo LAN interface :
|
echo LAN interface :
|
||||||
local opt
|
ask_iface IFACE_LAN "NONE"
|
||||||
nft_flow_offload || opt=NONE
|
|
||||||
ask_iface IFACE_LAN $opt
|
|
||||||
}
|
}
|
||||||
ask_iface_wan()
|
ask_iface_wan()
|
||||||
{
|
{
|
||||||
echo WAN interface :
|
echo WAN interface :
|
||||||
local opt
|
ask_iface IFACE_WAN "ANY"
|
||||||
nft_flow_offload || opt=ANY
|
|
||||||
ask_iface IFACE_WAN $opt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
select_mode_iface()
|
select_mode_iface()
|
||||||
@ -387,6 +366,8 @@ select_mode_iface()
|
|||||||
|
|
||||||
if [ "$SYSTEM" = "openwrt" ] || [ "$MODE" = "filter" ]; then return; fi
|
if [ "$SYSTEM" = "openwrt" ] || [ "$MODE" = "filter" ]; then return; fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
case "$MODE" in
|
case "$MODE" in
|
||||||
tpws-socks)
|
tpws-socks)
|
||||||
echo "select LAN interface to allow socks access from your LAN. select NONE for localhost only."
|
echo "select LAN interface to allow socks access from your LAN. select NONE for localhost only."
|
||||||
@ -407,12 +388,6 @@ select_mode_iface()
|
|||||||
echo "select LAN interface for your custom script (how it works depends on your code)"
|
echo "select LAN interface for your custom script (how it works depends on your code)"
|
||||||
ask_iface_lan
|
ask_iface_lan
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
nft_flow_offload && {
|
|
||||||
echo "select LAN interface for nftables flow offloading"
|
|
||||||
ask_iface_lan
|
|
||||||
}
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$MODE" in
|
case "$MODE" in
|
||||||
@ -429,12 +404,6 @@ select_mode_iface()
|
|||||||
echo "select WAN interface for your custom script (how it works depends on your code)"
|
echo "select WAN interface for your custom script (how it works depends on your code)"
|
||||||
ask_iface_wan
|
ask_iface_wan
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
nft_flow_offload && {
|
|
||||||
echo "select WAN interface for nftables flow offloading"
|
|
||||||
ask_iface_wan
|
|
||||||
}
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -690,7 +659,6 @@ install_systemd()
|
|||||||
check_prerequisites_linux
|
check_prerequisites_linux
|
||||||
install_binaries
|
install_binaries
|
||||||
select_ipv6
|
select_ipv6
|
||||||
ask_config_offload
|
|
||||||
ask_config
|
ask_config
|
||||||
service_install_systemd
|
service_install_systemd
|
||||||
download_list
|
download_list
|
||||||
@ -715,7 +683,6 @@ _install_sysv()
|
|||||||
check_prerequisites_linux
|
check_prerequisites_linux
|
||||||
install_binaries
|
install_binaries
|
||||||
select_ipv6
|
select_ipv6
|
||||||
ask_config_offload
|
|
||||||
ask_config
|
ask_config
|
||||||
$1
|
$1
|
||||||
download_list
|
download_list
|
||||||
@ -750,7 +717,6 @@ install_linux()
|
|||||||
check_prerequisites_linux
|
check_prerequisites_linux
|
||||||
install_binaries
|
install_binaries
|
||||||
select_ipv6
|
select_ipv6
|
||||||
ask_config_offload
|
|
||||||
ask_config
|
ask_config
|
||||||
download_list
|
download_list
|
||||||
crontab_del_quiet
|
crontab_del_quiet
|
||||||
|
Loading…
Reference in New Issue
Block a user