Solution (source code)

= Solution

In the vacuum exterior, the <Tolman–Oppenheimer–Volkoff equation> gives $m'=0$, so $m(r)=M$. The remaining metric function obeys
$$
\Phi'(r)=\frac{M}{r(r-2M)}=\frac12\frac{d}{dr}\log\left(1-\frac{2M}{r}\right).
$$
Thus $e^{2\Phi}=C(1-2M/r)$. A constant rescaling of the time coordinate removes $C$; equivalently, <asymptotic flatness> fixes $C=1$ when time is normalized at infinity. Consequently \b[the exterior is the <Schwarzschild metric>]:
$$
\boxed{ds^2=-\left(1-\frac{2M}{r}\right)dt^2+\left(1-\frac{2M}{r}\right)^{-1}dr^2+r^2d\Omega^2,\qquad r>R.}
$$
The <mass> $M=m(R)$ includes the full <perfect fluid in general relativity> interior. No equation of state beyond the surface enters this vacuum result.