1. Let $\angle X O Y=90^{\circ}, P$ be a point inside $\angle X O Y$, and $O P=1, \angle X O P=30^{\circ}$. Draw any line through point $P$ that intersects rays $O X$ and $O Y$ at points $M$ and $N$ respectively. Find the maximum value of $O M+O N-M N$.
1. First, construct a circle $\odot O_{1}$ passing through point $P$ and tangent to rays $O X$ and $O Y$ (tangent points are $A$ and $B$), with point $P$ on the major arc $\widehat{A B}$.

Establish a Cartesian coordinate system with rays $O X$ and $O Y$ as the $x$-axis and $y$-axis, respectively, as shown in Figure 1. Then, $P\left(\frac{\sqrt{3}}{2}, \frac{1}{2}\right)$. Let $O_{1}(a, a)$, then we have
$$
\begin{array}{l}
\left(\frac{\sqrt{3}}{2}-a\right)^{2}+\left(\frac{1}{2}-a\right)^{2} \\
=a^{2},
\end{array}
$$

which simplifies to $a^{2}-(\sqrt{3}+1) a+1=0$.
Thus, $\Delta=(\sqrt{3}+1)^{2}-4=2 \sqrt{3}$.
Therefore, $a=\frac{\sqrt{3}+1-\sqrt{2 \sqrt{3}}}{2}=\frac{\sqrt{3}+1-\sqrt{12}}{2}$ (taking the smaller root).
Since $30^{\circ}a=\frac{\sqrt{3}+1-\sqrt[4]{12}}{2}$, the tangent line to $\odot O$ passing through point $P$ intersects both rays $O X$ and $O Y$.

As shown in Figure 2, let $M N$ be the tangent line to $\odot O_{1}$ passing through point $P$, with $M$ and $N$ on rays $O X$ and $O Y$, respectively. Let $M_{1} N_{1}$ be any line passing through point $P$ and intersecting $\odot O_{1}$, with $M_{1}$ and $N_{1}$ on rays $O X$ and $O Y$, respectively.
Translate $M_{1} N_{1}$ away from point $O$ until it is tangent to $\odot O_{1}$, resulting in the line $M_{2} N_{2}$ (tangent point is $Q$), with $M_{2}$ and $N_{2}$ on rays $O X$ and $O Y$, respectively.
By the tangent segment theorem, we have
$$
\begin{array}{l}
O M_{1}+O N_{1}-M_{1} N_{1}<O M_{2}+O N_{2}-M_{2} N_{2} \\
=\left(O B+B N_{2}\right)+\left(O A+A M_{2}\right)-\left(N_{2} Q+Q M_{2}\right)=2 O A .
\end{array}
$$

Similarly, $2 O A=O M+O N-M N$.
In summary, when $M N$ is the tangent line to $\odot O_{1}$ passing through point $P$, $O M+O N-M N$ achieves its maximum value, which is $2 O A=2 a$ $=\sqrt{3}+1-\sqrt[4]{12}$.
Translating $M_{1} N_{1}$ further away,