Jigsaw-Code / outline-go-tun2socks

Apache License 2.0
224 stars 94 forks source link

refactor: reorganize packages #115

Closed fortuna closed 1 year ago

fortuna commented 1 year ago

The two packages exposed to Go Mobile are outline/shadowsocks and outline/tun2socks. That was already the case, but this PR creates an explicit tun2socks package, and moves code into it, without exposing the moved code.

I created a connectivity package because it is needed in the different packages.

In the future we can calling Go Mobile on the outline package only, provided we move everything that needs to be exposed there. It will be nice to have the application API in one place.

This is to better understand the code and to enable https://github.com/Jigsaw-Code/outline-go-tun2socks/pull/113. The config-based NewClientFromJSON can live in the outline package.