diff options
author | Miguel Jacq <mig@mig5.net> | 2021-11-12 10:56:15 +1100 |
---|---|---|
committer | Miguel Jacq <mig@mig5.net> | 2021-11-12 10:56:15 +1100 |
commit | dbae142a873c0bb326d0b6fa9ab3a4872280fe9b (patch) | |
tree | a2563db6480eb0d39d32ce6518147b57a5aafaa1 /cli/onionshare_cli/__init__.py | |
parent | 627c185fcb3c369f291b285910421d9cdcbf2f86 (diff) | |
parent | da94b92d1807fd2126f748836c79bcbf38a4c0a4 (diff) | |
download | onionshare-dbae142a873c0bb326d0b6fa9ab3a4872280fe9b.tar.gz onionshare-dbae142a873c0bb326d0b6fa9ab3a4872280fe9b.zip |
Resolve conflicts in locale
Diffstat (limited to 'cli/onionshare_cli/__init__.py')
-rw-r--r-- | cli/onionshare_cli/__init__.py | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/cli/onionshare_cli/__init__.py b/cli/onionshare_cli/__init__.py index 4041c5ea..4155a32a 100644 --- a/cli/onionshare_cli/__init__.py +++ b/cli/onionshare_cli/__init__.py @@ -27,13 +27,10 @@ from datetime import datetime from datetime import timedelta from .common import Common, CannotFindTor +from .censorship import CensorshipCircumvention +from .meek import Meek, MeekNotRunning from .web import Web -from .onion import ( - TorErrorProtocolError, - TorTooOldEphemeral, - TorTooOldStealth, - Onion, -) +from .onion import TorErrorProtocolError, TorTooOldEphemeral, TorTooOldStealth, Onion from .onionshare import OnionShare from .mode_settings import ModeSettings @@ -94,12 +91,7 @@ def main(cwd=None): help="Filename of persistent session", ) # General args - parser.add_argument( - "--title", - metavar="TITLE", - default=None, - help="Set a title", - ) + parser.add_argument("--title", metavar="TITLE", default=None, help="Set a title") parser.add_argument( "--public", action="store_true", @@ -308,6 +300,20 @@ def main(cwd=None): # Create the Web object web = Web(common, False, mode_settings, mode) + # Create the Meek object and start the meek client + # meek = Meek(common) + # meek.start() + + # Create the CensorshipCircumvention object to make + # API calls to Tor over Meek + censorship = CensorshipCircumvention(common, meek) + # Example: request recommended bridges, pretending to be from China, using + # domain fronting. + # censorship_recommended_settings = censorship.request_settings(country="cn") + # print(censorship_recommended_settings) + # Clean up the meek subprocess once we're done working with the censorship circumvention API + # meek.cleanup() + # Start the Onion object try: onion = Onion(common, use_tmp_dir=True) @@ -424,7 +430,7 @@ def main(cwd=None): sys.exit(1) # Warn about sending large files over Tor - if web.share_mode.download_filesize >= 157286400: # 150mb + if web.share_mode.download_filesize >= 157_286_400: # 150mb print("") print("Warning: Sending a large share could take hours") print("") |