proxy.start_proxy_listener
Since: Version 2026.03.04-bb93ecb1
The functionality described in this section requires version 2026.03.04-bb93ecb1 of KumoMTA, or a more recent version.
Configure and start a SOCKS5 proxy server.
Note
This function is only available to the proxy-server executable.
This function should be called only from inside your proxy_init event handler.
The proxy server implements the SOCKS5 protocol and can be used by KumoMTA's egress sources to route outbound connections through the proxy. This is useful for scenarios where you need to control the egress IP address or route traffic through specific network paths.
To enable TLS and authentication:
kumo.on('proxy_init', function()
proxy.start_proxy_listener {
listen = '0.0.0.0:1080',
use_tls = true,
tls_certificate = '/path/to/cert.pem',
tls_private_key = '/path/to/key.pem',
require_auth = true,
}
end)
kumo.on('proxy_server_auth_rfc1929', function(username, password, conn_meta)
-- Validate credentials here
return username == 'user' and password == 'secret'
end)
PARAMS is a lua table that can accept the keys listed below: