Support for obfs4 in custom bridges

This commit is contained in:
Miguel Jacq 2018-01-19 15:31:11 +11:00
parent 95c8c0fb81
commit 16bd3291e3
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
3 changed files with 6 additions and 4 deletions

View file

@ -734,7 +734,7 @@ class SettingsDialog(QtWidgets.QDialog):
for bridge in bridges:
if bridge != '':
# Check the syntax of the custom bridge to make sure it looks legitimate
pattern = re.compile("[0-9.]+:[0-9]+\s[A-Z0-9]+$")
pattern = re.compile("(obfs4\s)?[0-9.]+:[0-9]+\s[A-Z0-9]+(.+)?$")
if pattern.match(bridge):
new_bridges.append(''.join(['Bridge ', bridge, '\n']))
bridges_valid = True