|
1 | 1 | # GOPHER-PROJECT
|
| 2 | +This is a Gopher server written purely in C. It was presented as a project for the System Programming course under the supervision of professor Massimo Bernaschi. |
| 3 | +As required for the exam, in addition to the implementation of the Gopher server, it is necessary to develop a process for writing Logs, using the 'Select' and other features to increase the total complexity of the project. |
| 4 | +The software is compatible with both Windows 10 and Linux. |
| 5 | +# Getting Started |
2 | 6 |
|
3 |
| -# would |
| 7 | +## How to install |
| 8 | +Compile with CMakeLists.txt, this software is compatible with Linux and Windows 10. |
| 9 | +Execute the following command in the cmake-build-debug folder. |
| 10 | +```sh |
| 11 | +$ cmake |
| 12 | +$ make |
| 13 | +$ ./gopherLinux |
| 14 | +``` |
| 15 | +The structure of this project is 100% compatible with Clion and other JetBrains products. |
| 16 | +## CommandLine Option |
| 17 | +For each option having {param}, replace param with an appropriate argument.<br> |
| 18 | +* **-d "{param}"** (as Directory) followed with the path to use as root for sending files. Use of the spaces in the path are allowed. |
| 19 | +* **-m {param}** (as Mode_Concurrency) followed with the string 'Thread' or 'Process' for the selection of the parallel mode for sending requests. |
| 20 | +* **-p {param}** (as Port) replace param with the integer for specify the port to use |
| 21 | +* **-i {param}** replace param with a string for specify the hostname. |
| 22 | +* **-e** to enable daemon mode. |
| 23 | +* **-s** (as Security) to enable protection for the DOS attack. |
4 | 24 |
|
5 |
| -- Aggiungere che non ci sia nessun parametro settato come NULL nella struttura di configurazione |
| 25 | +## Configuration File |
| 26 | +All params are required. |
| 27 | +<br> Examples of Configuration File: |
| 28 | +``` |
| 29 | +port 7080 |
| 30 | +root_dir "./rootDirectory/" |
| 31 | +mode_concurrency Thread |
| 32 | +external_ip cloud.myservergopher.com |
| 33 | +``` |
| 34 | +``` |
| 35 | +port 7000 |
| 36 | +root_dir "~/gopher_root/" |
| 37 | +mode_concurrency Process |
| 38 | +external_ip gopher.theprotocol.it |
| 39 | +``` |
| 40 | +# Tests |
| 41 | +The Gopher server supports more than 50.000 requests simultaneously. Has limited use of memory, tests with Valgrind report zero errors or warnings. <br> |
| 42 | +You can find the stress script in the root of the project, It's a file bash called stressCurl.sh |
| 43 | +## Operating System tested |
| 44 | +##### Windows 10 |
| 45 | +##### Linux: |
| 46 | +* **Arch Linux** |
| 47 | +* **Manjaro** |
| 48 | +* **Debian 9.x** |
| 49 | + |
| 50 | +# Known Issues |
| 51 | +Lost the compatibility with macOS due to an unresolved Apple bug. 90% of the software is compatible with macOS X Mojave. <br> |
| 52 | +Lost the compatibility with Ubuntu, it's easy to fix. <br> |
| 53 | + |
| 54 | +# Authors |
| 55 | + |
| 56 | +* **Andrea Bacciu** - [github](https://github.com/andreabac3) |
| 57 | +* **Valerio Neri** - [github](https://github.com/ValerioNeriGit) |
0 commit comments