Update dev examples in docs

This commit is contained in:
Micah Lee 2021-05-10 18:26:06 -07:00
parent 6328626683
commit bf881cbada
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -41,79 +41,83 @@ When developing, it's convenient to run OnionShare from a terminal and add the `
This prints a lot of helpful messages to the terminal, such as when certain objects are initialized, when events occur (like buttons clicked, settings saved or reloaded), and other debug info. For example:: This prints a lot of helpful messages to the terminal, such as when certain objects are initialized, when events occur (like buttons clicked, settings saved or reloaded), and other debug info. For example::
$ poetry run onionshare-cli -v ~/Documents/roms/nes/Q-bert\ \(USA\).nes $ poetry run onionshare-cli -v ~/Documents/roms/nes/Q-bert\ \(USA\).nes
OnionShare 2.3 | https://onionshare.org/ ╭───────────────────────────────────────────╮
* ▄▄█████▄▄ *
@@@@@@@@@ │ ▄████▀▀▀████▄ * │
@@@@@@@@@@@@@@@@@@@ │ ▀▀█▀ ▀██▄ │
@@@@@@@@@@@@@@@@@@@@@@@@@ │ * ▄█▄ ▀██▄ │
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ │ ▄█████▄ ███ -+- │
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ___ _ │ ███ ▀█████▀ │
@@@@@@ @@@@@@@@@@@@@ / _ \ (_) │ ▀██▄ ▀█▀ │
@@@@ @ @@@@@@@@@@@ | | | |_ __ _ ___ _ __ * ▀██▄ ▄█▄▄ *
@@@@@@@@ @@@@@@@@@@ | | | | '_ \| |/ _ \| '_ \ │ * ▀████▄▄▄████▀ │
@@@@@@@@@@@@ @@@@@@@@@@ \ \_/ / | | | | (_) | | | | │ ▀▀█████▀▀ │
@@@@@@@@@@@@@@@@ @@@@@@@@@ \___/|_| |_|_|\___/|_| |_| │ -+- * │
@@@@@@@@@ @@@@@@@@@@@@@@@@ _____ _ │ ▄▀▄ ▄▀▀ █ │
@@@@@@@@@@ @@@@@@@@@@@@ / ___| | │ █ █ ▀ ▀▄ █ │
@@@@@@@@@@ @@@@@@@@ \ `--.| |__ __ _ _ __ ___ │ █ █ █▀▄ █ ▄▀▄ █▀▄ ▀▄ █▀▄ ▄▀▄ █▄▀ ▄█▄ │
@@@@@@@@@@@ @ @@@@ `--. \ '_ \ / _` | '__/ _ \ │ ▀▄▀ █ █ █ ▀▄▀ █ █ ▄▄▀ █ █ ▀▄█ █ ▀▄▄ │
@@@@@@@@@@@@@ @@@@@@ /\__/ / | | | (_| | | | __/ │ │
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \____/|_| |_|\__,_|_| \___| │ v2.3.2.dev1 │
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ │ │
@@@@@@@@@@@@@@@@@@@@@@@@@ │ https://onionshare.org/ │
@@@@@@@@@@@@@@@@@@@ ╰───────────────────────────────────────────╯
@@@@@@@@@
[May 10 2021 18:24:02] Settings.__init__
[Nov 10 2020 20:50:35] Settings.__init__ [May 10 2021 18:24:02] Settings.load
[Nov 10 2020 20:50:35] Settings.load [May 10 2021 18:24:02] Settings.load: Trying to load /home/user/.config/onionshare/onionshare.json
[Nov 10 2020 20:50:35] Common.get_resource_path: filename=wordlist.txt [May 10 2021 18:24:02] Common.get_resource_path: filename=wordlist.txt
[Nov 10 2020 20:50:35] Common.get_resource_path: filename=wordlist.txt, path=/home/user/code/onionshare/cli/onionshare_cli/resources/wordlist.txt [May 10 2021 18:24:02] Common.get_resource_path: filename=wordlist.txt, path=/home/user/code/onionshare/cli/onionshare_cli/resources/wordlist.txt
[Nov 10 2020 20:50:35] ModeSettings.load: creating /home/user/.config/onionshare/persistent/abstain-reprogram-elevate.json [May 10 2021 18:24:02] ModeSettings.load: creating /home/user/.config/onionshare/persistent/tattered-handgun-stress.json
[Nov 10 2020 20:50:35] ModeSettings.set: updating abstain-reprogram-elevate: general.public = False [May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.title = None
[Nov 10 2020 20:50:35] ModeSettings.set: updating abstain-reprogram-elevate: general.autostart_timer = 0 [May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.public = False
[Nov 10 2020 20:50:35] ModeSettings.set: updating abstain-reprogram-elevate: general.autostop_timer = 0 [May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.autostart_timer = 0
[Nov 10 2020 20:50:35] ModeSettings.set: updating abstain-reprogram-elevate: general.legacy = False [May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.autostop_timer = 0
[Nov 10 2020 20:50:35] ModeSettings.set: updating abstain-reprogram-elevate: general.client_auth = False [May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.legacy = False
[Nov 10 2020 20:50:35] ModeSettings.set: updating abstain-reprogram-elevate: share.autostop_sharing = True [May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.client_auth = False
[Nov 10 2020 20:50:35] Web.__init__: is_gui=False, mode=share [May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: share.autostop_sharing = True
[Nov 10 2020 20:50:35] Common.get_resource_path: filename=static [May 10 2021 18:24:02] Web.__init__: is_gui=False, mode=share
[Nov 10 2020 20:50:35] Common.get_resource_path: filename=static, path=/home/user/code/onionshare/cli/onionshare_cli/resources/static [May 10 2021 18:24:02] Common.get_resource_path: filename=static
[Nov 10 2020 20:50:35] Common.get_resource_path: filename=templates [May 10 2021 18:24:02] Common.get_resource_path: filename=static, path=/home/user/code/onionshare/cli/onionshare_cli/resources/static
[Nov 10 2020 20:50:35] Common.get_resource_path: filename=templates, path=/home/user/code/onionshare/cli/onionshare_cli/resources/templates [May 10 2021 18:24:02] Common.get_resource_path: filename=templates
[Nov 10 2020 20:50:35] Web.generate_static_url_path: new static_url_path is /static_qa7rlyxwnfodczrriv3tj5yeoq [May 10 2021 18:24:02] Common.get_resource_path: filename=templates, path=/home/user/code/onionshare/cli/onionshare_cli/resources/templates
[Nov 10 2020 20:50:35] ShareModeWeb.init [May 10 2021 18:24:02] Web.generate_static_url_path: new static_url_path is /static_4yxrx2mzi5uzkblklpzd46mwke
[Nov 10 2020 20:50:35] Onion.__init__ [May 10 2021 18:24:02] ShareModeWeb.init
[Nov 10 2020 20:50:35] Onion.connect [May 10 2021 18:24:02] Onion.__init__
[Nov 10 2020 20:50:35] Settings.__init__ [May 10 2021 18:24:02] Onion.connect
[Nov 10 2020 20:50:35] Settings.load [May 10 2021 18:24:02] Settings.__init__
[Nov 10 2020 20:50:35] Onion.connect: tor_data_directory_name=/home/user/.config/onionshare/tmp/tmpz53ztq3m [May 10 2021 18:24:02] Settings.load
[Nov 10 2020 20:50:35] Common.get_resource_path: filename=torrc_template [May 10 2021 18:24:02] Settings.load: Trying to load /home/user/.config/onionshare/onionshare.json
[Nov 10 2020 20:50:35] Common.get_resource_path: filename=torrc_template, path=/home/user/code/onionshare/cli/onionshare_cli/resources/torrc_template [May 10 2021 18:24:02] Onion.connect: tor_data_directory_name=/home/user/.config/onionshare/tmp/tmpw6u0nz8l
[May 10 2021 18:24:02] Common.get_resource_path: filename=torrc_template
[May 10 2021 18:24:02] Common.get_resource_path: filename=torrc_template, path=/home/user/code/onionshare/cli/onionshare_cli/resources/torrc_template
Connecting to the Tor network: 100% - Done Connecting to the Tor network: 100% - Done
[Nov 10 2020 20:50:42] Onion.connect: Connected to tor 0.4.4.5 [May 10 2021 18:24:10] Onion.connect: Connected to tor 0.4.5.7
[Nov 10 2020 20:50:42] Settings.load [May 10 2021 18:24:10] Settings.load
[Nov 10 2020 20:50:42] Web.generate_password: saved_password=None [May 10 2021 18:24:10] Settings.load: Trying to load /home/user/.config/onionshare/onionshare.json
[Nov 10 2020 20:50:42] Common.get_resource_path: filename=wordlist.txt [May 10 2021 18:24:10] Web.generate_password: saved_password=None
[Nov 10 2020 20:50:42] Common.get_resource_path: filename=wordlist.txt, path=/home/user/code/onionshare/cli/onionshare_cli/resources/wordlist.txt [May 10 2021 18:24:10] Common.get_resource_path: filename=wordlist.txt
[Nov 10 2020 20:50:42] Web.generate_password: built random password: "pedometer-grower" [May 10 2021 18:24:10] Common.get_resource_path: filename=wordlist.txt, path=/home/user/code/onionshare/cli/onionshare_cli/resources/wordlist.txt
[Nov 10 2020 20:50:42] OnionShare.__init__ [May 10 2021 18:24:10] Web.generate_password: built random password: "tipping-colonize"
[Nov 10 2020 20:50:42] OnionShare.start_onion_service [May 10 2021 18:24:10] OnionShare.__init__
[Nov 10 2020 20:50:42] Onion.start_onion_service: port=17610 [May 10 2021 18:24:10] OnionShare.start_onion_service
[Nov 10 2020 20:50:42] Onion.start_onion_service: key_type=NEW, key_content=ED25519-V3 [May 10 2021 18:24:10] Onion.start_onion_service: port=17645
[Nov 10 2020 20:50:46] ModeSettings.set: updating abstain-reprogram-elevate: general.service_id = x5duatuhpiwfzb23iwpjanalvtxdhoj43ria44s53ryy5diywvbu24ad [May 10 2021 18:24:10] Onion.start_onion_service: key_type=NEW, key_content=ED25519-V3
[Nov 10 2020 20:50:46] ModeSettings.set: updating abstain-reprogram-elevate: onion.private_key = uIXJzY+88tGSAXAjQxdwkzb2L7jHv467RIX1WDieVkFEZjEA7st2p/6uVCM4KM3L9PdShTPScuUv2IEbVQammA== [May 10 2021 18:24:14] ModeSettings.set: updating tattered-handgun-stress: general.service_id = omxjamkys6diqxov7lxru2upromdprxjuq3czdhen6hrshzd4sll2iyd
[May 10 2021 18:24:14] ModeSettings.set: updating tattered-handgun-stress: onion.private_key = 6PhomJCjlWicmOyAAe0wnQoEM3vcyHBivrRGDy0hzm900fW5ITDJ6iv2+tluLoueYj81MhmnYeTOHDm8UGOfhg==
Compressing files. Compressing files.
[Nov 10 2020 20:50:46] ShareModeWeb.init [May 10 2021 18:24:14] ShareModeWeb.init
[Nov 10 2020 20:50:46] ShareModeWeb.set_file_info_custom [May 10 2021 18:24:14] ShareModeWeb.set_file_info_custom
[Nov 10 2020 20:50:46] ShareModeWeb.build_zipfile_list [May 10 2021 18:24:14] ShareModeWeb.build_zipfile_list
[Nov 10 2020 20:50:46] Web.start: port=17610 [May 10 2021 18:24:14] Web.start: port=17645
* Running on http://127.0.0.1:17610/ (Press CTRL+C to quit) * Running on http://127.0.0.1:17645/ (Press CTRL+C to quit)
Give this address to the recipient: Give this address to the recipient:
http://onionshare:pedometer-grower@x5duatuhpiwfzb23iwpjanalvtxdhoj43ria44s53ryy5diywvbu24ad.onion http://onionshare:tipping-colonize@omxjamkys6diqxov7lxru2upromdprxjuq3czdhen6hrshzd4sll2iyd.onion
Press Ctrl+C to stop the server Press Ctrl+C to stop the server
You can add your own debug messages by running the ``Common.log`` method from ``onionshare/common.py``. For example:: You can add your own debug messages by running the ``Common.log`` method from ``onionshare/common.py``. For example::
common.log('OnionShareGui', 'start_server', 'I ran here') common.log('OnionShareGui', 'start_server', 'I ran here')
@ -127,38 +131,37 @@ Tor is slow, and it's often convenient to skip starting onion services altogethe
You can do this with the ``--local-only`` flag. For example:: You can do this with the ``--local-only`` flag. For example::
$ poetry run onionshare-cli --local-only --receive $ poetry run onionshare-cli --local-only --receive
OnionShare 2.3 | https://onionshare.org/ ╭───────────────────────────────────────────╮
* ▄▄█████▄▄ *
@@@@@@@@@ │ ▄████▀▀▀████▄ * │
@@@@@@@@@@@@@@@@@@@ │ ▀▀█▀ ▀██▄ │
@@@@@@@@@@@@@@@@@@@@@@@@@ │ * ▄█▄ ▀██▄ │
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ │ ▄█████▄ ███ -+- │
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ___ _ │ ███ ▀█████▀ │
@@@@@@ @@@@@@@@@@@@@ / _ \ (_) │ ▀██▄ ▀█▀ │
@@@@ @ @@@@@@@@@@@ | | | |_ __ _ ___ _ __ * ▀██▄ ▄█▄▄ *
@@@@@@@@ @@@@@@@@@@ | | | | '_ \| |/ _ \| '_ \ │ * ▀████▄▄▄████▀ │
@@@@@@@@@@@@ @@@@@@@@@@ \ \_/ / | | | | (_) | | | | │ ▀▀█████▀▀ │
@@@@@@@@@@@@@@@@ @@@@@@@@@ \___/|_| |_|_|\___/|_| |_| │ -+- * │
@@@@@@@@@ @@@@@@@@@@@@@@@@ _____ _ │ ▄▀▄ ▄▀▀ █ │
@@@@@@@@@@ @@@@@@@@@@@@ / ___| | │ █ █ ▀ ▀▄ █ │
@@@@@@@@@@ @@@@@@@@ \ `--.| |__ __ _ _ __ ___ │ █ █ █▀▄ █ ▄▀▄ █▀▄ ▀▄ █▀▄ ▄▀▄ █▄▀ ▄█▄ │
@@@@@@@@@@@ @ @@@@ `--. \ '_ \ / _` | '__/ _ \ │ ▀▄▀ █ █ █ ▀▄▀ █ █ ▄▄▀ █ █ ▀▄█ █ ▀▄▄ │
@@@@@@@@@@@@@ @@@@@@ /\__/ / | | | (_| | | | __/ │ │
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \____/|_| |_|\__,_|_| \___| │ v2.3.2.dev1 │
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ │ │
@@@@@@@@@@@@@@@@@@@@@@@@@ │ https://onionshare.org/ │
@@@@@@@@@@@@@@@@@@@ ╰───────────────────────────────────────────╯
@@@@@@@@@
* Running on http://127.0.0.1:17617/ (Press CTRL+C to quit)
* Running on http://127.0.0.1:17635/ (Press CTRL+C to quit)
Files sent to you appear in this folder: /home/user/OnionShare Files sent to you appear in this folder: /home/user/OnionShare
Warning: Receive mode lets people upload files to your computer. Some files can potentially take control of your computer if you open them. Only open things from people you trust, or if you know what you are doing. Warning: Receive mode lets people upload files to your computer. Some files can potentially take control of your computer if you open them. Only open things from people you trust, or if you know what you are doing.
Give this address to the sender: Give this address to the sender:
http://onionshare:train-system@127.0.0.1:17635 http://onionshare:ended-blah@127.0.0.1:17617
Press Ctrl+C to stop the server Press Ctrl+C to stop the server
In this case, you load the URL ``http://onionshare:train-system@127.0.0.1:17635`` in a normal web-browser like Firefox, instead of using the Tor Browser. In this case, you load the URL ``http://onionshare:train-system@127.0.0.1:17635`` in a normal web-browser like Firefox, instead of using the Tor Browser.