mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 02:09:21 -05:00
handle server names with embeded ports
This commit is contained in:
parent
2221a13a4d
commit
fe6832fae8
@ -15,6 +15,10 @@ import argparse
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
def get_targets(server_name):
|
def get_targets(server_name):
|
||||||
|
if ":" in server_name:
|
||||||
|
target, port = server_name.split(":")
|
||||||
|
yield (target, int(port))
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
answers = dns.resolver.query("_matrix._tcp." + server_name, "SRV")
|
answers = dns.resolver.query("_matrix._tcp." + server_name, "SRV")
|
||||||
for srv in answers:
|
for srv in answers:
|
||||||
|
Loading…
Reference in New Issue
Block a user