Skip to content

Commit 93cc5a4

Browse files
committed
chore(dns): deprecate BLOCK_SURVEILLANCE
1 parent a17591d commit 93cc5a4

5 files changed

Lines changed: 3 additions & 16 deletions

File tree

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ ENV VPN_SERVICE_PROVIDER=pia \
218218
DNS_CACHING=on \
219219
DNS_UPSTREAM_IPV6=off \
220220
BLOCK_MALICIOUS=on \
221-
BLOCK_SURVEILLANCE=off \
222221
BLOCK_ADS=off \
223222
DNS_UNBLOCK_HOSTNAMES= \
224223
DNS_REBINDING_PROTECTION_EXEMPT_HOSTNAMES= \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Lightweight swiss-army-knife-like VPN client to multiple VPN service providers
6969
- More in progress, see [#134](https://github.com/passteque/gluetun/issues/134)
7070
- Supports AmneziaWG only with the custom provider for now
7171
- DNS over TLS baked in with service provider(s) of your choice
72-
- DNS fine blocking of malicious/ads/surveillance hostnames and IP addresses, with live update every 24 hours
72+
- DNS fine blocking of malicious/ads hostnames and IP addresses, with live update every 24 hours
7373
- Choose the vpn network protocol, `udp` or `tcp`
7474
- Built in firewall kill switch to allow traffic only with needed the VPN servers and LAN devices
7575
- Built in Shadowsocks proxy server (protocol based on SOCKS5 with an encryption layer, tunnels TCP+UDP)

internal/configuration/settings/deprecated.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ func readObsolete(r *reader.Reader) (warnings []string) {
1616
"HEALTH_VPN_DURATION_ADDITION": "HEALTH_VPN_DURATION_ADDITION is obsolete",
1717
"DNS_KEEP_NAMESERVER": "DNS_KEEP_NAMESERVER is obsolete because you should use the built-in server which now " +
1818
"forwards local names to private DNS resolvers found in /etc/resolv.conf at container start",
19+
"BLOCK_SURVEILLANCE": "BLOCK_SURVEILLANCE is obsolete because its DNS block lists are not longer maintained",
1920
}
2021
sortedKeys := slices.Collect(maps.Keys(keyToMessage))
2122
slices.Sort(sortedKeys)

internal/configuration/settings/dnsblacklist.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
type DNSBlacklist struct {
1717
BlockMalicious *bool
1818
BlockAds *bool
19-
BlockSurveillance *bool
2019
AllowedHosts []string
2120
AddBlockedHosts []string
2221
AddBlockedIPs []netip.Addr
@@ -31,7 +30,6 @@ type DNSBlacklist struct {
3130
func (b *DNSBlacklist) setDefaults() {
3231
b.BlockMalicious = gosettings.DefaultPointer(b.BlockMalicious, true)
3332
b.BlockAds = gosettings.DefaultPointer(b.BlockAds, false)
34-
b.BlockSurveillance = gosettings.DefaultPointer(b.BlockSurveillance, true)
3533
}
3634

3735
var hostRegex = regexp.MustCompile(`^([a-zA-Z0-9]|[a-zA-Z0-9_][a-zA-Z0-9\-_]{0,61}[a-zA-Z0-9_])(\.([a-zA-Z0-9]|[a-zA-Z0-9_][a-zA-Z0-9\-_]{0,61}[a-zA-Z0-9]))*$`) //nolint:lll
@@ -65,7 +63,6 @@ func (b DNSBlacklist) copy() (copied DNSBlacklist) {
6563
return DNSBlacklist{
6664
BlockMalicious: gosettings.CopyPointer(b.BlockMalicious),
6765
BlockAds: gosettings.CopyPointer(b.BlockAds),
68-
BlockSurveillance: gosettings.CopyPointer(b.BlockSurveillance),
6966
AllowedHosts: gosettings.CopySlice(b.AllowedHosts),
7067
AddBlockedHosts: gosettings.CopySlice(b.AddBlockedHosts),
7168
AddBlockedIPs: gosettings.CopySlice(b.AddBlockedIPs),
@@ -77,7 +74,6 @@ func (b DNSBlacklist) copy() (copied DNSBlacklist) {
7774
func (b *DNSBlacklist) overrideWith(other DNSBlacklist) {
7875
b.BlockMalicious = gosettings.OverrideWithPointer(b.BlockMalicious, other.BlockMalicious)
7976
b.BlockAds = gosettings.OverrideWithPointer(b.BlockAds, other.BlockAds)
80-
b.BlockSurveillance = gosettings.OverrideWithPointer(b.BlockSurveillance, other.BlockSurveillance)
8177
b.AllowedHosts = gosettings.OverrideWithSlice(b.AllowedHosts, other.AllowedHosts)
8278
b.AddBlockedHosts = gosettings.OverrideWithSlice(b.AddBlockedHosts, other.AddBlockedHosts)
8379
b.AddBlockedIPs = gosettings.OverrideWithSlice(b.AddBlockedIPs, other.AddBlockedIPs)
@@ -93,7 +89,6 @@ func (b DNSBlacklist) ToBlockBuilderSettings(client *http.Client) (
9389
Client: client,
9490
BlockMalicious: b.BlockMalicious,
9591
BlockAds: b.BlockAds,
96-
BlockSurveillance: b.BlockSurveillance,
9792
AllowedHosts: b.AllowedHosts,
9893
AddBlockedHosts: b.AddBlockedHosts,
9994
AddBlockedIPs: b.AddBlockedIPs,
@@ -110,7 +105,6 @@ func (b DNSBlacklist) toLinesNode() (node *gotree.Node) {
110105

111106
node.Appendf("Block malicious: %s", gosettings.BoolToYesNo(b.BlockMalicious))
112107
node.Appendf("Block ads: %s", gosettings.BoolToYesNo(b.BlockAds))
113-
node.Appendf("Block surveillance: %s", gosettings.BoolToYesNo(b.BlockSurveillance))
114108

115109
if len(b.AllowedHosts) > 0 {
116110
allowedHostsNode := node.Append("Allowed hosts:")
@@ -156,12 +150,6 @@ func (b *DNSBlacklist) read(r *reader.Reader) (err error) {
156150
return err
157151
}
158152

159-
b.BlockSurveillance, err = r.BoolPtr("BLOCK_SURVEILLANCE",
160-
reader.RetroKeys("BLOCK_NSA"))
161-
if err != nil {
162-
return err
163-
}
164-
165153
b.BlockAds, err = r.BoolPtr("BLOCK_ADS")
166154
if err != nil {
167155
return err

internal/configuration/settings/settings_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ func Test_Settings_String(t *testing.T) {
5959
| ├── Update period: every 24h0m0s
6060
| └── DNS filtering settings:
6161
| ├── Block malicious: yes
62-
| ├── Block ads: no
63-
| └── Block surveillance: yes
62+
| └── Block ads: no
6463
├── Firewall settings:
6564
| ├── Enabled: yes
6665
| └── Iptables settings:

0 commit comments

Comments
 (0)