finds.dev← search

// the find

ashi009/bestroutetb

★ 874 · JavaScript · MIT · updated May 2016

Generating the most optimized route table for VPN users.

A CLI tool that generates minimized VPN routing tables by using dynamic programming to optimally assign IP ranges to either the default or VPN gateway. The core idea is that for any IP block not explicitly required on a specific gateway, you pick whichever assignment keeps the total route count lowest. Aimed at users with constrained routers (OpenWrt, old consumer hardware) where a full chnroutes table simply doesn't fit.

The DP minimization is genuinely clever — it provably produces the smallest possible route table for a given set of constraints, not just a heuristic reduction. The 70% size reduction over chnroutes for the China-routing use case is a real, measurable improvement that solves an actual hardware limitation. Output profiles for iproute2, OpenVPN, and macOS cover the most common targets without requiring custom format strings. The custom format system with %-tokens is flexible enough to handle edge cases the built-in profiles miss.

Last commit was May 2014 (delegation.json is bundled, stale IP allocation data from 2014). The APNIC delegation data it pulls is a decade old, meaning any routing decisions based on country-to-IP mappings are increasingly wrong. No IPv6 support — this is IPv4-only in a world that has moved on. The project is effectively abandoned; david-dm.org (the dependency badge service) is also dead, and the npm package hasn't been touched in a decade, so `npm install` may hit compatibility issues with modern Node.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →