1.9 KiB
1.9 KiB
Ember Market on Tor
This document explains how to run Ember Market in a Tor-friendly way, ensuring compatibility with .onion domains and the Tor network.
Tor-Optimized Configuration
The application is designed to work seamlessly with Tor by:
- Using relative URLs throughout the codebase
- Avoiding hardcoded domain names
- Ensuring all API requests work regardless of the domain
Running in Tor Mode
To start the application in Tor mode:
# Development
npm run dev:tor
# Production
npm run start:tor
These commands use the .env.tor configuration file, which sets appropriate environment variables for Tor usage.
Accessing via .onion Domain
When deployed to a Tor hidden service:
- The application automatically detects the .onion domain
- All API requests are made relative to the current domain
- No changes are needed to the codebase or configuration
Security Considerations for Tor
- All API requests use relative URLs to prevent domain leakage
- Authentication is performed on the same domain to maintain anonymity
- No external resources are loaded that could compromise Tor anonymity
Deployment to a Tor Hidden Service
To deploy as a Tor hidden service:
- Set up a Tor hidden service pointing to the application port (default: 3000)
- Use the
start:torscript to ensure proper environment variables - The application will automatically work with the .onion domain
Checking Tor Compatibility
To verify the application is working correctly with Tor:
- Check network requests in the browser's developer tools
- All API requests should go to relative paths (e.g.,
/api/auth/me) - No absolute URLs should be used in requests
Troubleshooting Tor Issues
- If authentication fails, check that cookies are enabled in your Tor browser
- If API requests fail, verify that the application is accessible via the .onion domain
- For security issues, ensure JavaScript is enabled for the .onion domain in Tor browser settings