Add OS Detection and Configuration for Tails and Whonix (Tor Connection) #1091
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.dart
lib/os_detection.dart
that contains theOSDetector
class. This class provides methods to detect if the application is running on Tails or Whonix operating systems.Modified File:
main.dart
Updated
lib/main.dart
to include the newos_detection.dart
and implement OS detection and Tor configuration logic in themain
function.Import Statement:
Added the import statement for
os_detection.dart
.OS Detection and Tor Configuration:
Added logic in the
main
function 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:9050
withsocks5h
proxy 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.