Add support for obfs4 bridges

parent 011e7c5d
Pipeline #2548 failed with stages
......@@ -11,7 +11,7 @@ import requests
URL_DETAILS = "https://onionoo.torproject.org/details?"
HEALTH_FLAGS = ["Valid", "Running", "Stable", "Fast"]
REGEX = re.compile(r'Bridge [0-9.:]+ ([0-9A-F]{40})')
REGEX = re.compile(r'Bridge (obfs4 )?[0-9.:]+ ([0-9A-F]{40}).*')
def main():
......@@ -42,9 +42,9 @@ def get_fingerprints(torrc):
if not line.startswith("Bridge "):
continue
match = REGEX.match(line)
if not match or not match.group(1):
if not match or not match.group(2):
continue
fingerprints.append(match.group(1))
fingerprints.append(match.group(2))
return fingerprints
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment