localgreenchain/tor/torrc.example
Claude ccea9535d4
Add Tor integration and privacy features for anonymous plant sharing
Implements comprehensive privacy and anonymity features including Tor
hidden service support, location obfuscation, and anonymous registration.

Privacy Features:
- Anonymous plant registration with zero personal information
- Location privacy levels: exact, fuzzy, city, country, hidden
- Pseudonymous identities and wallet addresses
- Privacy settings component with real-time Tor status
- Encrypted anonymous contact generation

Tor Integration:
- SOCKS proxy support for Tor connections
- Hidden service (.onion) configuration
- Tor connection detection and status API
- Docker Compose setup for easy Tor deployment
- Automatic privacy warnings when not using Tor

Location Obfuscation:
- Fuzzy location: ±1-5km random offset
- City level: ~10km grid
- Country level: ~100km grid
- Hidden: complete location privacy
- Haversine-based distance calculations preserved

Anonymous Registration:
- /plants/register-anonymous endpoint
- Privacy-first UI with Tor status banner
- Anonymous IDs and wallet addresses
- Optional pseudonym support
- Encryption key support for enhanced security

Infrastructure:
- Tor service integration (lib/services/tor.ts)
- Privacy utilities (lib/privacy/anonymity.ts)
- PrivacySettings React component
- Tor status API endpoint
- Docker and docker-compose configurations
- Example Tor configuration (torrc.example)

Documentation:
- Comprehensive TOR_SETUP.md guide
- Installation instructions for Linux/macOS/Windows
- Privacy best practices
- Troubleshooting guide
- Security considerations
- Updated README with Tor features

Dependencies:
- Added socks-proxy-agent for Tor proxy support

This enables:
- Privacy-conscious growers to share anonymously
- Protection of exact home locations
- Censorship-resistant plant sharing
- Community building without identity disclosure
- Compliance with privacy regulations

All privacy features are optional and configurable.
Users can choose their desired privacy level.
2025-11-16 12:32:59 +00:00

41 lines
1 KiB
Text

# Tor Configuration for LocalGreenChain Hidden Service
# Copy this file to /etc/tor/torrc or ~/.tor/torrc and edit as needed
# SOCKS proxy port (for outgoing Tor connections)
SocksPort 9050
# Control port for managing Tor
ControlPort 9051
# Hidden Service Configuration
# This allows your LocalGreenChain instance to be accessible via .onion address
HiddenServiceDir /var/lib/tor/localgreenchain/
HiddenServicePort 80 127.0.0.1:3001
# Optional: Multiple hidden service ports
# HiddenServicePort 443 127.0.0.1:3001
# Logging (for debugging)
Log notice file /var/log/tor/notices.log
# Privacy and Security Settings
# Reject non-anonymous single hop circuits
RejectAllOutboundTraffic 0
# Circuit isolation for better privacy
IsolateDestAddr 1
IsolateDestPort 1
# Bridge configuration (if needed to bypass censorship)
# UseBridges 1
# Bridge obfs4 [bridge address]
# Bandwidth settings (optional)
# RelayBandwidthRate 100 KB
# RelayBandwidthBurst 200 KB
# Directory for storing Tor data
DataDirectory /var/lib/tor
# Run as daemon
RunAsDaemon 1