mirror of
https://github.com/seriyps/mtproto_proxy.git
synced 2026-09-21 20:24:41 +00:00
46 lines
1.2 KiB
Erlang
46 lines
1.2 KiB
Erlang
%% -*- mode: erlang -*-
|
|
[
|
|
{mtproto_proxy,
|
|
%% see src/mtproto_proxy.app.src for examples.
|
|
[
|
|
%% PUT YOUR CUSTOM SETTINGS BELOW vvvvv
|
|
{allowed_protocols, [mtp_fake_tls]}, %%-----yhb Only allow fake-TLS connections with ee/base64-secrets
|
|
{ports,
|
|
[#{name => mtp_handler_1,
|
|
listen_ip => "0.0.0.0",
|
|
port => 1443,
|
|
secret => <<"44e38d07b3860dbc0bd31370ac0b3df2">>,
|
|
tag => <<"2babdb5675cb08376c23013d68c3159d">>}
|
|
]}
|
|
%% ^^^^^ 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}]}
|
|
].
|