The PastePoint server is a high-performance Rust-based backend built with Actix Web, providing WebSocket-based file sharing and communication services for local networks. Features comprehensive session management, WebRTC signaling, and secure file transfer capabilities.
- Framework: Actix Web - High-performance async web framework
- WebSockets: Native Actix WebSocket support
- Security: OpenSSL for TLS termination
- Serialization: Serde for JSON handling
- UUID: UUID generation for session management
- Rate Limiting: Actix-governor for request throttling
- Logging: Built-in logging with configurable levels
server/
├── 📁 src/ # Source code
├── 📁 config/ # Configuration files
│ ├── development.toml # Development configuration
│ ├── production.toml # Production configuration
│ └── docker-dev.toml # Docker development config
├── 📁 tests/ # Tests
├── 📁 target/ # Rust build artifacts
├── Cargo.toml # Project dependencies
├── Cargo.lock # Dependency lock file
├── Dockerfile # Docker configuration
└── README.md # Project documentation
- Rust: stable toolchain (specified in
../rust-toolchain) - OpenSSL: Required for SSL/TLS support
- Linux:
sudo apt-get install libssl-dev pkg-config - macOS:
brew install openssl pkg-config - Windows:
winget install OpenSSL
- Linux:
-
Navigate to server directory:
cd server -
Install dependencies:
cargo build
-
Run development server:
cargo run
-
Run with specific configuration:
RUST_BUILD_MODE=debug cargo run
config/development.toml: Development environment settingsconfig/production.toml: Production environment settingsconfig/docker-dev.toml: Docker development environment settings
cargo testcargo test test_namecargo test -- --nocapture- Formatting:
cargo fmt - Linting:
cargo clippy - Security audit:
cargo audit
# Build for development
cargo build
# Build for production
cargo build --release- TLS/SSL: Full SSL/TLS support with configurable certificates
- Rate Limiting: Configurable request throttling with Actix-governor
- CORS: Configurable Cross-Origin Resource Sharing
- Input Validation: Comprehensive input validation and sanitization
- Session Management: Secure UUID-based session handling
- WebSocket Security: Secure WebSocket connections with proper authentication
-
SSL Certificate Errors:
# Generate self-signed certificates ../scripts/generate-certs.sh -
Port Already in Use:
# Check what's using the port lsof -i :9000 # Kill the process or change the port in config
-
Permission Denied:
# Ensure proper permissions for SSL certificates sudo chown -R $USER:$USER /path/to/certs
-
Build Issues:
# Clean build artifacts cargo clean # Rebuild cargo build
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.