  Measuring the density of the intergalactic medium using quasar sightlines in
the epoch of reionization is challenging due to the saturation of
Lyman-$\alpha$ absorption. Near a luminous quasar, however, the enhanced
radiation creates a proximity zone observable in the quasar spectra where the
Lyman-$\alpha$ absorption is not saturated. In this study, we use $10$
high-resolution ($R\gtrsim 10,000$) $z\sim 6$ quasar spectra from the extended
XQR-30 sample to measure the density field in the quasar proximity zones. We
find a variety of environments within $3$ pMpc distance from the quasars. We
compare the observed density cumulative distribution function (CDF) with models
from the $\textit{Cosmic Reionization on Computers}$ simulation, and find a
good agreement between $1.5$ to $3$pMpc from the quasar. This region is far
away from the quasar hosts and hence approaching the mean density of the
universe, which allows us to use the CDF to set constraints on the cosmological
parameter $\sigma_8=0.6\pm0.3$. The uncertainty is mainly due to the limited
number of high-quality quasar sightlines currently available. Utilizing the
more than $>200$ known quasars at $z\gtrsim 6$, this method will allow us in
the future to tighten the constraint on $\sigma_8$ to the percent level. In the
region closer to the quasar within $1.5$ pMpc, we find the density is higher
than predicted in the simulation by $1.23 \pm 0.17$, suggesting the typical
host dark matter halo mass of a bright quasar ($M_{\rm 1450}<-26.5$) at $z\sim
6$ is $\log_{\rm 10} (M/M_\odot)=12.5^{+0.4}_{-0.7}$.
