/ README.md
README.md
  1  # Rust Gopher Server
  2  A lightweight, secure and thread-safe Gopher server implementation written in Rust.
  3  
  4  ## What is Gopher?
  5  
  6  Gopher is a distributed document delivery protocol that predates the World Wide Web. Designed in 1991 at the University of Minnesota, Gopher presents information as a hierarchically structured list of files on Internet servers. Unlike the web's hypertext approach, Gopher offers a menu-driven interface that allows users to drill down through nested menus to find content.
  7  Gopher's simplicity makes it incredibly lightweight and fast, even on low-bandwidth connections. While the modern web has largely superseded it, Gopher has seen a resurgence in recent years among enthusiasts who appreciate its minimalist, text-focused approach to information sharing.
  8  
  9  The tool is designed with simplicity and security in mind, offering the following features:
 10  - **Pure Rust Implementation**: Built with memory safety and performance in mind.
 11  - **Thread-safe**: Handles multiple concurrent connections efficiently.
 12  - **Secure by Design**: Path sanitization prevents directory traversal attacks.
 13  - **Content Type Detection**: Automatically identifies and serves different file types.
 14  - **Easy to Configure**: Just point it to a directory and start serving.
 15  - **Zero Dependencies**: Just the Rust standard library, no external crates required.
 16  - **Sample Content**: Comes with built-in sample files to get you started.
 17  
 18  ![GUI and QR code Image](images/gopherlady.jpg)
 19  
 20  ---
 21  ## Prerequisites
 22  Rust and Cargo (install via rustup)
 23  
 24  
 25  ## Getting Started
 26  
 27  - **Clone the repository using radicle.xyz**: 
 28  ```bash
 29     rad clone rad:z3jr8bsc6nF9fH5BBxCtPV7Xy7Rhm
 30     
 31     ```
 32  or
 33  
 34  - **Clone the repository via Git**: 
 35  ```bash
 36     git clone https://ash.radicle.garden/z3jr8bsc6nF9fH5BBxCtPV7Xy7Rhm.git Rust_Gopher_Server
 37     ```
 38  
 39  
 40  - **Build the project**: 
 41  ```bash
 42  cargo build --release   
 43     ```
 44  
 45  - **Run the server**: 
 46  ```bash
 47  cargo run --release   
 48     ```
 49  
 50  The server will create a gopher_content directory and populate it with sample files. It will then start listening on port 7070.
 51  
 52  ---
 53  
 54  ## Customizing Your Gopherspace
 55  To add your own content to the server:
 56  
 57  1. Place your files in the gopher_content directory
 58  2. Organize content in subdirectories as needed
 59  3. Restart the server or just keep it running - new files will be detected automatically
 60  
 61  ---
 62  
 63  ## Supported File Types
 64  - Text files (.txt, .md)
 65  - HTML documents (.html, .htm)
 66  - Images (.gif, .jpg, .jpeg, .png, .bmp, .webp)
 67  - Binary files (all other extensions)
 68  
 69  ---
 70  ## Why Use This Implementation?
 71  
 72  - **Robust Security**: Path sanitization protects against common exploits.
 73  - **Performance**: Async I/O and thread pooling for efficient handling of requests.
 74  - **Pure Rust**: Memory safety guarantees and modern programming practices.
 75  - **Simplicity**: Easy to understand, modify, and extend.
 76  - **Educational**: Great example of network programming in Rust.
 77  
 78  ---
 79  
 80  ## Contact
 81  
 82  For encrypted email correspondence, please refer to the file public-key.asc.
 83  
 84  ## Official Website
 85  
 86  https://enkryp.duckdns.org
 87  
 88  ## e-mail
 89  
 90  battosai@dnmx.su
 91  
 92  ## LXMF Address 
 93  
 94  1b634f9ac2aee34bec3276ad17f52d11
 95  
 96  An LXMF address is a unique identifier used for secure communication over the LXMF protocol, enabling users to send and receive encrypted messages. I suggest using the Sideband app or Nomad Network for this purpose.
 97  
 98  ## Briar
 99  
100  To connect via Briar, please first add me using the link provided, and then send your Briar link to my email. I will promptly add you to my trusted contacts.
101  
102  briar://ac4jkk7rqcb7vbvjudzvoav64lcypoo3qaj3b5wnndcvvsdpz3fvs
103  
104  
105  
106