8000 Configuration to allow whitelist only by grepsuzette · Pull Request #9 · virtualzone/go-hole · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Configuration to allow whitelist only #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.4.3
v0.4.4
5 changes: 4 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ blacklist:
# Blacklist renewal interval in minutes - set to 0 to disable
blacklistRenewal: 1440

# You can also choose to blacklist everything (only whitelist will work then)
blacklistEverything: false

# Domain names to be resolved upstream, even if they are blacklisted
whitelist:
- googleadservices.com
Expand All @@ -31,4 +34,4 @@ local:
- name: service2.local
target:
- address: 192.168.178.2
type: A
type: A
3 changes: 3 additions & 0 deletions src/blacklist.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ func queryBlacklist(name string, qtype uint16) ([]dns.RR, error) {
}

func isBlacklisted(name string) bool {
if GetConfig().BlacklistEverything {
return true
}
for _, cur := range blacklistRecords {
if cur == name {
return true
Expand Down
2 changes: 1 addition & 1 deletion src/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File autogenerated from VERSION, do not change manually!
package main

const AppVersion = "v0.4.3"
const AppVersion = "v0.4.4"
0