Cloudflare uses the same set of IPs across all applications for egress, you can whitelist the follow
Cloudflare uses the same set of IPs across all applications for egress, you can whitelist the following IPs: https://www.cloudflare.com/en-au/ips/



wrangler containers images listX
•11/15/25, 12:27 AM



X
•11/17/25, 3:30 PM
const containerInstance = await getRandom(
env.API_CONTAINER,
INSTANCE_COUNT
);import { DurableObject } from 'cloudflare:workers';
export class ApiContainer extends DurableObject<Env> {
container: globalThis.Container;
monitor?: Promise<unknown>;
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env);
this.container = ctx.container!;
void this.ctx.blockConcurrencyWhile(async () => {
if (!this.container.running) this.container.start({
enableInternet: false,
workersAddress: '10.0.0.2:8080',
env: {
GOOGLE_CLIENT_ID: env.GOOGLE_CLIENT_ID
}
});
});
}
async fetch(req: Request) {
try {
return await this.container.getTcpPort(8080).fetch(req.url.replace('https:', 'http:'), req);
} catch (err: any) {
return new Response(`${this.ctx.id.toString()}: ${err.message}`, { status: 500 });
}
}
}
export default {
async fetch(request, env): Promise<Response> {
try {
return await env.API_CONTAINER.get(env.API_CONTAINER.idFromName(request.url)).fetch(request);
} catch (err: any) {
console.error('Error fetch:', err.message);
return new Response(err.message, { status: 500 });
}
},
} satisfies ExportedHandler<Env>;override async onContainerRequest(request: Request) {
// call KV, R2, etc if path starts with /cfservices
}