mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-13 22:20:59 +00:00
autoinstall.sh
This commit is contained in:
@@ -209,7 +209,7 @@ InstallTorConfig() {
|
|||||||
$UCI_CMD set ruantiblock.config.proxy_mode="1"
|
$UCI_CMD set ruantiblock.config.proxy_mode="1"
|
||||||
$UCI_CMD commit ruantiblock
|
$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_protection='1'
|
||||||
$UCI_CMD set dhcp.@dnsmasq[0].rebind_domain='.onion'
|
$UCI_CMD set dhcp.@dnsmasq[0].rebind_domain='.onion'
|
||||||
$UCI_CMD commit dhcp
|
$UCI_CMD commit dhcp
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ AddUserEntries() {
|
|||||||
};
|
};
|
||||||
function writeDNSData(val, dns) {
|
function writeDNSData(val, dns) {
|
||||||
if(length(dns) == 0 && length(ENVIRON["USER_ENTRIES_DNS"]) > 0)
|
if(length(dns) == 0 && length(ENVIRON["USER_ENTRIES_DNS"]) > 0)
|
||||||
dns = ENVIRON["USER_ENTRIES_DNS"];
|
dns=ENVIRON["USER_ENTRIES_DNS"];
|
||||||
if(length(dns) > 0)
|
if(length(dns) > 0)
|
||||||
printf "server=/%s/%s\n", val, dns >> ENVIRON["DNSMASQ_DATA_FILE"];
|
printf "server=/%s/%s\n", val, dns >> ENVIRON["DNSMASQ_DATA_FILE"];
|
||||||
printf "ipset=/%s/%s\n", val, ENVIRON["IPSET_DNSMASQ"] >> ENVIRON["DNSMASQ_DATA_FILE"];
|
printf "ipset=/%s/%s\n", val, ENVIRON["IPSET_DNSMASQ"] >> ENVIRON["DNSMASQ_DATA_FILE"];
|
||||||
|
|||||||
Reference in New Issue
Block a user