Skip to content

wuyuxifeng/dht-server-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
];

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%