Actions

Whonix ™ friendly applications best practices

From Whonix

< Dev



config.d support[edit]

Please parse a /etc/your-application.d configuration folder so Linux distributions such as Debian and Whonix ™ can set defaults (such as proxy / stream isolation configuration). Users are of course free to overrule these defaults using the usual configuration files in the user's home folder.

Please parse only configuration files with a file extension such as .conf. This is because graphical editors such as kate create backup files such as file-name~ or APT / dpkg creating files such as config-file-name.dpkg-old which would lead to unexpected results.

Stream Isolation[edit]

add_onion[edit]

  • Please use add_onion Tor control protocol command / Tor ephemeral onion services.

ephemeral: Means the onion service will be gone after the Tor control connection is closed. It's however possible and usual to retrieve onion service private key and to restore it at next run.

For example ricochet [archive] by @special [archive] is doing that.

Tor ephemeral onion services are a lot a lot better for Whonix ™ than preconfigued Tor hidden services.

onionshare [archive] by @micahflee [archive] has superb Tails and Whonix ™ support.

Listen Interface[edit]

  • Listen on all interfaces rather than just localhost. (This is required since the incoming onion service connection comes from the network, not from localhost.)
    # In {{project_name}}, listen on 0.0.0.0 instead of 127.0.0.1 (#220)
    if os.path.exists('/usr/share/anon-ws-base-files/workstation'):
        host = '0.0.0.0'
    else:
        host = '127.0.0.1'

Related: Listen Port Convention [archive]

Listen Port[edit]

  • Don't listen on a random local server port.
  • Listen on a specific local server port or port range.
  • Tor VIRTPROT (remote virtual port on the onion service) does not matter.
  • [1]

Tor Settings Autodetection[edit]

  • Auto detect Tor settings through TOR_* environment variables.

In Whonix:

TOR_CONTROL_IPC_PATH=/var/run/anon-ws-disable-stacked-tor/127.0.0.1_9151.sock
TOR_SOCKS_IPC_PATH=/var/run/anon-ws-disable-stacked-tor/127.0.0.1_9150.sock

These are unix domain socket files.

Ports would also work but nowadays unix domain socket files are much more advisable since these are less likely to leak.

Robustness[edit]

  • The application should not crash if Tor ControlPort replies something unexpected such as 510 Command filtered.

Usability[edit]

  • Show an error message if Whonix ™ is detected and seeing 510 Command filtered:

Error talking to the Tor controller.\nIf you're using Whonix ™, check out ../ProgramName [archive] to make ProgramName work.

Bonus[edit]

  • Bonus: Make a list of Tor control commands you are using so an onion-grater profile can be written.

See Also[edit]

Forum Discussion[edit]

https://forums.whonix.org/t/whonix-friendly-applications-best-practices [archive]

Footnotes[edit]

    • onionshare uses 17600 - 17659. That is handy, so we can match for it using (176[0-5][0-9]) in the onionshare onion-grater whitelist config [archive].
    • That way onionshare (running inside a compromised workstation) cannot open arbitrary ports on the workstation. For example, not to the real Tor ControlPort and circumvent the filtering. (We use Tor ControlSocket rather than ControlPort now for this reason.) There are no local ports open on Whonix-Gateway ™ besides Tor Socks, DNS and TransPort, but if there was (let's say for example for brltty [archive]), then we don't want connections to it.
    • That allows us to set a limit on how many Tor hidden services (a compromised) workstation can create.
    • It's also useful so users don't have to open all incoming ports in Whonix-Workstation Firewall.


Fosshost is sponsors Kicksecure ™ stage server 100px
Fosshost About Advertisements

Search engines: YaCy | Qwant | ecosia | MetaGer | peekier | Whonix ™ Wiki


Follow: 1024px-Telegram 2019 Logo.svg.png Iconfinder Apple Mail 2697658.png Twitter.png Facebook.png Rss.png Reddit.jpg 200px-Mastodon Logotype (Simple).svg.png

Support: Discourse logo.png

Donate: Donate Bank Wire Paypal Bitcoin accepted here Monero accepted here Contribute

Whonix donate bitcoin.png Monero donate Whonix.png United Federation of Planets 1000px.png

Twitter-share-button.png Facebook-share-button.png Telegram-share.png link=mailto:?subject=Dev/Project friendly applications best practices&body=../Dev/Project_friendly_applications_best_practices link=https://reddit.com/submit?url=../Dev/Project_friendly_applications_best_practices&title=Dev/Project friendly applications best practices link=https://news.ycombinator.com/submitlink?u=../Dev/Project_friendly_applications_best_practices&t=Dev/Project friendly applications best practices link=https://mastodon.technology/share?message=Dev/Project friendly applications best practices%20../Dev/Project_friendly_applications_best_practices&t=Dev/Project friendly applications best practices

There are five different options for subscribing to Whonix ™ source code changes.

https link onion link Priority Support | Investors | Professional Support

Whonix | © ENCRYPTED SUPPORT LP | Heckert gnu.big.png Freedom Software / Osi standard logo 0.png Open Source (Why?)

The personal opinions of moderators or contributors to the Whonix ™ project do not represent the project as a whole.

By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent.