mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
relay: Allow IP sharing to be toggled per network
Via a new "relay_no_ips" option in server blocks. Closes #201.
This commit is contained in:
parent
4c83bfc3ef
commit
42718ed323
@ -118,6 +118,11 @@ servers:
|
|||||||
# Separator character (used by relay)
|
# Separator character (used by relay)
|
||||||
separator: "/"
|
separator: "/"
|
||||||
|
|
||||||
|
# If enabled, this opts this network out of relay IP sharing. i.e. this network
|
||||||
|
# will not have its users' IPs sent across the relay, and it will not see any
|
||||||
|
# IPs of other networks' users.
|
||||||
|
#relay_no_ips: true
|
||||||
|
|
||||||
# Sets the max nick length for the network. It is important this is
|
# Sets the max nick length for the network. It is important this is
|
||||||
# set correctly, or PyLink might introduce a nick that is too long and
|
# set correctly, or PyLink might introduce a nick that is too long and
|
||||||
# cause netsplits!
|
# cause netsplits!
|
||||||
@ -332,7 +337,8 @@ relay:
|
|||||||
# Determines whether real IPs should be sent across the relay. You should
|
# Determines whether real IPs should be sent across the relay. You should
|
||||||
# generally have a consensus with your linked networks whether this should
|
# generally have a consensus with your linked networks whether this should
|
||||||
# be turned on. You will see other networks' user IP addresses, and they
|
# be turned on. You will see other networks' user IP addresses, and they
|
||||||
# will see yours.
|
# will see yours. Individual networks can also opt out of IP sharing
|
||||||
|
# both ways by defining "relay_no_ips: true" in their server block.
|
||||||
show_ips: false
|
show_ips: false
|
||||||
|
|
||||||
# Whether subservers should be spawned for each relay network (requires
|
# Whether subservers should be spawned for each relay network (requires
|
||||||
|
@ -289,7 +289,9 @@ def getRemoteUser(irc, remoteirc, user, spawnIfMissing=True):
|
|||||||
|
|
||||||
rsid = getRemoteSid(remoteirc, irc)
|
rsid = getRemoteSid(remoteirc, irc)
|
||||||
try:
|
try:
|
||||||
showRealIP = irc.conf['relay']['show_ips']
|
showRealIP = irc.conf['relay']['show_ips'] and not \
|
||||||
|
irc.serverdata.get('relay_no_ips') and not \
|
||||||
|
remoteirc.serverdata.get('relay_no_ips')
|
||||||
except KeyError:
|
except KeyError:
|
||||||
showRealIP = False
|
showRealIP = False
|
||||||
if showRealIP:
|
if showRealIP:
|
||||||
|
Loading…
Reference in New Issue
Block a user