[proofplan]
We first check that the exit value $f(W_{\tau_U})$ is a well-defined bounded random variable. The existing Brownian Dirichlet theorem then gives harmonicity of $u$ in the interior. The regular-boundary hypothesis is exactly the statement that harmonic measure tends to a point mass at each boundary point, and this turns the interior harmonic function into a continuous extension with boundary values $f$. Uniqueness follows from the maximum-principle uniqueness theorem for the Dirichlet problem.
[/proofplan]
[step:Verify that Brownian motion exits through the boundary in finite time]
Fix $x\in U$. Since $U$ is bounded, choose $R>0$ such that $U\subset B(0,R)$. If $\tau_U=\infty$, then $W_t\in U\subset B(0,R)$ for every $t\ge0$. Therefore, for every $t>0$,
\begin{align*}
\mathbb P^x(\tau_U=\infty)\le \mathbb P^x(W_t\in B(0,R)).
\end{align*}
The random vector $W_t$ has Gaussian density
\begin{align*}
y\mapsto \frac{1}{(2\pi t)^{n/2}}\exp\left(-\frac{|y-x|^2}{2t}\right)
\end{align*}
with respect to $\mathcal L^n$, so
\begin{align*}
\mathbb P^x(W_t\in B(0,R))
=\int_{B(0,R)}\frac{1}{(2\pi t)^{n/2}}\exp\left(-\frac{|y-x|^2}{2t}\right)\,d\mathcal L^n(y)
\le \frac{\mathcal L^n(B(0,R))}{(2\pi t)^{n/2}}.
\end{align*}
Letting $t\to\infty$ gives $\mathbb P^x(\tau_U=\infty)=0$.
Because Brownian paths are continuous and $U$ is open, the first point outside $U$ lies in $\partial U$ almost surely:
\begin{align*}
W_{\tau_U}\in\partial U\qquad\mathbb P^x\text{-almost surely}.
\end{align*}
Since $\partial U$ is compact and $f:\partial U\to\mathbb R$ is continuous, there is a constant $M_f\ge0$ such that
\begin{align*}
|f(y)|\le M_f\qquad\text{for every }y\in\partial U.
\end{align*}
Thus $f(W_{\tau_U})$ is bounded and measurable, and $u(x)=\mathbb E^x[f(W_{\tau_U})]$ is well-defined for every $x\in U$.
[/step]
[step:Apply Brownian Dirichlet harmonicity in the interior]
The theorem [Harmonicity of the Brownian Dirichlet Solution](/theorems/1186) applies with $D=U$ and $\varphi=f$. Its hypotheses are satisfied because $U$ is a bounded domain and $f$ is continuous on the compact set $\partial U$, hence bounded and Borel measurable. Therefore the function
\begin{align*}
u:U&\to\mathbb R\\
x&\mapsto \mathbb E^x[f(W_{\tau_U})]
\end{align*}
is harmonic on $U$:
\begin{align*}
\Delta u=0\qquad\text{in }U.
\end{align*}
In particular, by the interior regularity of harmonic functions, equivalently by [Harmonic Functions are Smooth](/theorems/36) applied to the mean-value property supplied in the proof of the Brownian Dirichlet theorem, we have
\begin{align*}
u\in C^2(U).
\end{align*}
[/step]
[step:Use regular boundary to prove continuity up to $\partial U$]
Let $z\in\partial U$. By the regular-boundary hypothesis, the harmonic measures $\omega_U^x$ converge weakly to $\delta_z$ on $\partial U$ as $x\to z$ with $x\in U$. Since $f:\partial U\to\mathbb R$ is continuous and bounded, [weak convergence](/page/Weak%20Convergence) gives
\begin{align*}
\lim_{\substack{x\to z\\ x\in U}}\int_{\partial U}f(y)\,d\omega_U^x(y)
=\int_{\partial U}f(y)\,d\delta_z(y)
=f(z).
\end{align*}
By definition of $\omega_U^x$ as the law of $W_{\tau_U}$ under $\mathbb P^x$,
\begin{align*}
\int_{\partial U}f(y)\,d\omega_U^x(y)=\mathbb E^x[f(W_{\tau_U})]=u(x).
\end{align*}
Hence
\begin{align*}
\lim_{\substack{x\to z\\ x\in U}}u(x)=f(z).
\end{align*}
Since $z\in\partial U$ was arbitrary and we set $u=f$ on $\partial U$, the extended function belongs to $C(\overline U)$.
[/step]
[step:Conclude uniqueness from the Dirichlet maximum principle]
Let $v\in C(\overline U)\cap C^2(U)$ satisfy
\begin{align*}
\Delta v=0\qquad\text{in }U,
\qquad
v=f\qquad\text{on }\partial U.
\end{align*}
The function $u$ is continuous on $\overline U$, harmonic on $U$, and agrees with $f$ on $\partial U$. The [Uniqueness for the Dirichlet Problem via Maximum Principle](/theorems/1187) applies because $U$ is bounded and both $u$ and $v$ are continuous on $\overline U$, harmonic in $U$, and equal on $\partial U$. Therefore
\begin{align*}
v=u\qquad\text{on }\overline U.
\end{align*}
This proves that the Brownian representation is the unique member of $C(\overline U)\cap C^2(U)$ solving the stated Dirichlet problem.
[/step]