2019-01-07 13:24:29 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
return [
|
|
|
|
'swoole' => [
|
|
|
|
'server' => [
|
2019-03-19 00:36:20 +01:00
|
|
|
'address' => (string)getenv('SWOOLE_SERVER_ADDRESS'),
|
|
|
|
'port' => (string)getenv('SWOOLE_SERVER_PORT'),
|
2019-01-07 13:24:29 +01:00
|
|
|
],
|
2019-03-19 00:36:20 +01:00
|
|
|
'options' => [
|
|
|
|
'worker_num' => (int)getenv('SWOOLE_WORKER_NUM'),
|
|
|
|
'http_compression' => (bool)getenv('SWOOLE_HTTP_COMPRESSION'),
|
2019-01-07 13:24:29 +01:00
|
|
|
]
|
|
|
|
],
|
|
|
|
'telegram' => [
|
|
|
|
'app_info' => [ // obtained in https://my.telegram.org
|
2019-03-19 00:36:20 +01:00
|
|
|
'api_id' => getenv('TELEGRAM_API_ID'),
|
|
|
|
'api_hash' => getenv('TELEGRAM_API_HASH'),
|
2019-01-07 13:24:29 +01:00
|
|
|
],
|
|
|
|
'logger' => [ // Logger settings
|
2019-03-19 00:36:20 +01:00
|
|
|
'logger' => 3, // 0 - Logs disabled, 3 - echo logs.
|
|
|
|
'logger_level' => 2, // Logging level, available logging levels are: ULTRA_VERBOSE - 0, VERBOSE - 1 , NOTICE - 2, WARNING - 3, ERROR - 4, FATAL_ERROR - 5.
|
2019-01-07 13:24:29 +01:00
|
|
|
],
|
|
|
|
'updates' => [
|
2019-03-19 00:36:20 +01:00
|
|
|
'handle_updates' => false, // Should I handle updates?
|
|
|
|
'handle_old_updates' => false, // Should I handle old updates on startup?
|
2019-01-07 13:24:29 +01:00
|
|
|
],
|
|
|
|
'connection_settings' => [
|
|
|
|
'all' => [
|
2019-03-19 00:36:20 +01:00
|
|
|
'proxy' => '\SocksProxy',
|
|
|
|
'proxy_extra' => [
|
|
|
|
'address' => getenv('TELEGRAM_PROXY_ADDRESS'),
|
|
|
|
'port' => getenv('TELEGRAM_PROXY_PORT'),
|
|
|
|
'username' => getenv('TELEGRAM_PROXY_USERNAME'),
|
|
|
|
'password' => getenv('TELEGRAM_PROXY_PASSWORD'),
|
2019-01-07 13:24:29 +01:00
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'curl' => [
|
|
|
|
'proxy' => [
|
2019-03-19 00:36:20 +01:00
|
|
|
'address' => getenv('CURL_PROXY_ADDRESS'),
|
|
|
|
'port' => getenv('CURL_PROXY_PORT'),
|
|
|
|
'username' => getenv('CURL_PROXY_USERNAME'),
|
|
|
|
'password' => getenv('CURL_PROXY_PASSWORD'),
|
2019-01-07 13:24:29 +01:00
|
|
|
]
|
2019-01-20 18:20:41 +01:00
|
|
|
],
|
|
|
|
'api' => [
|
2019-03-19 00:36:20 +01:00
|
|
|
'ip_whitelist' => json_decode(getenv('API_CLIENT_WHITELIST'), true),
|
2019-02-01 15:28:50 +01:00
|
|
|
'index_message' => getenv('API_INDEX_MESSAGE'),
|
2019-01-20 18:20:41 +01:00
|
|
|
],
|
2019-01-07 13:24:29 +01:00
|
|
|
];
|