Server-side code for accepting crash reports and feedback
- Moved some shared code for copying InputStreams to OutputStreams into a utility class
- Modified the dev report sender to send one report per connection
- Easier to handle on the server side
- If the connection fails after sending any reports, they don't need to be resent
- Tor will reuse the circuit, so it's cheap
- Added server-side code for accepting dev reports
- We need to protect the server's resources from DoS attacks
- Reports can't be larger than 1 MB
- Connections are limited to an average rate of one per minute
- The rate limiter uses a token bucket to allow bursts of up to 1,000 connections
- If the rate limit is exceeded, connection attempts will fail - clients will retry next time they sign in
- The limits can be raised when we move to a bigger server (and when we have some users)