- **docker-compose.yml** - Added Redis service configuration to support token storage. - Set up health checks and volume for Redis persistence. - Configured VRCAuthProxy service to depend on Redis. - **HttpClientCookieContainer.cs** - Added `Username` property to support user-specific token management. - **Program.cs** - Integrated Redis for storing and retrieving authentication tokens. - Updated login and token rotation logic to utilize Redis. - Improved async/await usage for better reliability. - **VRCAuthProxy.csproj** - Added `StackExchange.Redis` package for Redis connectivity. - Corrected `Otp.NET` package reference. - **API.cs** - Updated `TotpVerifyResponse` and `User` classes to be nullable-aware. - **RedisService.cs** - Implemented Redis service for managing authentication tokens. - Added methods for saving, retrieving, and deleting tokens.
32 lines
No EOL
603 B
YAML
32 lines
No EOL
603 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: redis-server --save 60 1 --loglevel warning
|
|
volumes:
|
|
- redis_data:/data
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 3
|
|
|
|
vrcauthproxy:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8080:80"
|
|
environment:
|
|
- REDIS_CONNECTION=redis:6379
|
|
- ASPNETCORE_ENVIRONMENT=Production
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
redis_data:
|
|
driver: local |