Fixed docs, version number and made server required
This commit is contained in:
		
							parent
							
								
									83b10eb3d5
								
							
						
					
					
						commit
						15238aade7
					
				| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
[package]
 | 
			
		||||
name = "e2e-irc"
 | 
			
		||||
version = "0.1.0"
 | 
			
		||||
version = "1.0.2"
 | 
			
		||||
edition = "2021"
 | 
			
		||||
 | 
			
		||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										42
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								README.md
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -1,25 +1,35 @@
 | 
			
		|||
# e2e-irc
 | 
			
		||||
This is an IRC bouncer that supports end-to-end encryption and is horribly written.
 | 
			
		||||
 | 
			
		||||
# Setup CWD
 | 
			
		||||
To use this you need to build it and in your CWD you need to add two files. One called `secret.gpg` and one called `public.gpg` that are just pgp keys.
 | 
			
		||||
You also need a .env file in your CWD like this:
 | 
			
		||||
# Configuration
 | 
			
		||||
e2e-irc uses a config file in `~/.config/e2e-irc/config.toml` on linux.
 | 
			
		||||
The configuration file is a toml file with two or three fields:
 | 
			
		||||
- public_key      the location of the public pgp key
 | 
			
		||||
- secret_key      the location of the secret pgp key
 | 
			
		||||
- passwd          the password of the pgp key
 | 
			
		||||
 | 
			
		||||
# Usage
 | 
			
		||||
```
 | 
			
		||||
e2e-irc [OPTIONS] SERVER
 | 
			
		||||
 | 
			
		||||
Encrypted IRC Bouncer
 | 
			
		||||
 | 
			
		||||
Positional arguments:
 | 
			
		||||
  server                The Address Of The Server The Bouncer Connects To
 | 
			
		||||
 | 
			
		||||
Optional arguments:
 | 
			
		||||
  -h,--help             Show this help message and exit
 | 
			
		||||
  -p,--port PORT        The Port The Bouncer Binds To
 | 
			
		||||
  --sp,--server-port SERVER_PORT
 | 
			
		||||
                        The TLS Enabled Port Of The Server
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
# Install
 | 
			
		||||
```bash
 | 
			
		||||
SERVER={address of the server you want to connect to (has to support tls)}
 | 
			
		||||
PORT={the port you want the program to bind to and the port that the IRC client should connect to}
 | 
			
		||||
PASSWD={password of your pgp key} # Optional
 | 
			
		||||
cargo install --git https://forgejo.vanten-s.com/vanten-s/e2e-irc.git
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
# Run
 | 
			
		||||
Then you just run the binary with:
 | 
			
		||||
`cargo run --release`
 | 
			
		||||
or build the project to get a binary
 | 
			
		||||
```bash
 | 
			
		||||
cargo build --release
 | 
			
		||||
cp target/release/e2e-irc ~/.local/bin/
 | 
			
		||||
e2e-irc [OPTIONS] SERVER
 | 
			
		||||
```
 | 
			
		||||
and after running that once you can run the program with
 | 
			
		||||
```bash
 | 
			
		||||
e2e-irc
 | 
			
		||||
```
 | 
			
		||||
but you have to have the .env in the CWD
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,11 +54,9 @@ fn main() -> Result<()> {
 | 
			
		|||
    {
 | 
			
		||||
        let mut ap = ArgumentParser::new();
 | 
			
		||||
        ap.set_description("Encrypted IRC Bouncer");
 | 
			
		||||
        ap.refer(&mut server).add_option(
 | 
			
		||||
            &["-s", "--server"],
 | 
			
		||||
            Store,
 | 
			
		||||
            "The Server The Bouncer Connects To",
 | 
			
		||||
        );
 | 
			
		||||
        ap.refer(&mut server)
 | 
			
		||||
            .add_argument("server", Store, "The Address Of The Server The Bouncer Connects To")
 | 
			
		||||
            .required();
 | 
			
		||||
        ap.refer(&mut port)
 | 
			
		||||
            .add_option(&["-p", "--port"], Store, "The Port The Bouncer Binds To");
 | 
			
		||||
        ap.refer(&mut server_port).add_option(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue