Utilisation Avancée

Sauvegarder les onglets

Tout dans OnionShare est temporaire par défaut. Si vous fermez un onglet, son adresse n’existe plus et ne pourra plus être utilisée. Dans certains cas, vous voudrez qu’un service OnionShare soit persistent. Cela est utile si vous souhaitez héberger un site web dont l’adresse OnionShare reste identique même après un redémarrage de votre ordinateur.

Pour rendre un onglet persistant, cocher la case « Enregistrer cet onglet et l’ouvrir automatiquement quand j’ouvre OnionShare » avant de démarrer le serveur. Quand un onglet est sauvegardé un icône d’épingle violet apparaît à la gauche du statut du serveur.

_images/advanced-save-tabs.png

When you quit OnionShare and then open it again, your saved tabs will start opened. You’ll have to manually start each service, but when you do they will start with the same OnionShare address and private key.

Si vous sauvegarder un onglet, une copie de la clé secrète de ce service ognon sera stocké dans votre ordinateur avec vos paramètres OnionShare.

Turn Off Private Key

By default, all OnionShare services are protected with a private key, which Tor calls « client authentication ».

When browsing to an OnionShare service in Tor Browser, Tor Browser will prompt for the private key to be entered.

Sometimes you might want your OnionShare service to be accessible to the public, like if you want to set up an OnionShare receive service so the public can securely and anonymously send you files. In this case, it’s better to disable the private key altogether.

To turn off the private key for any tab, check the « This is a public OnionShare service (disables private key) » box before starting the server. Then the server will be public and won’t need a private key to view in Tor Browser.

Custom Titles

By default, when people load an OnionShare service in Tor Browser they see the default title for the type of service. For example, the default title of a chat service is « OnionShare Chat ».

If you want to choose a custom title, set the « Custom title » setting before starting a server.

Programmation horaire

OnionShare permet de planifier quand un service doit démarrer ou s’arrêter. Avant de démarrer un serveur, cliquer « Afficher les paramètres avancés » dans l’onglet et cocher une ou les deux cases « Démarrer un service onion à une heure prédéterminée » ou  » Arrêter un service onion à une heure prédéterminée », et définissez les dates et heures souhaitées.

Si vous paramétrez un service pour qu’il démarre dans le futur, quand vous cliquer le bouton « Commencer le partage », un compte à rebours s’affichera jusqu’au démarrage du service. Si vous le paramétrez pour qu’il s’arrête dans le futur, après son démarrage un compte à rebours jusqu’à son arrêt automatique s’affichera.

Planifier le démarrage automatique d’un service OnionShare peut être utilisé comme une veille automatique, le service deviendra public à un moment choisis dans le futur si quelque chose vous arrive. Si rien ne vous arrive, vous pouvez annuler le service avant qu’il ne se lance.

_images/advanced-schedule-start-timer.png

Scheduling an OnionShare service to automatically stop can be useful to limit exposure, like if you want to share secret documents while making sure they’re not available on the internet for more than a few days.

_images/advanced-schedule-stop-timer.png

Interface en ligne de commande

En plus de son interface graphique, OnionShare dispose d’une interface en ligne de commande.

Vous pouvez installez uniquement la version en ligne de commande d’OnionShare en utilisant pip3:

pip3 install --user onionshare-cli

Notez que vous aurez aussi besoin d’installer le paquet tor. Sur macOS, installez le avec : brew install tor

Puis lancez le avec

onionshare-cli --help

For information about installing it on different operating systems, see the CLI readme file in the git repository.

Si vous installez OnionShare en utilisant le paquet Linux Snapcraft, vous pouvez vous contentez de lancer onionshare.cli pour accéder à l’interface en ligne de commande.

Utilisation

Vous pouvez consultez la documentation de l’interface en ligne de commande en lançant onionshare --help:

$ onionshare-cli --help
╭───────────────────────────────────────────╮
│    *            ▄▄█████▄▄            *    │
│               ▄████▀▀▀████▄     *         │
│              ▀▀█▀       ▀██▄              │
│      *      ▄█▄          ▀██▄             │
│           ▄█████▄         ███        -+-  │
│             ███         ▀█████▀           │
│             ▀██▄          ▀█▀             │
│         *    ▀██▄       ▄█▄▄     *        │
│ *             ▀████▄▄▄████▀               │
│                 ▀▀█████▀▀                 │
│             -+-                     *     │
│   ▄▀▄               ▄▀▀ █                 │
│   █ █     ▀         ▀▄  █                 │
│   █ █ █▀▄ █ ▄▀▄ █▀▄  ▀▄ █▀▄ ▄▀▄ █▄▀ ▄█▄   │
│   ▀▄▀ █ █ █ ▀▄▀ █ █ ▄▄▀ █ █ ▀▄█ █   ▀▄▄   │
│                                           │
│                  v2.4.1                   │
│                                           │
│          https://onionshare.org/          │
╰───────────────────────────────────────────╯

usage: onionshare-cli [-h] [--receive] [--website] [--chat] [--local-only] [--connect-timeout SECONDS] [--config FILENAME] [--persistent FILENAME] [--title TITLE] [--public]
                      [--auto-start-timer SECONDS] [--auto-stop-timer SECONDS] [--no-autostop-sharing] [--data-dir data_dir] [--webhook-url webhook_url] [--disable-text]
                      [--disable-files] [--disable_csp] [--custom_csp custom_csp] [-v]
                      [filename ...]

positional arguments:
  filename                  List of files or folders to share

optional arguments:
  -h, --help                show this help message and exit
  --receive                 Receive files
  --website                 Publish website
  --chat                    Start chat server
  --local-only              Don't use Tor (only for development)
  --connect-timeout SECONDS
                            Give up connecting to Tor after a given amount of seconds (default: 120)
  --config FILENAME         Filename of custom global settings
  --persistent FILENAME     Filename of persistent session
  --title TITLE             Set a title
  --public                  Don't use a private key
  --auto-start-timer SECONDS
                            Start onion service at scheduled time (N seconds from now)
  --auto-stop-timer SECONDS
                            Stop onion service at schedule time (N seconds from now)
  --no-autostop-sharing     Share files: Continue sharing after files have been sent (default is to stop sharing)
  --data-dir data_dir       Receive files: Save files received to this directory
  --webhook-url webhook_url
                            Receive files: URL to receive webhook notifications
  --disable-text            Receive files: Disable receiving text messages
  --disable-files           Receive files: Disable receiving files
  --disable_csp             Publish website: Disable the default Content Security Policy header (allows your website to use third-party resources)
  --custom_csp custom_csp   Publish website: Set a custom Content Security Policy header
  -v, --verbose             Log OnionShare errors to stdout, and web errors to disk