Putting a discourse development server behind proxy seems to mess up some (but not most) URLs

That sounds like it is your problem. When you first run vagrant up look at the ports used

==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 3000 (guest) => 4000 (host) (adapter 1)
    default: 1080 (guest) => 4080 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)

If you see the “3000 => 4000” try changing your Admin → Developer port from 3000 to 4000
You may need to “rebuild HTML” posts that have the broken links in them