Add OS Detection and Configuration for Tails and Whonix (Tor Connection)#1091
Conversation
Add OS detection and Tor configuration for Tails/Whonix
|
After looking at the socks_socket.dart I think the Tor configuration above might be wrong? It is key when using Tails or already have Tor daemon running to use that socks port (default is 9050) on linux. Personally I would like the option to use my system tor daemon running over the one with the stack wallet. Tails cant use the bundled tor that is included with stack wallet due to this. The only way to use it currently on Tails or with another tor instance running is with Also not sure how SOCKS5 is used in dart implementation but SOCKS5h proxies the DNS requests through the proxy server, while standard SOCKS5 does not if my understanding is correct? It would also be great if the Tor setting had an input field in the UI that the user could input the socks port (e.g. port 9050). The While the detecting that the system is Whonix workstation by the existence of file |
|
It may be better to add a proxy settings page and set things up to run network calls through that. Tor is currently very self contained in stack wallet so there would be some setup required for this. There is an issue with some coins in stack wallet whose libraries do their own networking and do not support proxies. Eth being an example. Most will work with a socks5 proxy though. Re the above comment and code snippets: |
While /etc/whonix_version might be valid I would change it along the lines to this Whonix documentation Programmatically_Detecting_Whonix I think starting with a manual proxy setting within the Tor setting like @julian-CStack stated would be a good start then you could use the os detection to set those upon first start if those are detected. If they are already set then do nothing. |
Summary
Make Tor Connection Tails & Whonix friendly
This merge request introduces OS detection for Tails and Whonix, and configures the Tor connection accordingly. The changes ensure that the application correctly identifies when it is running on Tails or Whonix and configures the Tor connection to use the appropriate settings.
Changes
New File:
os_detection.dartlib/os_detection.dartthat contains theOSDetectorclass. This class provides methods to detect if the application is running on Tails or Whonix operating systems.Modified File:
main.dartUpdated
lib/main.dartto include the newos_detection.dartand implement OS detection and Tor configuration logic in themainfunction.Import Statement:
Added the import statement for
os_detection.dart.OS Detection and Tor Configuration:
Added logic in the
mainfunction to detect if the application is running on Tails or Whonix and configure the Tor connection accordingly.Purpose
The purpose of these changes is to ensure that the application can detect when it is running on Tails or Whonix and configure the Tor connection appropriately. This improves the application's compatibility and security in privacy-focused operating systems.
Testing
127.0.0.1:9050withsocks5hproxy settings. This is key since users like Tails users are already using tor via a system Tor daemon or may not want to use the Tor bundled with stack wallet for whatever reason or simply do to it not working.Bug: Tor Connection Never Connects to Tor on TailsOS #1060
Bug: Issue with Tor Settings on Linux - Request for "Use System Tor" option #1058
Documentation
Please review the changes and let me know if there are any questions or further adjustments needed.
I think this is a good starting point to make Stack Wallet Tails and Whonix friendly.