mirror of
https://github.com/internetee/epp_proxy.git
synced 2025-08-15 12:03:47 +02:00
Add feature switch for enabling pure TCP socket
This commit is contained in:
parent
b5a7430c96
commit
1995b6263b
3 changed files with 10 additions and 3 deletions
|
@ -14,6 +14,7 @@
|
||||||
-export([init/1]).
|
-export([init/1]).
|
||||||
|
|
||||||
-define(SERVER, ?MODULE).
|
-define(SERVER, ?MODULE).
|
||||||
|
-define(DevMode, application:get_env(epp_proxy, dev_mode)).
|
||||||
-define(TCPPort,
|
-define(TCPPort,
|
||||||
case application:get_env(epp_proxy, tcp_port) of
|
case application:get_env(epp_proxy, tcp_port) of
|
||||||
undefined -> undefined;
|
undefined -> undefined;
|
||||||
|
@ -56,7 +57,11 @@ init([]) ->
|
||||||
type => supervisor,
|
type => supervisor,
|
||||||
modules => [epp_pool_supervisor],
|
modules => [epp_pool_supervisor],
|
||||||
start => {epp_pool_supervisor, start_link, []}},
|
start => {epp_pool_supervisor, start_link, []}},
|
||||||
{ok, {SupFlags, [TCPAcceptor, TLSAcceptor, PoolSupervisor]}}.
|
ChildrenSpec = case ?DevMode of
|
||||||
|
{ok, true} -> [TCPAcceptor, TLSAcceptor, PoolSupervisor];
|
||||||
|
_ -> [TLSAcceptor, PoolSupervisor]
|
||||||
|
end,
|
||||||
|
{ok, {SupFlags, ChildrenSpec}}.
|
||||||
|
|
||||||
%%====================================================================
|
%%====================================================================
|
||||||
%% Internal functions
|
%% Internal functions
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
[
|
[
|
||||||
{epp_proxy, [{tcp_port, 1700},
|
{epp_proxy, [{dev_mode, false},
|
||||||
|
{tcp_port, 1700},
|
||||||
{tls_port, 700},
|
{tls_port, 700},
|
||||||
{epp_session_url, "https://registry.test/epp/session/"},
|
{epp_session_url, "https://registry.test/epp/session/"},
|
||||||
{epp_command_url, "https://registry.test/epp/command/"},
|
{epp_command_url, "https://registry.test/epp/command/"},
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
[
|
[
|
||||||
{epp_proxy, [{tcp_port, 3333},
|
{epp_proxy, [{dev_mode, false},
|
||||||
|
{tcp_port, 3333},
|
||||||
{tls_port, 4444},
|
{tls_port, 4444},
|
||||||
{epp_session_url, "https://registry.test/epp/session/"},
|
{epp_session_url, "https://registry.test/epp/session/"},
|
||||||
{epp_command_url, "https://registry.test/epp/command/"},
|
{epp_command_url, "https://registry.test/epp/command/"},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue