xjasonlyu / tun2socks

tun2socks - powered by gVisor TCP/IP stack
https://github.com/xjasonlyu/tun2socks/wiki
GNU General Public License v3.0
3.14k stars 433 forks source link

[Feature] Use netstack instead of gvisor #103

Closed abcdw closed 2 years ago

abcdw commented 2 years ago

Description

It seems that tun2socks uses only network stack part of gvisor and there is a separate package https://github.com/inetaf/netstack automatically extracted from gvisor, which can be used instead.

netstack is more lightweight and doesn't require to pull unecessary dependencies, also it makes it easier to package tun2socks by different operating system distributions.

Is this feature related to a specific bug?

No response

Do you have a specific solution in mind?

No response

xjasonlyu commented 2 years ago

Hi, thank you for your advice, but here's my opinion:

  1. gVisor is official and updates frequently
  2. pack tun2socks by different OS is already easy enough
  3. inetaf/netstack doesn't seem to always keep updated
abcdw commented 2 years ago

Seems go recieved a [1] module lazy-loading support in 1.17 and argument about lightweight isn't completely correct anymore.

Still gvisor is kinda hard to package compared to netstack, it packaged only for Fedora, NixOS and Arch. At the same time I found that netstack is deprecated, because the primary goal of the project was resolved by [1].

pack tun2socks by different OS is already easy enough

Probably not completely true, for now there is only Arch's AUR repository has tun2socks packaged: https://repology.org/project/tun2socks/versions

As I mentioned, it's very likely because of gvisor dependency, which is quite bloated and hard to package. Maybe, one day we will package it for GNU Guix :)

Anyway, thank you for the project and your hardwork, closing the issue.