in arXiv:math/0212266, Moerdijk defines a torsor to be a sheaf $\mathcal{S}$ on $X$ with a freely transitive left-action of a sheaf of groups $\mathcal{G}$, such that $X =\bigcup \{ U \in \mathbf{Open}(X), \mathcal{S}(U) \neq \emptyset\}$. I was thinking if one can associate (functorially) a (locally trivial) $G$-principal bundle for some group or, maybe, groupoid $G$ (or, even a family of groupoids) from a given torsor.

For a $G$-principal bundle, one can always make the reverse way, by picking the sheaf of sections and the cocycles as the sheaf of group. However, the fibers of the étale space are discrete, so I don´t know exactly how to recover $G$ and its topology. Is there any known result like this? How is this functor?

Thanks in advance.