1
0
mirror of https://github.com/umputun/reproxy.git synced 2025-06-30 22:13:42 +02:00
Commit Graph

41 Commits

Author SHA1 Message Date
a896f08eec add middleware to optionally allow requests from giving ips/ranges
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
2023-11-26 16:17:04 -06:00
ffd6b08257 increase timeout a little for a flaky test 2023-02-26 16:21:16 -06:00
6695079c57 make sure two consecutive Server calls return the same list of servers 2022-02-23 18:07:38 -06:00
e2a40bc7a6 update rest library for proper 404 content type 2022-01-06 01:07:50 -06:00
64f57df860 add support of custom 404 page for assets server 2022-01-06 00:16:18 -06:00
2e8733b152 Correctly handle URL escaped paths
Consider proxy configuration `*,/test/(.*),https://dest/$1`.

When reproxy accepts a request with URL encoded path, i.e.
'/test/a%205%25%20b/' which the encoded form of '/test/a 5% b',
it is using request.URL.Path which is already URL decoded by Golang.

This causes an error in proxy.go while it is trying to validate the
destination with `url.Parse(match.Destination)` as, strictly speaking,
destination URL is not a valid URL anymore, it is `https://target-dest/a 5% b`.

With this fix, the original escaped URL stays as is, correctly passes
the validation and then it is up to destination server to URL decode and
correctly handle the URL.
2021-12-06 11:00:07 -06:00
075f66825a update linter and address all lint warns 2021-11-09 12:47:41 -06:00
8c59be3612 implement simple on/off basic-auth for all resources
lint: err shadowing

extract htpasswd file load and add tests
2021-11-09 12:47:41 -06:00
d364904dd8 fix flaky tests 2021-08-12 22:31:15 -05:00
56e040b80b allow longer time to start proxy in limiter test 2021-07-08 16:32:24 -05:00
13c70eb8e8 add health integration test 2021-06-12 13:26:42 -05:00
e44ca79f23 add support of spa to common assets 2021-06-07 19:16:18 -05:00
f0049ef7ac add support of spa-like assets handling 2021-06-07 19:16:18 -05:00
aea74d717f Redirect (#87)
* add @code redirect prefix

* add proxy handling for redirects #86

* add info about redirects
2021-06-06 18:13:59 -05:00
b3d222a60a quick and dirty fix for assets rules regression 2021-06-01 03:50:20 -05:00
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
282b4b268c add lb selector 2021-05-28 16:11:16 -05:00
095f4d7102 Multi match (#74)
* 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
2021-05-16 18:34:51 -05:00
a93bd40f8a treat 0 max request size limit as unlimited 2021-05-12 21:54:41 -05:00
5743109210 Nice error (#61)
* add support of html error reporting with custom templates

* typo

* formatting

* better template load error msg
2021-04-30 04:03:36 -05:00
1ff45cc2ca add integration test over https 2021-04-27 02:50:45 -05:00
a4cffbe922 Mime cache (#59)
* support different caching duration for different mime types #58

* extract main code to run func

* lint: err shadowing
2021-04-26 18:51:48 -05:00
c590c3246d Assets cache (#54)
* add caching control for assets
* regen site
2021-04-23 02:02:36 -05:00
aef3040b60 fix tests regression 2021-04-20 19:22:46 -05:00
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
1606e56d82 fix proxy headers, should affect response not the request 2021-04-13 14:33:54 -05:00
6dcc2fa719 flip signature, disabled by default 2021-04-13 14:08:15 -05:00
64fd98a130 all timeouts are customizable #5 2021-04-12 21:54:59 -05:00
1ac2f23504 adjust tests for delayed events 2021-04-12 02:29:17 -05:00
bd08c91889 don't use default transport for proxy, causing race with tests 2021-04-09 20:54:02 -05:00
9029b4d60f lint: multiple warns cleanup 2021-04-09 15:05:22 -05:00
e7d08008bf fix comments, more tests 2021-04-07 21:52:14 -05:00
cfb8d8df14 add-nosignature mode, rename leftovers from dpx 2021-04-06 23:17:50 -05:00
225590da2c add ping url and health check 2021-04-05 03:37:28 -05:00
4e28e69997 add X-Real-IP to proxied request 2021-04-04 02:57:34 -05:00
f8cd5f53b0 rename to reproxy 2021-04-03 14:23:23 -05:00
d45415080a allow custom https and http ports 2021-04-03 01:20:24 -05:00
79f0514294 lint: multiple warns 2021-04-03 01:00:09 -05:00
a316070eb6 add ssl suport 2021-04-03 00:22:54 -05:00
7c08a09053 allow docker provider on exposed and matched network 2021-04-02 00:50:16 -05:00
8a7b73f41f initial version #1 2021-04-01 02:37:28 -05:00