mirror of
https://github.com/seriyps/mtproto_proxy.git
synced 2026-05-13 16:57:10 +00:00
* Add link to telegram group * Simplify private proxy examples * More performace tips * Change order of options in app.src to more logical
46 lines
1.1 KiB
Erlang
46 lines
1.1 KiB
Erlang
%% -*- mode: erlang -*-
|
|
[
|
|
{mtproto_proxy,
|
|
%% see src/mtproto_proxy.app.src for examples.
|
|
[
|
|
%% PUT YOUR CUSTOM SETTINGS BELOW vvvvv
|
|
|
|
%% {ports,
|
|
%% [#{name => mtp_handler_1,
|
|
%% listen_ip => "0.0.0.0",
|
|
%% port => 1443,
|
|
%% secret => <<"d0d6e111bada5511fcce9584deadbeef">>,
|
|
%% tag => <<"dcbe8f1493fa4cd9ab300891c0b5b326">>}
|
|
%% ]}
|
|
%% ^^^^^ END
|
|
]},
|
|
|
|
%% Logging config
|
|
{lager,
|
|
[{log_root, "/var/log/mtproto-proxy"},
|
|
{crash_log, "crash.log"},
|
|
{handlers,
|
|
[
|
|
{lager_console_backend,
|
|
[{level, critical}]},
|
|
|
|
{lager_file_backend,
|
|
[{file, "application.log"},
|
|
{level, info},
|
|
|
|
%% Do fsync only on critical messages
|
|
{sync_on, critical},
|
|
%% If we logged more than X messages in a second, flush the rest
|
|
{high_water_mark, 300},
|
|
%% If we hit hwm and msg queue len is >X, flush the queue
|
|
{flush_queue, true},
|
|
{flush_threshold, 2000},
|
|
%% How often to check if log should be rotated
|
|
{check_interval, 5000},
|
|
%% Rotate when file size is 100MB+
|
|
{size, 104857600}
|
|
]}
|
|
]}]},
|
|
{sasl,
|
|
[{errlog_type, error}]}
|
|
].
|