* Added support for wildcard prefix in server patterns
This update introduces the ability to use a wildcard prefix in server patterns for domain matching. It also includes corresponding tests for this new functionality, ensuring "*.domain.com" style patterns can be handled correctly.
A host substitution functionality has been added to the match logic for the MTProxy match type. This allows for more flexible routing rules, enabling the replacement of "$host" and "${host}" placeholders in the destination URL with the server name, before performing the regex match. Updated corresponding tests to reflect this change.
make additional test without host substitution
add test with ${host} substitution
* Initial implementation of keep-host argument
* Add keep-host parsing to the consulcatalog provider
* Update docs
* update from the current master
---------
by @ffix
add new remote param to docker and file providers
lint: http nil body
add support of remote ips to consul provider
local implementation of onlyfrom middleware
lint: missing comment
make proxy tests more readable
preffer public IP if any forwwarded
Before this change redirects didn't work because method `Service.extendMapper` didn't copy
the value of `URLMapper.RedirectType` to the extended result.
To fix this we return the original `URLMapper` instead of creating a new one (it can also help
to avoid similar bugs in the future). We can reuse `URLMapper` because it is passed
by value.
Main consideration is backward compatibility. example.com should be treated as an exact
match, where possible. So current order is: exact host, regex host, * or "".
Regex matches are cached for better performance, cache is invalidated once mappings are refreshed.
* wip
* resolve merge artifacts
* full coverage for conductor
* wire plugin conductor to main and proxy
* wip, with separate match handler
* split matching logic with another handler, add initial docs
* move parts of proxy to handlers, add tests
* add headers in to be sent to proxied url
* merged from master
* add example with docker compose
* supress excesive debug reporting 0-9 disabled in docker
* add plugin tests
* randomize test port
* lint: minor warns
* lint: err shadow
* support reproxy.N.something labels for docker #78
* lint: suppress false positive
* update linter in ci
* update readme
* add test for failed container parse
* discovery support for multiple matches
* switch proxy matcher usage, add random selection
* fix multi-match logic
* pass match picker func
* simplify rand picker
* update health params and docs
* fix early termination on discovery multi-match
* add grouping of sorted matches in sorted result
* add mention of live check to readme