[misc] New net_peer_address_is_trusted with cfg set default to "lan"

New default for "trusted_networks" = "lan". This will check peer addresses
against the addresses/netmasks of the interfaces to establish whether the peer
is local.

Fixes #1754
This commit is contained in:
ejurgensen
2024-06-16 01:17:11 +02:00
parent bf73e51262
commit c30f44fd01
13 changed files with 156 additions and 55 deletions

View File

@@ -40,9 +40,9 @@ general {
# Sets who is allowed to connect without authorisation. This applies to
# client types like Remotes, DAAP clients (iTunes) and to the web
# interface. Options are "any", "localhost" or the prefix to one or
# more ipv4/6 networks. The default is { "localhost", "192.168", "fd" }
# trusted_networks = { "localhost", "192.168", "fd" }
# interface. Options are "any", "lan", "localhost" or the prefix to one
# or more ipv4/6 networks. The default is { "lan" }
# trusted_networks = { "lan" }
# Enable/disable IPv6
# ipv6 = no