Desarrollando OnionShare

Colaborando

OnionShare tiene un equipo Keybase abierto para discutir el proyecto, hacer preguntas, compartir ideas y diseños, y hacer planes para futuro desarrollo. (También es una manera fácil de enviar mensajes directos cifrados de extremo a extremo a otros en la comunidad OnionShare, como por ejemplo, direcciones OnionShare.) Para usar Keybase, descarga la aplicación Keybase, crea una cuenta, y únete a este equipo. Dentro de la aplicación, vé hacia «Equipos», haz clic en «Unirse a un Equipo», y tipea «onionshare».

OnionShare también tiene una lista de correo para desarrolladores y diseñafores para discutir el proyecto.

Contribuyendo código

OnionShare source code is to be found in this Git repository: https://github.com/onionshare/onionshare

If you’d like to contribute code to OnionShare, it helps to join the Keybase team and ask questions about what you’re thinking of working on. You should also review all of the open issues on GitHub to see if there are any you’d like to tackle.

Cuando estés listo para contribuir código, abre una solicitud de tiraje en el repositorio GitHub, y uno de los mantenedores del proyecto la revisará, y posiblemente haga preguntas, solicite cambios, la rechace o la incorpore dentro del proyecto.

Iniciando el desarrollo

OnionShare is developed in Python. To get started, clone the Git repository at https://github.com/onionshare/onionshare/ and then consult the cli/README.md file to learn how to set up your development environment for the command-line version, and the desktop/README.md file to learn how to set up your development environment for the graphical version.

Esos archivos contienen las instrucciones técnicas y comandos necesarios para instalar las dependencias para tu platforma, y ejecutar OnionShare desde la estructura de directorio fuente.

Consejos para depuración

Modo detallado

Durante el desarrollo, es conveniente ejecutar OnionShare desde un terminal y agregar el modificador --verbose (o -v) al comando. Esto imprime una cantidad de mensajes útiles a la terminal, tales como cuándo son inicializados ciertos objetos, cuándo ocurren eventos (como botones cliqueados, ajustes guardados o recargados), y otra información de depuración. Por ejemplo:

$ poetry run onionshare-cli -v ~/Documents/roms/nes/Q-bert\ \(USA\).nes
╭───────────────────────────────────────────╮
│    *            ▄▄█████▄▄            *    │
│               ▄████▀▀▀████▄     *         │
│              ▀▀█▀       ▀██▄              │
│      *      ▄█▄          ▀██▄             │
│           ▄█████▄         ███        -+-  │
│             ███         ▀█████▀           │
│             ▀██▄          ▀█▀             │
│         *    ▀██▄       ▄█▄▄     *        │
│ *             ▀████▄▄▄████▀               │
│                 ▀▀█████▀▀                 │
│             -+-                     *     │
│   ▄▀▄               ▄▀▀ █                 │
│   █ █     ▀         ▀▄  █                 │
│   █ █ █▀▄ █ ▄▀▄ █▀▄  ▀▄ █▀▄ ▄▀▄ █▄▀ ▄█▄   │
│   ▀▄▀ █ █ █ ▀▄▀ █ █ ▄▄▀ █ █ ▀▄█ █   ▀▄▄   │
│                                           │
│                  v2.3.3                   │
│                                           │
│          https://onionshare.org/          │
╰───────────────────────────────────────────╯

[May 10 2021 18:24:02] Settings.__init__
[May 10 2021 18:24:02] Settings.load
[May 10 2021 18:24:02] Settings.load: Trying to load /home/user/.config/onionshare/onionshare.json
[May 10 2021 18:24:02] Common.get_resource_path: filename=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
[May 10 2021 18:24:02] ModeSettings.load: creating /home/user/.config/onionshare/persistent/tattered-handgun-stress.json
[May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.title = None
[May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.public = False
[May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.autostart_timer = 0
[May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.autostop_timer = 0
[May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.legacy = False
[May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: general.client_auth = False
[May 10 2021 18:24:02] ModeSettings.set: updating tattered-handgun-stress: share.autostop_sharing = True
[May 10 2021 18:24:02] Web.__init__: is_gui=False, mode=share
[May 10 2021 18:24:02] Common.get_resource_path: filename=static
[May 10 2021 18:24:02] 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=templates
[May 10 2021 18:24:02] Common.get_resource_path: filename=templates, path=/home/user/code/onionshare/cli/onionshare_cli/resources/templates
[May 10 2021 18:24:02] Web.generate_static_url_path: new static_url_path is /static_4yxrx2mzi5uzkblklpzd46mwke
[May 10 2021 18:24:02] ShareModeWeb.init
[May 10 2021 18:24:02] Onion.__init__
[May 10 2021 18:24:02] Onion.connect
[May 10 2021 18:24:02] Settings.__init__
[May 10 2021 18:24:02] Settings.load
[May 10 2021 18:24:02] Settings.load: Trying to load /home/user/.config/onionshare/onionshare.json
[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
[May 10 2021 18:24:10] Onion.connect: Connected to tor 0.4.5.7
[May 10 2021 18:24:10] Settings.load
[May 10 2021 18:24:10] Settings.load: Trying to load /home/user/.config/onionshare/onionshare.json
[May 10 2021 18:24:10] Web.generate_password: saved_password=None
[May 10 2021 18:24:10] Common.get_resource_path: filename=wordlist.txt
[May 10 2021 18:24:10] Common.get_resource_path: filename=wordlist.txt, path=/home/user/code/onionshare/cli/onionshare_cli/resources/wordlist.txt
[May 10 2021 18:24:10] Web.generate_password: built random password: "tipping-colonize"
[May 10 2021 18:24:10] OnionShare.__init__
[May 10 2021 18:24:10] OnionShare.start_onion_service
[May 10 2021 18:24:10] Onion.start_onion_service: port=17645
[May 10 2021 18:24:10] Onion.start_onion_service: key_type=NEW, key_content=ED25519-V3
[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.
[May 10 2021 18:24:14] ShareModeWeb.init
[May 10 2021 18:24:14] ShareModeWeb.set_file_info_custom
[May 10 2021 18:24:14] ShareModeWeb.build_zipfile_list
[May 10 2021 18:24:14] Web.start: port=17645
* Running on http://127.0.0.1:17645/ (Press CTRL+C to quit)

Give this address to the recipient:
http://onionshare:tipping-colonize@omxjamkys6diqxov7lxru2upromdprxjuq3czdhen6hrshzd4sll2iyd.onion

Press Ctrl+C to stop the server

Puedes agregar tus propios mensajes de depuración ejecutando el método Common.log desde onionshare/common.py. Por ejemplo:

common.log('OnionShareGui', 'start_server', 'I ran here')

Esto puede ser útil para conocer la cadena de eventos que ocurre cuando usas OnionShare, o el valor de ciertas variables antes y después de que sean manipuladas.

Solo local

Tor es lento, y a menudo es conveniente saltear el inicio de servicios onion sin excepción durante el desarrollo. Puedes hacer esto con el modoficador --local-only. Por ejemplo:

$ poetry run onionshare-cli --local-only --receive
╭───────────────────────────────────────────╮
│    *            ▄▄█████▄▄            *    │
│               ▄████▀▀▀████▄     *         │
│              ▀▀█▀       ▀██▄              │
│      *      ▄█▄          ▀██▄             │
│           ▄█████▄         ███        -+-  │
│             ███         ▀█████▀           │
│             ▀██▄          ▀█▀             │
│         *    ▀██▄       ▄█▄▄     *        │
│ *             ▀████▄▄▄████▀               │
│                 ▀▀█████▀▀                 │
│             -+-                     *     │
│   ▄▀▄               ▄▀▀ █                 │
│   █ █     ▀         ▀▄  █                 │
│   █ █ █▀▄ █ ▄▀▄ █▀▄  ▀▄ █▀▄ ▄▀▄ █▄▀ ▄█▄   │
│   ▀▄▀ █ █ █ ▀▄▀ █ █ ▄▄▀ █ █ ▀▄█ █   ▀▄▄   │
│                                           │
│                  v2.3.3                   │
│                                           │
│          https://onionshare.org/          │
╰───────────────────────────────────────────╯

* Running on http://127.0.0.1:17617/ (Press CTRL+C to quit)

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.

Give this address to the sender:
http://onionshare:ended-blah@127.0.0.1:17617

Press Ctrl+C to stop the server

En este caso, cargas el URL http://onionshare:train-system@127.0.0.1:17635 en un navegador web normal como Firefox, en vez de usar al Navegador Tor.

Contribuyendo traducciones

Ayuda a que OnionShare sea más fácil de usar, y más familiar y amigable para las personas, traduciéndolo en Hosted Weblate. Siempre mantén «OnionShare» en el alfabeto latino, y usa «OnionShare (nombre local)» si fuera necesario.

Para ayudar a traducir, crea una cuenta Hosted Weblate y empieza a contribuir.

Sugerencias para cadenas de caracteres en el original en Inglés

A veces, las cadenas de caracteres en Inglés están equivocadas, o no se corresponden entre la aplicación y la documentación.

Propone mejoras en las cadenas fuente añadiendo @kingu a tu comentario en Weblate, o abre una cuestión o solicitud de tiraje en GitHub. Esta última asegura que todos los desarrolladores de nivel superior vean las sugerencias, y potencialmente puede modificar la cadena a través de los procesos usuales de revisión de código.

Estado de las traducciones

Aquí está el estado actual de las traducciones. Si quieres empezar una traducción en un lenguaje que no se encuentra aquí, por favor escríbenos a la lista de correo: onionshare-dev@lists.riseup.net

https://hosted.weblate.org/widgets/onionshare/-/translations/multi-auto.svg