Skip to content

Create YouTube Option/Remove hard-coded variables #1

@jakenology

Description

@jakenology

Reference

Firstly thanks jaykepters for your efforts in getting Safe Search working with Pi-hole.

I can confirm with samad that you need to append the cname code above to the /etc/dnsmasq.d/05-restrict.conf file for YouTube restriced mode to work.

Looking at jay’s script it appears the conditional code below is not evaluating to “True” so the YouTube domains are not being echoed to the 05-restrict.conf file. I haven’t tested it but removing the “if” statement will allow the for loop to execute and propagate the conf file. Not sure if that helps?

# YouTube SafeSearch 
if [ "$YOUTUBE" == "True" ]; then
    for line in "${ytSS[@]}"
        do echo "$line"  >> "${file}"
    done
fi

Also jay I saw you post requesting a list of search engines so we can block any non Safe Search engines. I think I may have something that might be of use?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions