proxy_init
Since: Dev Builds Only
The functionality described in this section requires a dev build of KumoMTA. You can obtain a dev build by following the instructions in the Installation section.
The proxy_init event is triggered when the proxy server starts up.
Note
This event is only available to the proxy-server executable.
This is where you should configure your proxy listeners and any other initialization tasks for the proxy server.
local kumo = require 'kumo'
local proxy = require 'proxy'
kumo.on('proxy_init', function()
-- Start SOCKS5 proxy listener
proxy.start_proxy_listener {
listen = '0.0.0.0:1080',
timeout = '60 seconds',
}
-- Start HTTP listener for metrics and administration
proxy.start_http_listener {
listen = '0.0.0.0:8080',
trusted_hosts = { '127.0.0.1', '::1' },
}
end)