From 2d799aa0133afca434ba5bae866f5c5db1b6787a Mon Sep 17 00:00:00 2001 From: polistern Date: Mon, 3 Oct 2022 19:40:50 +0000 Subject: [PATCH] chore: Codeblocks formatted. Updated build info. --- docs/docs/about/contributing.md | 2 +- docs/docs/about/contributing.ru.md | 2 +- docs/docs/about/donations.md | 2 -- docs/docs/about/donations.ru.md | 2 -- docs/docs/index.md | 7 ++-- docs/docs/index.ru.md | 7 ++-- docs/docs/tutorials/POP3.md | 2 +- docs/docs/tutorials/POP3.ru.md | 2 +- docs/docs/tutorials/SMTP.md | 2 +- docs/docs/tutorials/SMTP.ru.md | 2 +- docs/docs/tutorials/bootstrap.md | 2 +- docs/docs/tutorials/bootstrap.ru.md | 2 +- docs/docs/user-guide/configuration.md | 2 +- docs/docs/user-guide/configuration.ru.md | 2 +- docs/docs/user-guide/install.md | 42 ++++++++++++++---------- docs/docs/user-guide/install.ru.md | 40 +++++++++++++--------- docs/docs/user-guide/run.md | 12 +++---- docs/docs/user-guide/run.ru.md | 12 +++---- docs/mkdocs.yml | 4 +-- 19 files changed, 83 insertions(+), 65 deletions(-) diff --git a/docs/docs/about/contributing.md b/docs/docs/about/contributing.md index 1cac9ca..94266e0 100644 --- a/docs/docs/about/contributing.md +++ b/docs/docs/about/contributing.md @@ -12,7 +12,7 @@ Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: -``` +```bash $ git commit -m "A brief summary of the commit > > A paragraph describing what changed and its impact." diff --git a/docs/docs/about/contributing.ru.md b/docs/docs/about/contributing.ru.md index 92009ef..c32d68c 100644 --- a/docs/docs/about/contributing.ru.md +++ b/docs/docs/about/contributing.ru.md @@ -12,7 +12,7 @@ Однострочные сообщения подходят для малых изменний, но большие должны форматироваться следующим образом: -``` +```bash $ git commit -m "A brief summary of the commit > > A paragraph describing what changed and its impact." diff --git a/docs/docs/about/donations.md b/docs/docs/about/donations.md index fcfc5d4..1d5149d 100644 --- a/docs/docs/about/donations.md +++ b/docs/docs/about/donations.md @@ -1,5 +1,3 @@ # Donations -- **BTC**: `bc1qans7ukm5t62mjcuhl3rpzxml05etyljhjt7w76` -- **GST**: `GatPEoV4uK2z1mgbph577Tv1WavrL5vmSE` - **XMR**: `85P3aEXrYMn1YxnQaZSBWy6Ur6j9PVRxmCd3Ey1UanKAdKnhd2iYNdrEhNJ2JeUdcC8otSHogRTnydn4aMh8DwbSMs4N13Z` diff --git a/docs/docs/about/donations.ru.md b/docs/docs/about/donations.ru.md index 539a2e1..8c52c4e 100644 --- a/docs/docs/about/donations.ru.md +++ b/docs/docs/about/donations.ru.md @@ -1,5 +1,3 @@ # Пожертвования -- **BTC**: `bc1qans7ukm5t62mjcuhl3rpzxml05etyljhjt7w76` -- **GST**: `GatPEoV4uK2z1mgbph577Tv1WavrL5vmSE` - **XMR**: `85P3aEXrYMn1YxnQaZSBWy6Ur6j9PVRxmCd3Ey1UanKAdKnhd2iYNdrEhNJ2JeUdcC8otSHogRTnydn4aMh8DwbSMs4N13Z` diff --git a/docs/docs/index.md b/docs/docs/index.md index d9ffc43..e497dd9 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -1,6 +1,9 @@ # pboted -pboted (Plus Bote Daemon) - is a standalone C++ implementation of I2P-Bote protocol. +* [clearnet](https://pboted.readthedocs.io/en/latest/) +* [I2P](http://polistern.i2p/pbote/) + +**pboted** (_Plus Bote Daemon_) - is a standalone C++ implementation of `I2P-Bote` protocol. I2P-Bote is a server-less encrypted [DHT Kademlia](https://en.wikipedia.org/wiki/Distributed_hash_table)-based email protocol. You can find more details it [Bote](bote/v5/version5.md) section. @@ -27,7 +30,7 @@ Transition to **beta** planned in version **0.9.X** ## Planned Features -- Custom per identity/user email folders +- Custom per identity/user email folders (WIP) - Sending email anonymously - Sending and receiving via relays (similar to Mixmaster) - Interfaces for interaction with third-party applications (IMAP, etc.) diff --git a/docs/docs/index.ru.md b/docs/docs/index.ru.md index 214db5a..eb707f0 100644 --- a/docs/docs/index.ru.md +++ b/docs/docs/index.ru.md @@ -1,6 +1,9 @@ # pboted -pboted (Plus Bote Daemon) - это реализация самостоятельного клиента для протокола I2P-Bote на языке програмирования C++. +* [clearnet](https://pboted.readthedocs.io/en/latest/) +* [I2P](http://polistern.i2p/pbote/) + +**pboted** (_Plus Bote Daemon_) - это реализация самостоятельного клиента для протокола `I2P-Bote` на языке програмирования C++. I2P-Bote - это бессерверный, основанный на [распределённой хеш-таблице Kademlia](https://ru.wikipedia.org/wiki/%D0%A0%D0%B0%D1%81%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D1%91%D0%BD%D0%BD%D0%B0%D1%8F_%D1%85%D0%B5%D1%88-%D1%82%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D0%B0), протокол обмена зашифрованными сообщениями электронной почты. Вы можете найти больше деталей о протоколе в секции [Bote](bote/v5/version5.md). @@ -27,7 +30,7 @@ I2P-Bote - это бессерверный, основанный на [расп ## Планируемый функционал -- Настраиваемые почтовые директории по идентичностям/пользователям +- Настраиваемые почтовые директории по идентичностям/пользователям (WIP) - Анонимная отправка писем - Отправка и получение писем через реле (подобно Mixmaster) - Интерфейсы для взаимодействия со сторонними приложениямы (IMAP, etc.) diff --git a/docs/docs/tutorials/POP3.md b/docs/docs/tutorials/POP3.md index 3b5c005..9658659 100644 --- a/docs/docs/tutorials/POP3.md +++ b/docs/docs/tutorials/POP3.md @@ -6,7 +6,7 @@ To be able to receive email through POP3 you need to: - Fill `[pop3]` section in [configuration file](../user-guide/configuration.md#pop3): -``` +```ini [pop3] enabled = true address = 127.0.0.1 diff --git a/docs/docs/tutorials/POP3.ru.md b/docs/docs/tutorials/POP3.ru.md index 611f083..e8fb6ef 100644 --- a/docs/docs/tutorials/POP3.ru.md +++ b/docs/docs/tutorials/POP3.ru.md @@ -6,7 +6,7 @@ _Работа проверена с [Mozilla Thunderbird](https://www.thunderbir - Заполнить секцию `[pop3]` в [конфигурационном файле](../user-guide/configuration.md#pop3): -``` +```ini [pop3] enabled = true address = 127.0.0.1 diff --git a/docs/docs/tutorials/SMTP.md b/docs/docs/tutorials/SMTP.md index 73fb6d3..6bd37f9 100644 --- a/docs/docs/tutorials/SMTP.md +++ b/docs/docs/tutorials/SMTP.md @@ -6,7 +6,7 @@ To be able to send email through SMTP you need to: - Fill `[smtp]` section in [configuration file](../user-guide/configuration.md#smtp): -``` +```ini [smtp] enabled = true address = 127.0.0.1 diff --git a/docs/docs/tutorials/SMTP.ru.md b/docs/docs/tutorials/SMTP.ru.md index ee6cc37..c2c3161 100644 --- a/docs/docs/tutorials/SMTP.ru.md +++ b/docs/docs/tutorials/SMTP.ru.md @@ -6,7 +6,7 @@ _Работа проверена с [Mozilla Thunderbird](https://www.thunderbir - Заполнить секцию `[smtp]` в [конфигурационном файле](../user-guide/configuration.md#smtp) -``` +```ini [smtp] enabled = true address = 127.0.0.1 diff --git a/docs/docs/tutorials/bootstrap.md b/docs/docs/tutorials/bootstrap.md index 094202a..3808a51 100644 --- a/docs/docs/tutorials/bootstrap.md +++ b/docs/docs/tutorials/bootstrap.md @@ -28,7 +28,7 @@ To use this option, you need in the configuration file: For example: -``` +```ini [bootstrap] ## Bootstrap operators; ## Each line should be a I2P destination key in Base64 format. Lines beginning with # are ignored. diff --git a/docs/docs/tutorials/bootstrap.ru.md b/docs/docs/tutorials/bootstrap.ru.md index 3b75eb9..062027a 100644 --- a/docs/docs/tutorials/bootstrap.ru.md +++ b/docs/docs/tutorials/bootstrap.ru.md @@ -28,7 +28,7 @@ Например: -``` +```ini [bootstrap] ## Bootstrap operators; ## Each line should be a I2P destination key in Base64 format. Lines beginning with # are ignored. diff --git a/docs/docs/user-guide/configuration.md b/docs/docs/user-guide/configuration.md index 13a11e8..54a086d 100644 --- a/docs/docs/user-guide/configuration.md +++ b/docs/docs/user-guide/configuration.md @@ -46,7 +46,7 @@ Run `pboted --help` to show builtin help message. You can specify this parameter multiple times with different addresses. For example: -``` +```ini [bootstrap] address = address = diff --git a/docs/docs/user-guide/configuration.ru.md b/docs/docs/user-guide/configuration.ru.md index 10ccb90..144b449 100644 --- a/docs/docs/user-guide/configuration.ru.md +++ b/docs/docs/user-guide/configuration.ru.md @@ -46,7 +46,7 @@ Вы можете указать этот параметр многократно для разных адресов. Например: -``` +```ini [bootstrap] address = address = diff --git a/docs/docs/user-guide/install.md b/docs/docs/user-guide/install.md index 9c90ba7..45ab1cf 100644 --- a/docs/docs/user-guide/install.md +++ b/docs/docs/user-guide/install.md @@ -10,12 +10,12 @@ You can install binary packages from the [latest release page](https://github.co For building **pboted** you need several things: -* compiler with c++17 support (for example: gcc >= 5, clang) +* compiler with c++17 support (for example: gcc >= 5, clang >= 5) * cmake >= 3.7 * mimetic >= 0.9.8 -* boost >= 1.62 -* openssl library -* zlib library (openssl already depends on it) +* boost >= 1.62 (filesystem and program_options) +* openssl >= 1.1.1 +* zlib (openssl already depends on it) ## Building on UNIX-like systems @@ -30,15 +30,14 @@ See for common requirements in [this](#requirements) section. - Clone repository: -``` +```bash git clone https://github.com/polistern/pboted.git cd pboted -git submodule update --init ``` - Build: -``` +```bash cd build cmake . # See "CMake Options" section below make # You may add VERBOSE=1 to cmdline for debugging @@ -53,8 +52,20 @@ Available CMake options(each option has a form of `-D=`, for more in Also there is `-L` flag for CMake that could be used to list current cached options: +```bash +cmake -L ``` - cmake -L + +#### Force GCC + +```bash +CC=gcc CXX=g++ cmake . +``` + +#### Force Clang + +```bash +CC=clang CXX=clang++ cmake . ``` ### Debian/Ubuntu: @@ -65,19 +76,16 @@ Also there is `-L` flag for CMake that could be used to list current cached opti You will need a compiler and other tools that could be installed with `build-essential` and `debhelper` packages: -``` +```bash sudo apt install git cmake build-essential debhelper ``` Also you will need a bunch of development libraries: -``` +```bash sudo apt install \ - libboost-date-time-dev \ libboost-filesystem-dev \ libboost-program-options-dev \ - libboost-system-dev \ - libboost-thread-dev \ libmimetic-dev \ libssl-dev \ pkg-config \ @@ -86,8 +94,8 @@ sudo apt install \ You may also build DEB-package with the following: -``` - sudo apt install fakeroot devscripts dh-apparmor - cd pboted - debuild --no-tgz-check -us -uc -b +```bash +sudo apt install fakeroot devscripts dh-apparmor +cd pboted +debuild --no-tgz-check -us -uc -b ``` diff --git a/docs/docs/user-guide/install.ru.md b/docs/docs/user-guide/install.ru.md index 99baf16..d9b53dc 100644 --- a/docs/docs/user-guide/install.ru.md +++ b/docs/docs/user-guide/install.ru.md @@ -10,11 +10,11 @@ Для сборки **pboted** Вам необходимы: -* компилятор с поддержкой страндарта c++17 (например: gcc >= 5, clang) +* компилятор с поддержкой страндарта c++17 (например: gcc >= 5, clang >= 5) * cmake >= 3.7 * mimetic >= 0.9.8 -* boost >= 1.62 -* openssl library +* boost >= 1.62 (filesystem и program_options) +* openssl >= 1.1.1 * zlib (openssl уже имеет её в зависимостях) ## Сборка на UNIX-подобных системах @@ -30,15 +30,14 @@ - Клонируйте репозиторий: -``` +```bash git clone https://github.com/polistern/pboted.git cd pboted -git submodule update --init ``` - Скомпилируйте: -``` +```bash cd build cmake . # Смотри секцию "Опции CMake" ниже make # Для отладки можно добавить VERBOSE=1 @@ -53,8 +52,20 @@ make # Для отладки можно добавить VERB Для CMake доступен флаг `-L` для просмотра текущих опций сборки: +```bash +cmake -L ``` - cmake -L + +#### Принудительно использовать GCC + +```bash +CC=gcc CXX=g++ cmake . +``` + +#### Принудительно использовать Clang + +```bash +CC=clang CXX=clang++ cmake . ``` ### Debian/Ubuntu: @@ -65,19 +76,16 @@ make # Для отладки можно добавить VERB Вам необходимы компилятор и другие утилиты, которые могут быть установлены с пакетами `build-essential` и `debhelper`: -``` +```bash sudo apt install git cmake build-essential debhelper ``` Также вам понадобятся библиотеки разработки: -``` +```bash sudo apt install \ - libboost-date-time-dev \ libboost-filesystem-dev \ libboost-program-options-dev \ - libboost-system-dev \ - libboost-thread-dev \ libmimetic-dev \ libssl-dev \ pkg-config \ @@ -86,8 +94,8 @@ sudo apt install \ Доступна возможность собрать DEB пакет самостоятельно: -``` - sudo apt install fakeroot devscripts dh-apparmor - cd pboted - debuild --no-tgz-check -us -uc -b +```bash +sudo apt install fakeroot devscripts dh-apparmor +cd pboted +debuild --no-tgz-check -us -uc -b ``` diff --git a/docs/docs/user-guide/run.md b/docs/docs/user-guide/run.md index 2d17278..d85fd39 100644 --- a/docs/docs/user-guide/run.md +++ b/docs/docs/user-guide/run.md @@ -11,7 +11,7 @@ - Create `/etc/pboted` directory and copy example config: -``` +```bash sudo mkdir /etc/pboted sudo cp contrib/pboted.conf /etc/pboted/pboted.conf ``` @@ -19,7 +19,7 @@ sudo cp contrib/pboted.conf /etc/pboted/pboted.conf - Edit the config to suit your needs. The file is well documented, comments will help you. - Create user, data and logs directories: -``` +```bash sudo useradd pboted -r -s /usr/sbin/nologin sudo mkdir /var/lib/pboted sudo chown -R pboted: /var/lib/pboted @@ -29,13 +29,13 @@ sudo chown -R pboted: /var/log/pboted - Copy `logrotate` configuration file for logs rotation -``` +```bash sudo cp contrib/pboted.logrotate /etc/logrotate.d/pboted ``` - Copy example `systemd` service file, reload daemons configuration, and start unit: -``` +```bash sudo cp contrib/pboted.service /lib/systemd/system/pboted.service sudo systemctl daemon-reload sudo systemctl start pboted.service @@ -47,7 +47,7 @@ sudo systemctl start pboted.service - Create `~/.pboted` directory and сopy example config from `contrib/pboted.conf` to `~/.pboted/pboted.conf`: -``` +```bash mkdir ~/.pboted cp contrib/pboted.conf ~/.pboted/pboted.conf ``` @@ -55,6 +55,6 @@ cp contrib/pboted.conf ~/.pboted/pboted.conf - Edit the config to suit your needs. The file is well documented, comments will help you. - Now you can run application: -``` +```bash ./pboted ``` diff --git a/docs/docs/user-guide/run.ru.md b/docs/docs/user-guide/run.ru.md index 7145e86..cb009d4 100644 --- a/docs/docs/user-guide/run.ru.md +++ b/docs/docs/user-guide/run.ru.md @@ -11,7 +11,7 @@ - Создайте директорию `/etc/pboted` и скопируйте образец конфигурационного файла: -``` +```bash sudo mkdir /etc/pboted sudo cp contrib/pboted.conf /etc/pboted/pboted.conf ``` @@ -19,7 +19,7 @@ sudo cp contrib/pboted.conf /etc/pboted/pboted.conf - Отредайтируйте конфигурационный файл под Ваши нужды. Образец файла хорошо документирован, комментарии помогут Вам в понимании параметров. - Создайте пользователя, директории для данных и журналов: -``` +```bash sudo useradd pboted -r -s /usr/sbin/nologin sudo mkdir /var/lib/pboted sudo chown -R pboted: /var/lib/pboted @@ -29,13 +29,13 @@ sudo chown -R pboted: /var/log/pboted - Скопируйте образец `logrotate` конфигурации для ротации логов: -``` +```bash sudo cp contrib/pboted.logrotate /etc/logrotate.d/pboted ``` - Скопируйте образец `systemd` Unit-файла, перезагрузите конфигурацию `systemd` сервисов и запустите приложение: -``` +```bash sudo cp contrib/pboted.service /lib/systemd/system/pboted.service sudo systemctl daemon-reload sudo systemctl start pboted.service @@ -47,7 +47,7 @@ sudo systemctl start pboted.service - Создайте директорию `~/.pboted` и скопируйте образец файла конфигурации из `contrib/pboted.conf` в `~/.pboted/pboted.conf`: -``` +```bash mkdir ~/.pboted cp contrib/pboted.conf ~/.pboted/pboted.conf ``` @@ -55,6 +55,6 @@ cp contrib/pboted.conf ~/.pboted/pboted.conf - Отредайтируйте конфигурационный файл под Ваши нужды. Образец файла хорошо документирован, комментарии помогут Вам в понимании параметров. - Запустите приложение: -``` +```bash ./pboted ``` diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 07f0f85..e98d45a 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -3,8 +3,8 @@ site_url: https://pboted.readthedocs.io site_description: pboted documentation site_author: polistern -repo_url: https://github.com/polistern/pboted_docs -repo_name: polistern/pboted_docs +repo_url: https://github.com/PurpleBote/pboted_docs +repo_name: PurpleBote/pboted_docs nav: - Home: index.md