mirror of
https://github.com/KumoCorp/kumomta.git
synced 2026-08-19 16:01:08 +00:00
1690e6526a
We're keeping a reference to it via kumo.start_proxy_listener briefly, just in case someone is using that live somewhere. We don't need to changelog this, as this whole feature hasn't been in a stable tag yet. refs: https://github.com/KumoCorp/kumomta/pull/472
691 B
691 B
proxy_init
{{since('dev')}}
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)