diff options
author | Miguel Jacq <mig@mig5.net> | 2021-10-19 11:36:03 +1100 |
---|---|---|
committer | Miguel Jacq <mig@mig5.net> | 2021-10-19 11:36:03 +1100 |
commit | 5b4d77c3634c0c13ae8ab1f27be540260027d0a8 (patch) | |
tree | b17433aa310e2da928fc7c40d236c39cbcf40623 /cli/onionshare_cli/__init__.py | |
parent | bcf697574e8c3265bd0d9173da1b91f298770280 (diff) | |
download | onionshare-5b4d77c3634c0c13ae8ab1f27be540260027d0a8.tar.gz onionshare-5b4d77c3634c0c13ae8ab1f27be540260027d0a8.zip |
Refactor to CensorshipCircumvention and Meek classes. Use Meek domain fronting when requesting bridges in frontend
Diffstat (limited to 'cli/onionshare_cli/__init__.py')
-rw-r--r-- | cli/onionshare_cli/__init__.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/onionshare_cli/__init__.py b/cli/onionshare_cli/__init__.py index ddba332e..99992b25 100644 --- a/cli/onionshare_cli/__init__.py +++ b/cli/onionshare_cli/__init__.py @@ -28,6 +28,7 @@ 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 .onionshare import OnionShare @@ -284,6 +285,18 @@ 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) + # Start the Onion object try: onion = Onion(common, use_tmp_dir=True) |