SagerNet / sing-tun

Simple transparent proxy library
Other
113 stars 124 forks source link

应该 dup 传入的 fd? #14

Closed arror closed 1 year ago

arror commented 1 year ago

https://github.com/SagerNet/sing-tun/blob/4bc8dc7f279d2860ec4923b9ac263b86c7ce3a55/tun_darwin.go#L52

https://github.com/SagerNet/sing-tun/blob/4bc8dc7f279d2860ec4923b9ac263b86c7ce3a55/tun_linux.go#L54

秉承着谁打开谁关闭的原则,对于传入的fd需要dup一下,不知道我的想法对不对。