• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / reproxy / 40616822588
81%

Build:
DEFAULT BRANCH: master
Ran 28 Oct 2026 01:45AM UTC
Jobs 1
Files 20
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Oct 2026 01:44AM UTC coverage: 81.071% (+0.6%) from 80.423%
40616822588

push

github

web-flow
fix: take X-Real-IP from the TCP peer, add --trusted-proxy (#267)

* fix: take X-Real-IP from the TCP peer, add --trusted-proxy

X-Real-IP was the left-most public address of the client-supplied
X-Forwarded-For, so any client could set the address backends see. It is now
the TCP peer. With --trusted-proxy (IP or CIDR, repeatable), a request from a
trusted peer gets the client address by walking X-Forwarded-For right to left,
stopping at the first untrusted address or at a malformed entry.

- route allowlists use the same client address; --remote-lookup-headers is
  deprecated and reproxy refuses to start with it unless --trusted-proxy is set
- Forwarded and X-Forwarded-Host/Proto/Port from an untrusted peer are dropped
- ReverseProxy uses Rewrite instead of the deprecated Director, so a client
  can't strip the headers reproxy sets by naming them in Connection
- ssl.go lint fixes: strings.Cut, drop the ignored PreferServerCipherSuites

* fix: key per-user throttling on the resolved client address

tollbooth.NewLimiter looks up X-Forwarded-For first, then X-Real-IP, then
RemoteAddr, so a client could pick a new throttle bucket for every request by
changing either header. Both the per-route and the global user limiter now key
on the same client address reproxy sends in X-Real-IP: the TCP peer, or the
X-Forwarded-For walk when the peer is in --trusted-proxy.

Behind a CDN without --trusted-proxy, clients are grouped by the CDN's peer
address. README covers this, with a Cloudflare note linking #172.

* docs: note forwarding headers set by plugins follow the trusted-proxy rules

X-Real-IP, X-Forwarded-For, Forwarded and X-Forwarded-Host/Proto/Port that a
plugin sets through HeadersIn are written into the incoming request, so they
are handled like client-sent ones. A plugin's X-Forwarded-Proto reaches the
backend only when the request came from a trusted proxy.

151 of 156 new or added lines in 6 files covered. (96.79%)

2891 of 3566 relevant lines covered (81.07%)

87.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
86.22
0.38% app/main.go
2
97.5
app/proxy/real_ip.go
1
94.59
-0.2% app/proxy/handlers.go
Jobs
ID Job ID Ran Files Coverage
1 40616822588.1 28 Oct 2026 01:45AM UTC 20
81.07
GitHub Action Run
Source Files on build 40616822588
  • Tree
  • List 20
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3540be5b on github
  • Prev Build on master (#40461204219)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc