Assume we are working in special relativity with $D+1$ dimensional spacetime. Suppose we have an inertial coordinate system $(x^{\mu})$, so objects that don't interact with anything move in uniform motion according to these coordinates. If we can determine another coordinate system where the metric $g$ is known, and if we know how to transform between the old and new coordinate systems, then we can determine $g$ in the original coordinates.
Since the metric is symmetric (i.e. $g_{\mu\nu} = g_{\nu\mu}$), there are
$$ \binom{D+1}{2}+(D+1) = \frac{(D+1)(D+2)}{2} $$
many degrees of freedom for the metric. We can consider the following parts of $g$:
- $g_{00}$
- $g_{ii}$ and $g_{i0}$
- $g_{ij}$ where $i < j$.
The first bullet describes only one component, the second bullet describes $2D$ many components, and the last bullet describes $\binom{D}{2} = D(D-1)/2$ many components. In total, we describe
$$ 1 + 2D + \frac{D(D-1)}{2} = \frac{(D+1)(D+2)}{2} $$
many components, which is exactly the number of degrees of freedom of $g$.
For each component, we will either transform coordinates so that the component is eliminated, or we will set up a system of equations that will allow us to determine the values of components.
We will proceed in three steps.
Part 1. Let $g_{S} = g_{ij}dx^{i}dx^{j}$ be the spatial part of $g$. We will find a new coordinate system in which $g_{S}$ is diagonalized. To do this we will exploit the Lorentz force law as follows. Send a stream of electrons in any direction. By applying an (approximately) uniform magnetic field to the electron beam in various ways, we are able to find/construct spatial axes that are orthogonal to one another according to $g_{S}$. This gives us a new system $(y^{i})$ of coordinates in which
$$ g_{S} = g'_{11}dy^{1}dy^{1} + \cdots + g'_{DD}dy^{D}dy^{D} $$ for some reals $g'_{11}, \ldots, g'_{DD}$.
By transforming from $(x^{\mu}) = (x^{0}, x^{i})$ to $(y^{\mu}) = (x^{0}, y^{i})$, we obtain $g = g'_{\mu\nu}dy^{\mu}dy^{\nu}$ where $g'_{ij} = 0$ for all $i\ne j$.
The components $g'_{ij}$ with $i < j$ are determined to be zero.
This leaves us with the remaining $2D+1$ components to be determined.
Part 2. To determine the rest of the coefficients, we proceed as follows. We assume that the two-way speed of light is always $c=1$, but for the sake of generality we won't assume a fixed one-way speed of light in coordinates $(y^{\mu})$.
The one-way speed of light in a direction can be found by sending a light signal from the origin of our coordinates to a clock at a distance $L$ from the origin (according to our coordinates). Then we take
$$ \frac{L}{(\text{receiver clock at reception}) - (\text{transmitter clock at transmission})}, $$
and this will be the one-way speed of light according to the $(y^{\mu})$-coordinates. Hence the one-way speed of light in any direction is a known quantity.
For each index $i$ where $1\le i\le D$, we let $c_{+}^{i} > 0$ be the one-way speed of light in direction $+y^{i}$ and let $c_{-}^{i} < 0$ be the (negative of the) one-way speed of light in direction $-y^{i}$. Let $1\le k\le D$ and consider shooting two light beams in the $+y^{k}$ and the $-y^{k}$ directions.
For light beams going to the $\pm y^{k}$ directions,
$$ dy^{k}/c_{\pm}^{k} = dy^{0} \qquad\text{ and }\qquad dy^{i} = 0 \;\text{ for }\; i\ne k. $$
If $c_{+}^{k}$ is infinite, then any fraction with an infinite denominator is interpreted to equal zero.
Likewise for $c_{-}^{k}$.
Knowing that $ds^{2} = 0$ for null geodesics, we find
\begin{align*}
0 &= g'_{\mu\nu}dy^{\mu}dy^{\nu} \\[1.0ex]
&= g'_{00}dy^{0}dy^{0} + g'_{k0}dy^{0}dy^{k} + g'_{0k}dy^{k}dy^{0} + g'_{kk}dy^{k}dy^{k} \\[1.0ex]
&= \left[ g'_{00}/(c_{\pm}^{k})^{2} + 2g'_{k0}/c_{\pm}^{k} + g'_{kk} \right] dy^{k}dy^{k}.
\end{align*}
Since $dy^{k}$ is nonzero for light beams moving in the $\pm y^{k}$ directions, we obtain
\begin{align*}
0 &= g'_{00}/(c_{+}^{k})^{2} + 2g'_{k0}/c_{+}^{k} + g'_{kk}, \\
0 &= g'_{00}/(c_{-}^{k})^{2} + 2g'_{k0}/c_{-}^{k} + g'_{kk}
\end{align*}
for $1\le k\le D$.
This provides $2D$ equations that are linear in the metric components.
Part 3. Lastly, consider the time interval from $y^{0} = 0$ to $y^{0} = 1$, and set $g'_{00}$ to be the negative square of the time $T$ elapsed there, so that $g'_{00} = -T^{2}$.
From parts 2 and 3, we obtain $2D+1$ many equations with $2D+1$ components to solve for. Without proof, I claim this is a solvable system of equations, and so all components $g'_{\mu\nu}$ are known in the $(y^{\mu})$-coordinates.
By transforming back to the $(x^{\mu})$-coordinates, we find $g_{\mu\nu}$'s in the original coordinate system, as desired.