mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-20 04:24:21 -04:00
Fix get-tor.py to only add built-in bridges if the bridge type exists
This commit is contained in:
parent
6ee167c982
commit
ee6ff65c84
1 changed files with 2 additions and 1 deletions
|
@ -312,6 +312,7 @@ def update_tor_bridges():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
result = r.json()
|
result = r.json()
|
||||||
|
print(f"Built-in bridges: {result}")
|
||||||
|
|
||||||
if "errors" in result:
|
if "errors" in result:
|
||||||
print(
|
print(
|
||||||
|
@ -320,7 +321,7 @@ def update_tor_bridges():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
for bridge_type in ["meek-azure", "obfs4", "snowflake"]:
|
for bridge_type in ["meek-azure", "obfs4", "snowflake"]:
|
||||||
if result[bridge_type]:
|
if bridge_type in result and result[bridge_type]:
|
||||||
if bridge_type == "meek-azure":
|
if bridge_type == "meek-azure":
|
||||||
torrc_template_extension = "meek_lite_azure"
|
torrc_template_extension = "meek_lite_azure"
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue