1
0
mirror of https://github.com/umputun/reproxy.git synced 2024-11-24 08:12:31 +02:00
Commit Graph

432 Commits

Author SHA1 Message Date
dependabot[bot]
8c9d35ed22 Bump the go-modules-updates group across 1 directory with 2 updates
Bumps the go-modules-updates group with 2 updates in the / directory: [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) and [golang.org/x/crypto](https://github.com/golang/crypto).


Updates `github.com/prometheus/client_golang` from 1.19.1 to 1.20.2
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.1...v1.20.2)

Updates `golang.org/x/crypto` from 0.24.0 to 0.26.0
- [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.26.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-modules-updates
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-modules-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-01 11:43:25 -05:00
dependabot[bot]
1e81d22fef Bump the go-modules-updates group with 2 updates
Bumps the go-modules-updates group with 2 updates: [github.com/didip/tollbooth/v7](https://github.com/didip/tollbooth) and [golang.org/x/crypto](https://github.com/golang/crypto).


Updates `github.com/didip/tollbooth/v7` from 7.0.1 to 7.0.2
- [Commits](https://github.com/didip/tollbooth/compare/v7.0.1...v7.0.2)

Updates `golang.org/x/crypto` from 0.23.0 to 0.24.0
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: github.com/didip/tollbooth/v7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-modules-updates
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-modules-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-28 02:22:59 -05:00
Umputun
1959706ab4 replace keep host with less verbose but more detailed dbg messages only if keep host is enabled 2024-07-23 11:27:58 -05:00
Umputun
85702e4de1 remove noisy keep host messages from logging 2024-07-23 11:25:40 -05:00
Umputun
93b70a99c6 fix (revert) regression causing docker connection refusal, introduced by 899e101d7a
the reason for this regression is not fully understood yet, probably related to some differences between the "manually" created final image on top of scratch and the updated one from the base images.
2024-05-24 16:12:29 -05:00
Umputun
5774737128 Handle default and concrete server match conflict #192
- Drop default server match if a concrete server match is found
- Add test case to validate behavior
2024-05-23 12:08:59 -05:00
Umputun
084e167283 update deps and goreleaser 2024-05-23 03:14:10 -05:00
Umputun
57552c1798
Added support for wildcard prefix in server patterns (#191)
* 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.
2024-05-23 01:56:58 -05:00
Umputun
73c492804d update docs for #190 changes 2024-05-21 22:59:11 -05:00
Umputun
d3bbec8818 prevent log access races in tests
suppress false postive linter warns
2024-05-21 22:51:41 -05:00
Umputun
271beedc99 Added host substitution in MTProxy match type #189
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
2024-05-21 22:51:41 -05:00
Dmitry Verkhoturov
899e101d7a add test to CI for example directory 2024-05-10 15:10:28 -05:00
Dmitry Verkhoturov
30173d599c pin golangci-lint version to latest available, fix reported errors 2024-05-09 22:23:46 -05:00
dependabot[bot]
cbed6ed705 Bump the go-modules-updates group with 3 updates
Bumps the go-modules-updates group with 3 updates: [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang), [github.com/stretchr/testify](https://github.com/stretchr/testify) and [golang.org/x/crypto](https://github.com/golang/crypto).


Updates `github.com/prometheus/client_golang` from 1.19.0 to 1.19.1
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.0...v1.19.1)

Updates `github.com/stretchr/testify` from 1.8.4 to 1.9.0
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0)

Updates `golang.org/x/crypto` from 0.21.0 to 0.23.0
- [Commits](https://github.com/golang/crypto/compare/v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-modules-updates
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-modules-updates
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-modules-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-09 13:45:34 -05:00
dependabot[bot]
7936e0103e Bump golang.org/x/net from 0.22.0 to 0.23.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-09 13:41:28 -05:00
dependabot[bot]
72f5dbb429 Bump goreleaser/goreleaser from v1.14.0 to v1.25.1
Bumps goreleaser/goreleaser from v1.14.0 to v1.25.1.

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-09 13:41:02 -05:00
dependabot[bot]
ab010349e0 Bump the github-actions-updates group with 5 updates
Bumps the github-actions-updates group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `3` | `4` |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `2` | `3` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `2` | `3` |
| [actions/setup-go](https://github.com/actions/setup-go) | `4` | `5` |
| [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) | `3` | `6` |


Updates `actions/checkout` from 3 to 4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

Updates `docker/setup-qemu-action` from 2 to 3
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

Updates `docker/setup-buildx-action` from 2 to 3
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

Updates `actions/setup-go` from 4 to 5
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

Updates `golangci/golangci-lint-action` from 3 to 6
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-updates
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-updates
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-updates
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-updates
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-09 13:38:04 -05:00
Dmitry Verkhoturov
6f6167642a add dependabot updates for GitHub Actions, Go modules, Dockerfiles 2024-05-09 13:17:13 -05:00
Dmitry Verkhoturov
0a9e489743 update github.com/didip/tollbooth from v6 to v7 2024-05-09 13:16:40 -05:00
enzo-g
d9085e7dcc Update README.md
Update small spelling mistake
2024-03-18 01:58:15 -05:00
Umputun
e2ee5bab1b fix forwarded url, has to be earlier and constructed 2024-03-15 17:49:11 -05:00
Umputun
351de86a26 move setting X-Forward-URL after both scheme and host set 2024-03-15 17:32:33 -05:00
Umputun
7d8802992a switch to go 1.22, update deps
update version of runners, change goveralls install

update docker build to v1.22

drop useless codeanalysis ci step
2024-03-15 17:14:08 -05:00
Umputun
d2a4f56833
Add 'X-Forwarded-URL' to request header (#176)
* Add 'X-Forwarded-URL' to request header

'X-Forwarded-URL' has been added to the request header in the proxy core to improve redirection handling.

* lint: address unused param warn, supress for tests
2024-03-15 16:53:10 -05:00
Umputun
616c1df314 don't add dbl headers for X-Forwarded-Proto and X-Forwarded-Proto #172 2024-02-05 23:29:35 -06:00
Umputun
8f2bfdc838 pin goreleaser version 2024-02-01 15:28:20 -06:00
rashpile
631244671a send x-forwarded headers for ssl static mode as well 2024-02-01 14:42:18 -06:00
rashpile
f573cd9e86 add the X-Forwarded-Proto and X-Forwarded-Port headers for SSLAuto mode 2024-02-01 14:42:18 -06:00
rashpile
7ce7e18931 docker api 1.22 is deprecated -> minimal supported version is 1.24 2024-02-01 14:41:39 -06:00
Sergey Ninua
fe24cf99ef
Implement Host header bypassing (#155)
* Initial implementation of keep-host argument

* Add keep-host parsing to the consulcatalog provider

* Update docs

* update from the current master

---------
by @ffix
2024-01-25 03:28:54 -06:00
Eli
7d4394f1c8
Skip SSL check for the destination host (#170)
by @themagic314 

* skip ssl check on dest host
* nolint directive
* readme explanation
2024-01-07 12:19:50 -06:00
Umputun
5b5b04243f fix static proxy example in docs 2023-12-19 14:38:39 -06:00
Umputun
fa23778d42 make LBSelector interface and implement all the current methods plus roundrobin 2023-11-27 12:08:28 -06:00
Umputun
8bde167226 change logger to lgr for only from msg 2023-11-26 18:49:02 -06:00
Umputun
5c07e82ac4 also add what url rejected for 2023-11-26 18:40:04 -06:00
Umputun
197c8d9db3 logging rejected IPs 2023-11-26 18:30:14 -06:00
Umputun
bddb144f60 fix order of middlewares to handle limiting by IP after match handler sets ctx 2023-11-26 17:10:16 -06:00
Umputun
672d4c2af8 add info about limited ip to logs 2023-11-26 16:52:16 -06:00
Umputun
899b552108 add docs for remote ip limiting
add more info and fix typos

add info to readme
2023-11-26 16:17:04 -06:00
Umputun
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
Umputun
36a5443378 update and vendoring
update realip deps

regroup deps, keep all indirect separately
2023-11-26 16:17:04 -06:00
Umputun
f37072e649 lint: minor warns in tests 2023-09-20 11:16:24 -05:00
Umputun
b090bb4300 bump deps, update to go 1.21 2023-09-20 11:08:36 -05:00
Nikita Shoshin
2b92c11cc9 fix redirects
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.
2023-05-13 22:48:22 -05:00
Umputun
12bddda0f5 bump deps 2023-05-13 22:44:55 -05:00
Umputun
197246a05a drop legacy rand.Seed 2023-02-27 14:51:25 -06:00
Umputun
96904fe7c5 switch to go v1.20 2023-02-27 14:43:41 -06:00
Umputun
34d9f4d1d5 lint: minor warn on deferred close 2023-02-27 00:00:04 -06:00
Umputun
ffd6b08257 increase timeout a little for a flaky test 2023-02-26 16:21:16 -06:00
Umputun
00ff3e8f37 bump deps 2023-02-26 16:15:04 -06:00