Geofront 的 TypeScript API 通过命名空间 Geofront
与类 GeofrontProxy
暴露。
import { Geofront } from 'geofront-ts'
const proxy = Geofront.createProxy()
proxy.setRouter(ctx => ({ target: { host: '127.0.0.1', port: 25565 } }))
await proxy.listen({ host: '0.0.0.0', port: 25565 })