Commit Graph

47 Commits

Author SHA1 Message Date
Umputun
34d9f4d1d5 lint: minor warn on deferred close 2023-02-27 00:00:04 -06:00
Umputun
ca65980093 fix redirects for docker provider 2023-02-25 22:30:54 -06:00
Umputun
22063f08cd fix docker's labels max, make it include .9 for real 2023-02-25 12:57:16 -06:00
Umputun
5dcb303615 fix comment typo 2021-06-26 12:12:47 -05:00
Umputun
f0049ef7ac add support of spa-like assets handling 2021-06-07 19:16:18 -05:00
Umputun
7139c57766 RPC plugins support (#85)
* 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
2021-06-01 02:56:39 -05:00
Umputun
556a34f1fb allow reproxy.server to be default for numeric rules 2021-05-26 01:45:42 -05:00
Umputun
e092c7e989 allow docker rules to use external destinations 2021-05-26 00:17:45 -05:00
Umputun
1c1f9d1c3c Docker multi routes (#80)
* support reproxy.N.something labels for docker #78

* lint: suppress false positive

* update linter in ci

* update readme

* add test for failed container parse
2021-05-25 23:48:22 -05:00
Umputun
9b9d64894d reproxy.port to enable container 2021-04-28 14:37:11 -05:00
Umputun
2670144e8a add support of docker route prefix 2021-04-28 14:00:38 -05:00
Umputun
69bb10d42f fix default docker dest to include container 2021-04-28 13:40:59 -05:00
Umputun
efded2cf5e flip order in docker proxy+static labels #55
we want proxy rule to have priority over assets rule
2021-04-23 04:05:14 -05:00
Umputun
1aa89cfbd6 fix docker resp struct 2021-04-17 22:55:32 -05:00
Timofey
e7121846da Handle docker API errors 2021-04-17 22:37:32 -05:00
Timofey
813ed6df3d Set minimal supported docker version 2021-04-17 22:37:32 -05:00
Umputun
0a9051d528 lint: unneeded fmt 2021-04-17 02:36:49 -05:00
Umputun
ee4f8919e1 allow docker to provide static with proxy at the same time #27 2021-04-17 02:17:23 -05:00
Umputun
6ad288afd0 drop docker api version 2021-04-17 02:16:43 -05:00
Umputun
b667720cc3 suppress messages on docker events check 2021-04-16 17:36:57 -05:00
Timofey
7f991b1e18 Refactor
Thx for the feedback.

* Add missing test
* Decouple containerInfo from docker client
* Move refresh interval var to `Docker`
* Minor things
2021-04-16 17:30:54 -05:00
Timofey
76be67d39c Detect changes in running containers
* Naive attempt to detect changes based on container metadata
* And my best effort to test it
2021-04-16 17:30:54 -05:00
Timofey
a91fb6816f Invoke Docker API directly
* Remove third-party docker client dependency
* Simplify code and tests

Might need to run `go mod tidy` and `go mod vendor` afterwards
2021-04-16 17:30:54 -05:00
Umputun
8cf4b9063d Multiple static location (#36)
* add isStatic flag to mapper, implement for file and static providers

* handle static match response as a special case

* move assets conversion to load time

* rename static to assets everywhere for consistency

* don't overwride asset param in url mapper

* add documentation about assets mode

* add tests
2021-04-16 02:49:00 -05:00
Vladimir Garvardt
66610ef491 Replaced github.com/pkg/errors with stdlib errors wrap 2021-04-14 11:44:20 -05:00
Umputun
de4a6eca64 container named rerpoxy excluded from discovery 2021-04-13 20:40:42 -05:00
Umputun
f6491246f8 support reproxy.port #21
defines which of exposed ports will be used for the destination in case if multiple ports exposed from the container
2021-04-13 12:01:54 -05:00
Umputun
af02a41147 add primitive priority order for discovered containers 2021-04-13 01:52:12 -05:00
Umputun
06a6d595b3 change docker provider defaults
skip without --docker.auto all containers without reproxy.* label
2021-04-12 21:26:31 -05:00
Umputun
02c87ffc7a support multiple servers in reproxy.server label #20 2021-04-12 03:13:25 -05:00
Umputun
a20abd0140 change docker default and add autoapi param #20 2021-04-12 02:57:13 -05:00
Umputun
8b3889d4e5 switch events to provider id, delay repsponse 2021-04-12 02:09:34 -05:00
Umputun
9c659afb0f drop separate ID method from providers, fill directly 2021-04-11 23:41:23 -05:00
Umputun
9462170cd1 support reproxy.enabled label, enforce this label for reproxy container itself #16 2021-04-11 01:37:45 -05:00
Umputun
6bcb791bc5 fix ping path from docker labels, clarify docs about path (not url) for the destination 2021-04-10 02:44:40 -05:00
Umputun
b0dcad19fc disable network check by default 2021-04-10 02:08:26 -05:00
Umputun
9029b4d60f lint: multiple warns cleanup 2021-04-09 15:05:22 -05:00
Umputun
cdbf455d65 simplify docker events with filters 2021-04-08 22:06:16 -05:00
Umputun
e7d08008bf fix comments, more tests 2021-04-07 21:52:14 -05:00
Umputun
cfb8d8df14 add-nosignature mode, rename leftovers from dpx 2021-04-06 23:17:50 -05:00
Umputun
225590da2c add ping url and health check 2021-04-05 03:37:28 -05:00
Umputun
f8cd5f53b0 rename to reproxy 2021-04-03 14:23:23 -05:00
Umputun
2c757b4c37 comments and more logging 2021-04-03 01:38:05 -05:00
Umputun
79f0514294 lint: multiple warns 2021-04-03 01:00:09 -05:00
Umputun
7c08a09053 allow docker provider on exposed and matched network 2021-04-02 00:50:16 -05:00
Umputun
190b194d88 support multiple servers 2021-04-02 00:07:36 -05:00
Umputun
8a7b73f41f initial version #1 2021-04-01 02:37:28 -05:00