diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-12-29 18:37:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-29 18:37:51 -0700 |
commit | c143bb549c53f2737c41cdfce6cc2598c5489bdc (patch) | |
tree | 33853e2a9c30ff7c670aa4ff5b73df005d6e6fec /config | |
parent | f7c2ccbe26dc808e4a7eae9a378e6c382220961a (diff) | |
parent | 479ca815e3a1760c71e8977674434b15f94ae833 (diff) | |
download | chessh-c143bb549c53f2737c41cdfce6cc2598c5489bdc.tar.gz chessh-c143bb549c53f2737c41cdfce6cc2598c5489bdc.zip |
Merge pull request #1 from Simponic/erlang_ssh_server
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 13 | ||||
-rw-r--r-- | config/test.exs | 6 |
2 files changed, 16 insertions, 3 deletions
diff --git a/config/config.exs b/config/config.exs index daffcad..42339fd 100644 --- a/config/config.exs +++ b/config/config.exs @@ -2,8 +2,17 @@ import Config config :chessh, ecto_repos: [Chessh.Repo], - priv_dir: Path.join(Path.dirname(__DIR__), "priv/keys"), - port: 42069, + key_dir: Path.join(Path.dirname(__DIR__), "priv/keys"), + port: 42_069, max_sessions: 255 +config :chessh, RateLimits, + jail_timeout_ms: 5 * 60 * 1000, + jail_attempt_threshold: 15, + max_concurrent_user_sessions: 5 + +# This will be redis when scaled across multiple nodes +config :hammer, + backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]} + import_config "#{config_env()}.exs" diff --git a/config/test.exs b/config/test.exs index c1d70dd..002b49f 100644 --- a/config/test.exs +++ b/config/test.exs @@ -1,5 +1,9 @@ import Config +config :chessh, RateLimits, + jail_timeout_ms: 5000, + jail_attempt_threshold: 3 + config :chessh, Chessh.Repo, database: "chessh-test", username: "postgres", @@ -8,4 +12,4 @@ config :chessh, Chessh.Repo, pool: Ecto.Adapters.SQL.Sandbox config :chessh, - priv_dir: Path.join(Path.dirname(__DIR__), "priv/keys") + key_dir: Path.join(Path.dirname(__DIR__), "priv/test_keys") |