Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 772 Bytes

README.md

File metadata and controls

32 lines (26 loc) · 772 Bytes

DHT service for FlylinkDC++.

DB scheme:

CREATE TABLE `dht_info` (
    `cid` CHAR(39) NOT NULL,
    `ip` VARCHAR(15) NOT NULL,
    `port` SMALLINT(5) UNSIGNED NOT NULL,
    `conn_count` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
    `user_agent` VARCHAR(256) NULL DEFAULT NULL,
    `live` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `last_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`cid`)
) ENGINE=InnoDB;

ALTER TABLE dht_info ADD INDEX i_dht_info_live (live) 

Create file config.php somewhere outside the doc_root:

<?php

return [
    'DSN'      => 'mysql:host=127.0.0.1;dbname=dht_test',
    'username' => 'root',
    'password' => '111',
    'table'    => 'dht_info'
];