i2pd-launch 0.4.0-beta.5

Launches i2pd with clean state
# i2pd-launch

[![Version](https://img.shields.io/crates/v/i2pd-launch.svg)](https://crates.io/crates/i2pd-launch)
[![No License](https://img.shields.io/crates/l/i2pd-launch)](https://unlicense.org)
[![MSRV 1.61](https://img.shields.io/crates/msrv/i2pd-launch?logo=rust&label=MSRV&labelColor=orange)](https://blog.rust-lang.org/2022/05/19/Rust-1.61.0.html)
[![Safe Rust](https://img.shields.io/badge/Rust-safe-brightgreen.svg)](https://doc.rust-lang.org/nomicon/meet-safe-and-unsafe.html)
[![dependency status](https://deps.rs/repo/gitlab/hsn10/i2pd-launch/status.svg)](https://deps.rs/repo/gitlab/hsn10/i2pd-launch)
[![Downloads](https://img.shields.io/crates/d/i2pd-launch)](https://crates.io/crates/i2pd-launch/versions)
[![](https://tokei.rs/b1/gitlab/hsn10/i2pd-launch?category=code)](https://github.com/XAMPPRocky/tokei)

## About
*i2pd-launch* overwrites with zeros, sync changes to disk
and then deletes current [i2pd router](https://i2pd.website)
state files containing sensitive informations: routerid,
proxy local destinations, interfaces id, default log file.
After that *i2pd* is started with clean, pristine state.

Using command line switch *-z* is possible to wipe sensitive
information after you stop *i2pd*. This ensures that if your
computer fall into enemy hands it can't be linked to your
*previous* i2p router identity.

Cleaning i2p state before launch is *especially critical*
if you travel and change locations.

## Platforms
*i2pd-launch* works *only* on [Scoop](https://scoop.sh) based *i2pd* installations.
Installation can be global or user.

### Retry strategy
If state file to be overwritten and deleted exists but can not be overwritten and deleted,
operation will be retried several times.
This happens due to antivirus or search indexer interference.

*i2pd-launch* will continue and start *i2pd* even if some state files could not be overwritten and deleted.
This ensures that after executing *i2pd-launch* i2p network will be always running.

## Requirements
1. Install [Scoop]https://scoop.sh - A command-line installer for Windows.
2. scoop install i2pd
3. scoop install rustup
4. rustup-init.exe
5. cargo install i2pd-launch

## Command line arguments
1. -h | -? show help
2. -v print program version
3. -z only wipe state files, do not launch i2pd

## Return codes
- 0 Success
- 1 No scoop i2pd installation detected
- 2 i2pd executable not found
- 3 This program supported only on Windows
- 4 Not all state files were succesfully wiped and deleted
- 5 i2pd launch failed

## License

This is free and unencumbered software released into the public domain.

This code can be used under terms of [CC0](https://creativecommons.org/publicdomain/zero/1.0/) or
the [Unlicense](https://unlicense.org).

![Unlicense logo](https://unlicense.org/pd-icon.png)