mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 22:50:58 +00:00
Fixed autoinstall.sh
This commit is contained in:
@@ -185,12 +185,8 @@ InstallBaseConfig() {
|
|||||||
InstallVPNConfig() {
|
InstallVPNConfig() {
|
||||||
local _if_vpn
|
local _if_vpn
|
||||||
$UCI_CMD set ruantiblock.config.proxy_mode="2"
|
$UCI_CMD set ruantiblock.config.proxy_mode="2"
|
||||||
_if_vpn=`$UCI_CMD get network.VPN.ifname`
|
$UCI_CMD set ruantiblock.config.if_vpn="tun0"
|
||||||
if [ -z "$_if_vpn" ]; then
|
$UCI_CMD commit ruantiblock
|
||||||
_if_vpn="tun0"
|
|
||||||
fi
|
|
||||||
$UCI_CMD set ruantiblock.config.if_vpn="$_if_vpn"
|
|
||||||
$UCI_CMD commit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TorrcSettings() {
|
TorrcSettings() {
|
||||||
@@ -211,10 +207,11 @@ InstallTorConfig() {
|
|||||||
DlFile "$URL_TORRC" "$FILE_TORRC"
|
DlFile "$URL_TORRC" "$FILE_TORRC"
|
||||||
TorrcSettings
|
TorrcSettings
|
||||||
$UCI_CMD set ruantiblock.config.proxy_mode="1"
|
$UCI_CMD set ruantiblock.config.proxy_mode="1"
|
||||||
|
$UCI_CMD commit ruantiblock
|
||||||
# dnsmasq rebind protection
|
# dnsmasq rebind protection
|
||||||
$UCI_CMD set dhcp.@dnsmasq[0].rebind_localhost='1'
|
$UCI_CMD set dhcp.@dnsmasq[0].rebind_localhost='1'
|
||||||
$UCI_CMD set dhcp.@dnsmasq[0].rebind_domain='.onion'
|
$UCI_CMD set dhcp.@dnsmasq[0].rebind_domain='.onion'
|
||||||
$UCI_CMD commit
|
$UCI_CMD commit dhcp
|
||||||
}
|
}
|
||||||
|
|
||||||
InstallLuaModule() {
|
InstallLuaModule() {
|
||||||
@@ -224,7 +221,7 @@ InstallLuaModule() {
|
|||||||
FileExists "$FILE_LUA_IPTOOL" || DlFile "$URL_LUA_IPTOOL" "$FILE_LUA_IPTOOL"
|
FileExists "$FILE_LUA_IPTOOL" || DlFile "$URL_LUA_IPTOOL" "$FILE_LUA_IPTOOL"
|
||||||
FileExists "$FILE_LUA_IDN" || DlFile "$URL_LUA_IDN" "$FILE_LUA_IDN"
|
FileExists "$FILE_LUA_IDN" || DlFile "$URL_LUA_IDN" "$FILE_LUA_IDN"
|
||||||
$UCI_CMD set ruantiblock.config.bllist_module="/usr/libexec/ruantiblock/ruab_parser.lua"
|
$UCI_CMD set ruantiblock.config.bllist_module="/usr/libexec/ruantiblock/ruab_parser.lua"
|
||||||
$UCI_CMD commit
|
$UCI_CMD commit ruantiblock
|
||||||
}
|
}
|
||||||
|
|
||||||
InstallLuciApp() {
|
InstallLuciApp() {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ return view.extend({
|
|||||||
o.value('2', _('All hosts except listed'));
|
o.value('2', _('All hosts except listed'));
|
||||||
o.description = _('Restriction of hosts that are allowed to bypass blocking');
|
o.description = _('Restriction of hosts that are allowed to bypass blocking');
|
||||||
|
|
||||||
// ALOWED_HOSTS_LIST
|
// ALLOWED_HOSTS_LIST
|
||||||
o = s.taboption('main_settings', form.DynamicList, 'allowed_hosts_list',
|
o = s.taboption('main_settings', form.DynamicList, 'allowed_hosts_list',
|
||||||
_('IP addresses of hosts'));
|
_('IP addresses of hosts'));
|
||||||
o.datatype = "ip4addr";
|
o.datatype = "ip4addr";
|
||||||
|
|||||||
Reference in New Issue
Block a user