mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-02 09:35:33 -05:00
Fix get-tor.py to only add built-in bridges if the bridge type exists
This commit is contained in:
parent
2112f9a5fb
commit
a1e372411f
@ -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…
x
Reference in New Issue
Block a user