nostriphant / relay
'Nostriphant Relay'
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/nostriphant/relay
Requires
- php: ^8.4
- ext-pcntl: *
- amphp/byte-stream: ^2.1
- amphp/http-server: ^3.3
- amphp/http-server-router: ^2.0
- amphp/http-server-static-content: ^2.0
- amphp/log: ^2.0
- amphp/websocket-server: ^4.0
- nostriphant/client: ^0.3
- nostriphant/functional: ^2.2
- nostriphant/nip-01: ^2.0
- nostriphant/nip-17: ^2.0
- nostriphant/nip-19: ^2.0
- nostriphant/nip-44: ^2.0
- nostriphant/nip-59: ^2.0
- nostriphant/stores: ^2.0
- psr/log: ^3.0
Requires (Dev)
- ext-curl: *
- mockery/mockery: ^1.6
- monolog/monolog: ^3.7
- pestphp/pest: ^4.0
README
PHP relay, part of Transpher
<?php $log = new \Monolog\Logger($identifier); $log->pushHandler(new \Monolog\Handler\StreamHandler(__DIR__ . '/logs/' . $identifier . '.log', \Monolog\Level::Info)); $log->pushHandler(new \Monolog\Handler\StreamHandler(STDOUT, \Monolog\Level::Info)); Monolog\ErrorHandler::register($log); $engine = new \nostriphant\Stores\Engine\SQLite(new SQLite3(__DIR__ . '/data/transpher.sqlite')); $store = new \nostriphant\Stores\Store($engine); $relay = new \nostriphant\Relay($store, __DIR__ . '/data/files'); list($ip, $port) = explode(":", $_SERVER['argv'][1], 2); $max_connections_per_ip = 1000; $relay("127.0.0.1", "80", $connections, $log);