Skip to content

Latest commit

Β 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SPL Rust

Rust Platform Build Status

SPL (Secure Package Loader) is a high-performance, encrypted file transfer tool written in Rust. It provides secure file transfers using AES-256-GCM encryption over TCP connections, designed for reliability and speed when transferring large files across networks.


πŸš€ Features

  • πŸ”’ Military-grade encryption: AES-256-GCM encryption ensures your files stay secure
  • πŸ“¦ Chunked transfers: Efficient handling of large files with optimized memory usage
  • 🌐 Cross-platform: Native support for Windows, Linux, and macOS
  • πŸ’» Simple CLI interface: Easy-to-use command-line tool for both sending and receiving
  • ⚑ High-speed performance: Optimized TCP streaming with minimal overhead
  • πŸ”‘ Automatic key management: Secure key generation and configuration handling
  • πŸ“Š Progress tracking: Real-time transfer progress and speed monitoring
  • πŸ›‘οΈ Error recovery: Built-in retry mechanisms and connection resilience

πŸ“‹ Table of Contents


πŸ“¦ Prerequisites

  • Rust: Version 1.89.0 or newer (Install Rust)
  • Cargo: Rust package manager (included with Rust installation)
  • Network: Both machines must be able to communicate over TCP on port 5001
  • Firewall: Ensure port 5001 is open on the receiving machine

πŸ”§ Installation

Method 1: Build from Source

  1. Clone the repository:

    git clone https://github.com/CyberHuman-bot/SPL.git
    cd SPL
  2. Build the project:

    cargo build --release
  3. Install globally (optional):

    cargo install --path .

The compiled binary will be available at:

  • Release build: target/release/spl_rust
  • Global install: Available as spl_rust in your PATH

Method 2: Direct Installation from Git

cargo install --git https://github.com/CyberHuman-bot/SPL.git

πŸƒ Quick Start

Sending a File

  1. Start the receiver on the target machine:

    ./spl_rust receive <filename>
  2. Send the file from the source machine:

    ./spl_rust -<IP_ADDRESS> <FILE_PATH>

Example Transfer

# On receiver (192.168.1.100)
./spl_rust receive mydocument.pdf

# On sender
./spl_rust -192.168.1.100 ./document.pdf

πŸ“– Usage

Command Line Options

SPL - Secure Package Loader

USAGE:
    spl_rust [OPTIONS] <SUBCOMMAND>

OPTIONS:
    -p, --port <PORT>         Port to use for transfer [default: 8080]
    -v, --verbose             Enable verbose output
    -q, --quiet               Suppress non-essential output
    -h, --help                Print help information
    -V, --version             Print version information

SUBCOMMANDS:
    send <IP> <FILE>          Send file to specified IP address
    receive                   Start receiver mode
    config                    Generate or modify configuration
    help                      Print this message or the help of subcommands

Detailed Command Usage

Sending Files

# Basic file send
./spl_rust send 192.168.1.100 ./myfile.zip

# Send with custom port
./spl_rust --port 9000 send 192.168.1.100 ./large_file.iso

# Verbose mode for debugging
./spl_rust --verbose send 192.168.1.100 ./data.tar.gz

Configuration File Location

  • Linux/macOS: ~/.config/spl/config.toml
  • Windows: %APPDATA%\SPL\config.toml

πŸ’‘ Examples

Basic File Transfer

# Terminal 1 (Receiver - 192.168.1.100)
./spl_rust receive ./my.pptx
# Output: Listening on 192.168.1.100:8080...

# Terminal 2 (Sender)
./spl_rust -192.168.1.100 ./presentation.pptx
# Output: Transferring presentation.pptx... [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100% (5.2 MB/s)

πŸ” Security

SPL implements several security measures to protect your file transfers:

  • AES-256-GCM Encryption: Industry-standard encryption with authenticated encryption
  • Secure Key Generation: Cryptographically secure random key generation
  • Perfect Forward Secrecy: New session keys for each transfer
  • Integrity Verification: Built-in checksums and authentication tags
  • No Key Storage: Encryption keys are never stored on disk

Security Best Practices

  • Always use SPL over trusted networks when possible
  • Regularly update to the latest version
  • Verify file integrity after large transfers
  • Use strong, unique passwords for any additional authentication layers

πŸ› Troubleshooting

Common Issues

Connection Refused

Error: Connection refused (os error 111)
  • Ensure the receiver is running before sending
  • Check firewall settings on both machines
  • Verify the IP address and port are correct

Permission Denied

Error: Permission denied (os error 13)
  • Check file permissions on the source file
  • Ensure write permissions in the destination directory
  • Try running with appropriate privileges

Large File Transfers Failing

  • Check available disk space on receiving machine
  • Verify network stability
  • Consider using a wired connection for very large files

Debug Mode

Enable verbose logging to diagnose issues:

./spl_rust --verbose send 192.168.1.100 ./file.txt

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

git clone https://github.com/CyberHuman-bot/SPL.git
cd SPL
cargo build
cargo test

Running Tests

# Run all tests
cargo test

# Run with coverage
cargo test --all-features

# Run specific test
cargo test test_encryption

πŸ™ Acknowledgments

  • Built with Rust and the amazing Rust ecosystem
  • Encryption provided by ring cryptographic library
  • Special thanks to the Rust community for excellent documentation and support

πŸ“ž Support


⬆ Back to Top

Made with ❀️ by Yaman.

About

SPL - A new way of sending files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages