The hamiltonian of this system is quite simply the sum of hamiltonian of hydrogen atom and wall potentials for two particles:
$$
H = \frac{1}{2 m_1} p_1^2 + \frac{1}{2 m_2} p_2^2 - \frac{e^2}{|\mathbf{r}_1-\mathbf{r}_2|} + V^\text{box}_1(r_1)+V^\text{box}_2(r_2),
$$
where $V^\text{box}$ are the confining box potentials. For impenetrable box we can set $V^\text{box}_1(r)=V^\text{box}_2(r)=\infty \cdot \theta(r - R)$, with $\theta$ the Heaviside function.
Additionally, if there is considerable difference in masses $m_1$ and $m_2$ (like for masses of proton and electron) the problem could be essentially reduced to a motion of a single electron while the proton sits at the center of the cavity, essentially (after separating the angular variables) giving the following one dimensional Schrödinger equation:
\begin{equation}
\left[ -\frac{d^{2}}{dr^{2}}+\frac{l(l+1)}{r^{2}}-\frac{A}{r}\right] \psi
(r)=E\psi (r),~\psi (0)=\psi (R)=0
\end{equation}
This problem could be easily analyzed using variety of methods.
Additional degeneracy of hydrogen atom associated with conserved Lenz vector usually disappears in this problem, however for some specific values of $R$ this degeneracy reappears.
There is quite a lot of literature on this problem. The first results go back to 1937:
Michels, A., J. De Boer, and A. Bijl. "Remarks concerning molecural interaction and their influence on the polarisability." Physica 4.10 (1937): 981-994.
For the overview of results let us look at one of the recent papers:
Ciftci, H., Hall, R. L., & Saad, N. "Study of a confined hydrogen‐like atom by the asymptotic iteration method." International Journal of Quantum Chemistry 109.5 (2009): 931-937. Arxiv:0807.4135.
From it we learn:
The concept of a confined quantum system goes back to the early work of Michels et al [1]
who studied the properties of an atomic system under very high pressures. They suggested to replace the interaction of the atoms with surrounding atoms by a uniform pressure on a sphere within which the atom is considered to be en closed. This led them to consider the
problem of hydrogen with modified external boundary conditions [2]. Since then, the
confined hydrogen atom attracted widespread attention [2]-[33].
[...]
Many researchers have carried out accurate calculations of eigenvalues of the confined hydrogen atom using various techniques. Some of these are variational methods [18]-[27], finite element methods [28], and algebraic methods [29].
The authors then present analysis of the problem, including exact solutions for some specific values of $R$.
Another approach (originally by Wigner) to the problem of confined hydrogen atom is to start with free particle(s) in a box and use the Coulomb potential as a perturbation, obtaining the expansion in terms of $e^2$. This method is explained in:
Aguilera-Navarro, V. C., W. M. Kloet, and A. H. Zimerman. "Application of the Rayleigh-Schrödinger perturbation theory to hydrogen atom". Instituto de Fisica Teorica, Sao Paulo, Brazil, 1971. online version
This method is useful for small values of $R$ however the limit $R \to \infty$ presents porblems:
By numerical computation we found that in the
perturbation series for the energy the sign of each term
(with the exception of the unperturbed energy) is
always negative, making it in our opinion improbable that the series
is convergent for $R \to \infty$
(in Wigner's paper [1] the possibility is discussed that, although
each term in the perturbation series from the third order on
in $e^2$ is more and more divergent for $R\to \infty$, the
whole series could converge to the actual value as $R\to \infty$).