let serverlist = await minetestServerlist({ bindAddr: [26537, '172.17.0.1'] }); return { services: { mintest: minetestDockerService({ container: 'minetest', serverlist, bindAddr: [30000], upstreamAddr: [31000, '127.0.0.1'], }), custom: { ports: [ { type: 'tcp', // or 'udp' bindAddr: [3532], upstreamAddr: [3535, '127.0.0.1'], async function* filter(inp, dir, conn) { // dir in {'client->server':1, 'server->client':1} for await (let chunk of inp) { yield chunk; } }, async function preread(opt) { await opt.recv(); // do something ig maybe opt.send() some data to client return true; // wake up the service; // return false will not do this and will close the connection instead } // // only if ^^^ not defined // async function* filterUpstream(inp, conn) {} // async function* filterClient(inp, conn) {} } ], powerOn: async function() {}, powerOff: async function() {}, } } }