Vsevolod Stakhov
14c13854d3
[Rework] Further types conversion (no functional changes)
3 miesięcy temu
Vsevolod Stakhov
ac2ee05594
[Fix] Do not pollute public headers with libev internals
9 miesięcy temu
Vsevolod Stakhov
537a7180a0
[Rework] Use clang-format to unify formatting in all sources
No meaningful changes.
11 miesięcy temu
Josh Soref
2b8e6958f4
Spelling (#4086)
[Rework] Massive spelling fix from @jsoref
2 lat temu
Vsevolod Stakhov
49768177cf
[Minor] Allow to get a port for a specific upstream
2 lat temu
Vsevolod Stakhov
e89fc35017
[Minor] Allow to capture upstream object
2 lat temu
Vsevolod Stakhov
684996ee80
[Minor] Add failure reason in the upstreams code
4 lat temu
Vsevolod Stakhov
234923a5ff
[Feature] Allow exception when choosing upstream
4 lat temu
Vsevolod Stakhov
ff7f417bff
[Fix] Allow real upstreams configuration
4 lat temu
Vsevolod Stakhov
9bde024ddf
[Minor] Improve logging for upstream failure
4 lat temu
Vsevolod Stakhov
b3eb4d1800
[Project] Start SRV upstreams implementation
4 lat temu
Vsevolod Stakhov
c271eb3665
[Rework] Add C++ guards to all headers
5 lat temu
Vsevolod Stakhov
005105a1b0
[Project] Rework upstreams
5 lat temu
Vsevolod Stakhov
98897c1797
[Project] First refactoring step libevent->libev
5 lat temu
Vsevolod Stakhov
34cc551018
[Project] Preliminary support of HTTP proxies
Issue: #572
5 lat temu
Vsevolod Stakhov
0f32df6f44
[Fix] Core: Fix address rotation bug
Previously, upstream.get_addr function returned the new address of the
upstream. Unfortunately, it was used for printing addresses. It caused
the following situation: let's imagine we have A1 and A2 where A1 was
initially selected. So the connection was performed to A1:
Current addr Selected addr
Connect+---------+ A2+------>A1 A1
|
+-+Print failure<---+ A1+------>A2 A2
| +----+
+->Mark failure+-------->+ A2 |
+----+
But the failure OP as well as log message told about `A2` where the real
problem happened with `A1`.
This commit adds distinguishing between getting the next and the current
address of the upstream resolving this issue.
5 lat temu
Vsevolod Stakhov
70d859cede
[Feature] Allow to add upstream watchers to Lua API
5 lat temu
Vsevolod Stakhov
a6a1a8d5ae
[Feature] Implement event watchers for upstreams
5 lat temu
Vsevolod Stakhov
ec763ca3ee
[Feature] Allow to set custom limits for upstream lists
5 lat temu
Vsevolod Stakhov
1812d38cb8
[Feature] Distinguish IP failures from connection failures
6 lat temu
Vsevolod Stakhov
639c67dbd8
[Fix] Fix parsing IPv6 nameservers in resolv.conf
7 lat temu
Vsevolod Stakhov
f9e618dee3
[Minor] Add some auxiliary functions for upstreams
7 lat temu
Vsevolod Stakhov
6151a4b7f8
[Feature] Allow forced and non-forced upstreams selection
8 lat temu
Vsevolod Stakhov
612bbd0102
[Feature] Allow iterating over upstreams
8 lat temu
Vsevolod Stakhov
e7d1c7c1a6
[Feature] Add flags and opaque data to upstreams
8 lat temu
Vsevolod Stakhov
33dc0d893c
Add rspamd_upstream_reresolve routine.
8 lat temu
Vsevolod Stakhov
19fdaf580a
Rework rotation for upstreams
8 lat temu
Vsevolod Stakhov
0af6082b44
Parse rotation type for upstreams list
8 lat temu
Vsevolod Stakhov
6cb689f218
Add deinitialization for upstreams
8 lat temu
Vsevolod Stakhov
3d10a9ead7
Rework upstreams initialization
8 lat temu
Vsevolod Stakhov
a42332ca48
Rework upstreams context
8 lat temu
Vsevolod Stakhov
420cd8b263
Rework upstreams code for new inet_addr.
9 lat temu
Vsevolod Stakhov
ba06982886
Add sequential order for upstreams.
9 lat temu
Vsevolod Stakhov
cd5656abb7
Rework IP addresses in upstreams.
- Select ipv4/unix addresses if they exist and use ipv6 for ipv6 only
upstreams (since the support of ipv6 is poor in many OSes and
environments).
- Free IP list on upstream destruction.
- Add test cases for addresses selection.
- Allow adding of free form IP addresses to upstreams.
9 lat temu
Vsevolod Stakhov
bb6169400e
Use upstreams configuration.
9 lat temu
Vsevolod Stakhov
91b1e25aed
Some more auxiliary functions.
9 lat temu
Vsevolod Stakhov
db0e114862
Add parsing of multiple upstreams string.
9 lat temu
Vsevolod Stakhov
db1fd00959
Fix some more old upstreams code.
9 lat temu
Vsevolod Stakhov
d958071040
Start new upstreams implementation.
9 lat temu
Vsevolod Stakhov
397dfabb70
Rework API completely.
9 lat temu
Vsevolod Stakhov
379055dbbb
Unify style without sorting headers.
10 lat temu
Vsevolod Stakhov
fe79d8c5a3
Revert "Unify code style."
This reverts commit e0483657ff
.
10 lat temu
Vsevolod Stakhov
e0483657ff
Unify code style.
10 lat temu
Vsevolod Stakhov
61555065f3
Rework project structure, remove trash files.
10 lat temu
Vsevolod Stakhov
7e440d6f43
* Add lua bindings for upstream API.
12 lat temu
Vsevolod Stakhov
5c9372c4a8
* Add start script for red hat compatible systems
Add descriptions for some rspamd API functions (no functional changes).
--HG--
rename : linux/rspamd => linux/rspamd_debian.in
13 lat temu
Vsevolod Stakhov
1cb8543e85
* Add ability to specify dns nameservers in a config
* Add ability to select between round-robin and master-slave algorithms for dns servers
13 lat temu
Vsevolod Stakhov
6b306ab875
Fixes types (use glib ones) no functional change.
Now all comments in commit logs beginning with '*' would be included in changelog, so
important changes would be separated from small ones.
13 lat temu
Vsevolod Stakhov
2aa9c74f1c
* Reorganize structure of source files
* Adopt build system for new structure
--HG--
rename : cfg_file.h => src/cfg_file.h
rename : cfg_file.l => src/cfg_file.l
rename : cfg_file.y => src/cfg_file.y
rename : cfg_utils.c => src/cfg_utils.c
rename : controller.c => src/controller.c
rename : filter.c => src/filter.c
rename : filter.h => src/filter.h
rename : fstring.c => src/fstring.c
rename : fstring.h => src/fstring.h
rename : main.c => src/main.c
rename : main.h => src/main.h
rename : mem_pool.c => src/mem_pool.c
rename : mem_pool.h => src/mem_pool.h
rename : memcached-test.c => src/memcached-test.c
rename : memcached.c => src/memcached.c
rename : memcached.h => src/memcached.h
rename : perl.c => src/perl.c
rename : perl.h => src/perl.h
rename : plugins/regexp.c => src/plugins/regexp.c
rename : plugins/surbl.c => src/plugins/surbl.c
rename : protocol.c => src/protocol.c
rename : protocol.h => src/protocol.h
rename : upstream.c => src/upstream.c
rename : upstream.h => src/upstream.h
rename : url.c => src/url.c
rename : url.h => src/url.h
rename : util.c => src/util.c
rename : util.h => src/util.h
rename : worker.c => src/worker.c
15 lat temu
Vsevolod Stakhov
8b8ae0cf7a
* Add initial implementation of C modules API
16 lat temu