Skip to content

v0.4.13

Choose a tag to compare

@github-actions github-actions released this 19 Oct 06:19
· 48 commits to master since this release
5b0e417

追加

  • PROXY protocol(v1 / v2)を、信用する前段から受け取れるようになりました(#296)。tcp のルールに proxy_protocol: {"from": ["10.2.0.0/16"], "required": true} を書くと、from の接続元(ロードバランサ・別の rproxy など)が付けたヘッダを読み、本当のクライアントのアドレスとして扱います。
    • allow_from・geoip・crowdsec・送信元ごとの limits・bandwidth、ログの client・http.access・X-Forwarded-For / X-Real-IP、転送先への source_ip(proxy_v1 / proxy_v2 のヘッダ、transparent)が、本当のクライアントのアドレスを使います。前段のアドレスはログの proxy_peer に残ります。
    • from は必須で、空や 0.0.0.0/0・::/0 は書けません。required(既定 true)が true なら、from からヘッダなしで来た接続を断ります。from の外からヘッダで始まる接続も断ります(conn.denied の reason は proxy_protocol / proxy_protocol_untrusted)。
    • ヘッダは受け付けてから 5 秒以内に届かなければ断ります。大きさの上限は v1 が 107 バイト、v2 が 16 + 4096 バイトです。
    • PATCH・ルールセットの PUT・設定ファイルの再読み込みで、接続を切らずに付け外しできます。GET /capabilities の features.proxy_protocol_in。
    • Traefik からの変換(rproxy-traefik-convert)は、entryPoint の proxyProtocol.trustedIPs を proxy_protocol: {from, required: false} にします。
  • tls.routes[] ごとに source_ip を指定できるようになりました(#297)。1 つのポートの terminate(http のルールを含む)で、passthrough: true の route だけ source_ip: proxy_v2 を付けて、クライアントの IP を転送先へ渡せます。sni のルールの route にも書けます(udp の sni は proxy・proxy_v2)。
    • 書ける値は proxy・proxy_v1・proxy_v2 で、省けばルールの source_ip を使います。TLS を終端する route と transparent は unsupported です。
    • 接続を切らずに変えられます。GET /capabilities の features.route_source_ip。
    • Traefik からの変換は、ルーターごとの proxyProtocol.version を、TLS を終端しないルーターでは route の source_ip にします。

どちらも省略したときの動きは v0.4.12 と同じです。v0.4.12 に戻すときは、先にこの 2 つの設定を外してください。

UI: TCP-UDP-rproxy-ui v0.4.6 · Kubernetes: rproxy-gateway v0.4.12


Added

  • PROXY protocol (v1 / v2) can now be accepted from trusted upstreams (#296). With proxy_protocol: {"from": ["10.2.0.0/16"], "required": true} on a tcp rule, rproxy reads the header sent by a peer in from (a load balancer, another rproxy, …) and treats its address as the real client.
    • allow_from, geoip, crowdsec, per-source limits, bandwidth, the client of the logs, http.access, X-Forwarded-For / X-Real-IP and the outbound source_ip (proxy_v1 / proxy_v2 headers, transparent) use the real client's address. The upstream's address stays in the logs as proxy_peer.
    • from is required and cannot be empty, 0.0.0.0/0 or ::/0. With required (default true), a connection from from without a header is refused. A connection from outside from that starts with a header is refused too (conn.denied with reason proxy_protocol / proxy_protocol_untrusted).
    • The header must arrive within 5 seconds of accepting; at most 107 bytes for v1 and 16 + 4096 bytes for v2.
    • It can be added and removed without cutting connections (PATCH, rule set PUT, settings reload). features.proxy_protocol_in in GET /capabilities.
    • The Traefik converter (rproxy-traefik-convert) turns an entryPoint's proxyProtocol.trustedIPs into proxy_protocol: {from, required: false}.
  • source_ip can now be set per tls.routes[] entry (#297). On one port's terminate rule (including http rules), only the passthrough: true routes can get source_ip: proxy_v2 and pass the client's IP to their backends. Routes of sni rules take it too (proxy and proxy_v2 for udp sni).
    • Values are proxy, proxy_v1 and proxy_v2; without it the rule's source_ip is used. Terminating routes and transparent are unsupported.
    • It changes without cutting connections. features.route_source_ip in GET /capabilities.
    • The Traefik converter turns a router's own proxyProtocol.version into the route's source_ip on routers that do not terminate TLS.

Without them, everything works as in v0.4.12. Remove both settings before going back to v0.4.12.

UI: TCP-UDP-rproxy-ui v0.4.6 · Kubernetes: rproxy-gateway v0.4.12