Files
fruworg.github.io/content/posts/i2p-website.md
2025-06-25 14:27:46 +02:00

72 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Поднятие сайта в i2p
description: Caddy
date: 2025-06-25T14:10:00+02:00
tags: [linux, i2p, caddy]
---
## Установка i2pd
```shell
apt -y install -y apt-transport-https
wget -qO - https://repo.i2pd.xyz/.help/add_repo | bash -s -
apt update
apt -y install i2pd
```
## Конфигурация i2pd
В `/etc/i2pd/tunnels.conf.d/website.conf` добавьте следующее:
```python
[website]
type = http
host = 127.0.0.1
port = 80
keys = website.dat
```
И перезагрузите i2pd:
```shell
systemctl restart i2pd
```
## Регистрация адреса
В `reg.i2p` проверьте незанятость желаемого `fqdn`.\
Если `fqdn` занят, но не используется, то его тоже можно занять.
Для регистрации необходимо сгенерировать подпись:
```shell
git clone --recursive https://github.com/purplei2p/i2pd-tools
cd i2pd-tools
./dependencies.sh
make
```
```bash
./regaddr /var/lib/i2pd/website.dat <domain>.i2p
```
Полученный вывод впишите в страницу желаемого домена на `reg.i2p`.
## Конфигурация Caddy
Ваш полный `b32` домен вы можете посмотреть командой:
```shell
/var/lib/i2pd/destinations
```
В `Caddyfile` добавьте следующее:
```python
http://<domain>.i2p {
respond "i2p"
}
http://<b32-domain-before-dots>.b32.i2p {
redir http://<domain>.i2p{uri}
}
```