diff --git a/das/config.php.dist b/das/config.php.dist index 976462f..8c09e61 100644 --- a/das/config.php.dist +++ b/das/config.php.dist @@ -7,6 +7,8 @@ return [ 'db_database' => 'registry', 'db_username' => 'your_username', 'db_password' => 'your_password', + 'das_ipv4' => '0.0.0.0', + 'das_ipv6' => '::', // Set to false if no IPv6 support 'rately' => false, 'limit' => 1000, 'period' => 60, diff --git a/das/start_das.php b/das/start_das.php index 477ce38..df08a1b 100644 --- a/das/start_das.php +++ b/das/start_das.php @@ -25,7 +25,10 @@ $pool = new Swoole\Database\PDOPool( ); // Create a Swoole TCP server -$server = new Server('0.0.0.0', 1043); +$server = new Server($c['das_ipv4'], 1043); +if ($c['das_ipv6'] !== false) { + $server->addListener($c['das_ipv6'], 1043, SWOOLE_SOCK_TCP6); +} $server->set([ 'daemonize' => false, 'log_file' => '/var/log/namingo/das_application.log', diff --git a/epp/config.php.dist b/epp/config.php.dist index 2b4a50c..533c4b6 100644 --- a/epp/config.php.dist +++ b/epp/config.php.dist @@ -8,6 +8,7 @@ return [ 'db_username' => 'your_username', 'db_password' => 'your_password', 'epp_host' => '0.0.0.0', + 'epp_host_ipv6' => '::', // Set to false if no IPv6 support 'epp_port' => 700, 'epp_pid' => '/var/run/epp.pid', 'epp_greeting' => 'Namingo EPP Server 1.0', diff --git a/epp/start_epp.php b/epp/start_epp.php index 5a8dc6b..dfaec32 100644 --- a/epp/start_epp.php +++ b/epp/start_epp.php @@ -45,6 +45,9 @@ $pool = new Swoole\Database\PDOPool( Swoole\Runtime::enableCoroutine(); $server = new Server($c['epp_host'], $c['epp_port']); +if ($c['epp_host_ipv6'] !== false) { + $server->addListener($c['epp_host_ipv6'], $c['epp_port'], SWOOLE_SOCK_TCP6); +} $server->set([ 'enable_coroutine' => true, 'log_file' => '/var/log/namingo/epp_application.log', diff --git a/whois/port43/config.php.dist b/whois/port43/config.php.dist index cf0d3cd..c6fe73a 100644 --- a/whois/port43/config.php.dist +++ b/whois/port43/config.php.dist @@ -7,6 +7,8 @@ return [ 'db_database' => 'registry', 'db_username' => 'your_username', 'db_password' => 'your_password', + 'whois_ipv4' => '0.0.0.0', + 'whois_ipv6' => '::', // Set to false if no IPv6 support 'privacy' => false, 'minimum_data' => false, 'roid' => 'XX', diff --git a/whois/port43/start_whois.php b/whois/port43/start_whois.php index 922e9f5..075a09b 100644 --- a/whois/port43/start_whois.php +++ b/whois/port43/start_whois.php @@ -25,7 +25,10 @@ $pool = new Swoole\Database\PDOPool( ); // Create a Swoole TCP server -$server = new Server('0.0.0.0', 43); +$server = new Server($c['whois_ipv4'], 43); +if ($c['whois_ipv6'] !== false) { + $server->addListener($c['whois_ipv6'], 43, SWOOLE_SOCK_TCP6); +} $server->set([ 'daemonize' => false, 'log_file' => '/var/log/namingo/whois_application.log',