Commit graph

10 commits

Author SHA1 Message Date
Calin Culianu
4d34c77cbf
Nit: Moved the code to decide if an ip is excluded from per-ip limits
Move it to a central place because we may use this check in the future
in a lot of different places (such as per-IP history or sub limits, perhaps?)
2020-01-06 02:13:03 +02:00
Calin Culianu
752818171e
Added per-IP connection limits plus various other nits and tweaks
Per-IP connection limit defaults to 12, but is configurable from the
config file.

Also added exlusion sets for subnets for this (and any future per-IP
limits).

By default localhost-originating connections are excluded.

Also in this commit:

- Replaced some usages of QMap with QHash for data items where order is
not important -- QHash is faster.
- Made the global 'id' type from IdMixin be IdMixin::Id (type alias for
quint4).  This way code using this data item is cleared/easier to read
and more explicit in what it's doing.
2020-01-06 01:26:50 +02:00
Calin Culianu
bcf91fdd87
Added conf file supports multiple tcp, ssl, stats & debug options
This way the conf file is equivalent to the CLI. We use a multihash for
the name/value pairs. Go Qt with your useful containers.
2020-01-04 00:34:14 +02:00
Calin Culianu
adbf65eed3
Initial impl. of config file mechanism. Works!
Next up: Support multiple tcp, ssl, stats args in the conf file.
2020-01-03 23:28:57 +02:00
Calin Culianu
f58b1571d2
Added the Configfile class; minimialistic support for name = value conf.
Similar to bitcoind's conf file format
2020-01-03 12:38:14 +02:00
Calin Culianu
a831cce8ac
Modified license preamble to say "Bitcoin Cash" instead of "Electron Cash"
The hope is maybe people will adopt this with other wallets...
2019-12-28 23:48:24 +02:00
Calin Culianu
405335c173
Added LICENSE preamble to all top-level source files
GPL v3. YAY!
2019-12-28 23:46:05 +02:00
Calin Culianu
5e9b659f81
some nits 2019-11-17 11:10:41 +02:00
Calin Culianu
56103a9299 Refactoring nits. Put default Options in Options.h rather than Common.h 2019-04-26 09:02:53 +03:00
Calin Culianu
2477a7a8a3 Added initial TcpServer stub implementation
- Already supports listening on as many sockets as you wish
- Each listening server has its own thread
- Will implement later: SSL server

Also refactored code a bit, created the generic "Controller" class, made
EXMgr and SrvMgr inherit from it.

ToDo: Figure out workflow for connections and clients, model client
sessions, etc.
2019-04-26 08:47:46 +03:00