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.
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Tor daemon
|
|
tor:
|
|
image: goldy/tor-hidden-service:latest
|
|
container_name: localgreenchain-tor
|
|
environment:
|
|
# Hidden service configuration
|
|
SERVICE_NAME: localgreenchain
|
|
SERVICE_PORT: 80
|
|
SERVICE_HOST: app
|
|
SERVICE_HOST_PORT: 3001
|
|
volumes:
|
|
- tor-data:/var/lib/tor
|
|
- ./tor/torrc.example:/etc/tor/torrc:ro
|
|
ports:
|
|
- "9050:9050" # SOCKS proxy
|
|
- "9051:9051" # Control port
|
|
networks:
|
|
- localgreenchain-network
|
|
restart: unless-stopped
|
|
|
|
# LocalGreenChain application
|
|
app:
|
|
build: .
|
|
container_name: localgreenchain-app
|
|
environment:
|
|
- NODE_ENV=production
|
|
- TOR_ENABLED=true
|
|
- TOR_SOCKS_HOST=tor
|
|
- TOR_SOCKS_PORT=9050
|
|
- TOR_CONTROL_PORT=9051
|
|
- TOR_HIDDEN_SERVICE_DIR=/var/lib/tor/hidden_service
|
|
volumes:
|
|
- ./data:/app/data
|
|
- tor-data:/var/lib/tor:ro
|
|
depends_on:
|
|
- tor
|
|
networks:
|
|
- localgreenchain-network
|
|
restart: unless-stopped
|
|
command: bun run start
|
|
|
|
# Optional: nginx reverse proxy for additional security
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: localgreenchain-nginx
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./nginx/ssl:/etc/nginx/ssl:ro
|
|
depends_on:
|
|
- app
|
|
networks:
|
|
- localgreenchain-network
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
tor-data:
|
|
driver: local
|
|
|
|
networks:
|
|
localgreenchain-network:
|
|
driver: bridge
|