diff --git a/docs/alphaindexes/devel/rpccommands.md b/docs/alphaindexes/devel/rpccommands.md index 82424969..808875bc 100644 --- a/docs/alphaindexes/devel/rpccommands.md +++ b/docs/alphaindexes/devel/rpccommands.md @@ -378,6 +378,10 @@ | **uac.reg_reload** | [uac](https://www.kamailio.org/docs/modules/6.1.x/modules/uac.html#uac.r.uac.reg_reload) | | **uac.reg_remove** | [uac](https://www.kamailio.org/docs/modules/6.1.x/modules/uac.html#uac.r.uac.reg_remove) | | **uac.reg_unregister** | [uac](https://www.kamailio.org/docs/modules/6.1.x/modules/uac.html#uac.r.uac.reg_unregister) | +| **udp.proxy.dump** | [kex](https://www.kamailio.org/docs/modules/6.1.x/modules/kex.html#kex.r.udp.proxy.dump) | +| **udp.proxy.stats** | [kex](https://www.kamailio.org/docs/modules/6.1.x/modules/kex.html#kex.r.udp.proxy.stats) | +| **udp.proxy.clean** | [kex](https://www.kamailio.org/docs/modules/6.1.x/modules/kex.html#kex.r.udp.proxy.clean) | +| **udp.proxy.flush** | [kex](https://www.kamailio.org/docs/modules/6.1.x/modules/kex.html#kex.r.udp.proxy.flush) | | **ul.add** | [usrloc](https://www.kamailio.org/docs/modules/6.1.x/modules/usrloc.html#usrloc.r.add) | | **ul.db_contacts** | [usrloc](https://www.kamailio.org/docs/modules/6.1.x/modules/usrloc.html#usrloc.r.db_contacts) | | **ul.db_expired_contacts** | [usrloc](https://www.kamailio.org/docs/modules/6.1.x/modules/usrloc.html#usrloc.r.db_expired_contacts) | diff --git a/docs/cookbooks/devel/core.md b/docs/cookbooks/devel/core.md index 5e6c133e..e79acf74 100644 --- a/docs/cookbooks/devel/core.md +++ b/docs/cookbooks/devel/core.md @@ -4394,6 +4394,35 @@ for normal UDP sockets. The parameter can be set at runtime (`core.udp4_raw_ttl`). +### udp_accept_proxy + +Enables support for one or both of two UDP proxy protocols if set to non-zero. + +The bit value 1 enables support for version 2 of the [HAproxy +protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) (version +1 does not support UDP). The bit value 2 enables support for the "simple" UDP +proxy protocol (for example used by [Cloudflare +Spectrum](https://developers.cloudflare.com/spectrum/reference/simple-proxy-protocol-header/)). +The value 3 therefore enables support for both. + +When a UDP proxy protocol is in use, UDP packets are prepended with an +additional header which includes information about the real source address and +port. This header is then removed for further processing of the packet. + +The mappings between real source addresses and proxy addresses are kept in an +internal hash table. For packets sent in the reverse direction, the matching +proxy address is then looked up from the hash table in order to establish +correct UDP flows. + +Entries are automatically removed from the hash table after 2 hours or not +being used. + +The default value is zero to disable this support. + +``` c +udp_accept_proxy=2 +``` + ## Blocklist Parameters ### dst_blocklist_expire diff --git a/docs/features/new-in-devel.md b/docs/features/new-in-devel.md index ad636d78..ebb037a1 100644 --- a/docs/features/new-in-devel.md +++ b/docs/features/new-in-devel.md @@ -33,6 +33,12 @@ modules considered obsolete and not maintained have been moved to ### Parameters +- `udp_accept_proxy` - add support for two UDP proxy protocols (HAproxy and "simple") +- RPC command `udp.proxy.dump` to inspect the contents of the UDP proxy hash table +- RPC command `udp.proxy.stats` to get an overview of the size of the UDP proxy hash table +- RPC command `udp.proxy.clean` to remove expired entries from the UDP proxy hash table +- RPC command `udp.proxy.flush` to remove all entries from the UDP proxy hash table + ### Functions ### Memory Managers