1
0
mirror of https://github.com/PurpleI2P/regi2p.git synced 2025-01-14 21:19:56 +00:00
r4sas 87a5ea1acc
update homepage info
Signed-off-by: r4sas <r4sas@i2pmail.org>
2021-02-27 16:02:59 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00
2021-02-27 16:02:59 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00
2021-02-23 14:38:32 +00:00
2021-02-23 14:38:32 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00
2021-02-21 17:02:38 +00:00

Registry - reg.i2p

This is reg.i2p domain registry code

Requirements

  • i2pd with enabled BOB protocol
  • verifyhost binary built inside i2pd-tools project folder
  • PHP and php-fpm 7.2+
  • Composer
  • Corntab (for jobs)

Installation

  1. Clone repository in your webserver working directory. Note: that must not be /var/www/html or something like this, your webserver must point to public directory of forked project.
  2. Fetch requirements by runnning composer update.
  3. Point your webserver to serving webpages from public directory.
  4. Create cron jobs for quering and updating hosts lists.

nginx configuration

server {
    listen       127.0.0.1:8000;

    access_log   /dev/null;
    error_log    /dev/null;

    root         /home/www/reg.i2p/public;
    index        index.php index.html;
    port_in_redirect off;

    location ~* ^/hosts\.txt$ {
        if ($http_if_none_match) {
            rewrite ^/hosts\.txt$ /export/hosts.txt break;
        }

        rewrite ^/hosts\.txt$ /export/hosts-basic.txt break;
    }

    location / {
        try_files $uri $uri/ /index.php$request_uri;
    }

    location ~ ^/index\.php(/|$) {
        include       fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SERVER_PORT     80;
        fastcgi_pass  unix:/home/www/reg.i2p/tmp/php-fpm.sock;
    }
}

php-fpm configuration

[reg.i2p]

prefix = /home/www/$pool
user = www-data
group = www-data
listen = tmp/php-fpm.sock

listen.owner = www-data
listen.group = www-data
listen.mode = 0660

pm = dynamic
pm.max_children = 5
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 2
pm.max_requests = 500

chdir = public

php_admin_flag[log_errors] = On
php_admin_flag[display_errors] = Off
php_admin_value[error_reporting] = E_ALL
php_admin_value[error_log] = /home/www/$pool/logs/php-error.log

php_admin_value[upload_tmp_dir] = /home/www/$pool/tmp
php_admin_value[date.timezone] = Etc/UTC

php_admin_value[session.save_path] = /home/www/$pool/sessions
php_admin_value[session.save_handler] = files
php_admin_value[session.gc_probability] = 2
php_admin_value[session.gc_maxlifetime] = 1440

php_admin_value[memory_limit] = 32M
php_admin_value[upload_max_filesize] = "2M"
php_admin_value[max_execution_time] = 60

Cron jobs

5 * * * *    php7.2 /home/www/reg.i2p/checker.php > /home/www/reg.i2p/logs/checker.log 2>&1
45 */6 * * * php7.2 /home/www/reg.i2p/export.php  > /home/www/reg.i2p/logs/export.log  2>&1
50 23 * * *  php7.2 /home/www/reg.i2p/fetch.php   > /home/www/reg.i2p/logs/fetch.log   2>&1
Description
Domain registry project
http://reg.i2p/
Readme MIT 8.5 MiB
Languages
PHP 47.6%
Twig 41.7%
CSS 8.5%
C++ 2.2%