mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-12-05 12:56:38 +00:00
12 lines
217 B
Go
12 lines
217 B
Go
|
package libbox
|
||
|
|
||
|
import "golang.org/x/sys/unix"
|
||
|
|
||
|
func getTunnelName(fd int32) (string, error) {
|
||
|
return unix.GetsockoptString(
|
||
|
int(fd),
|
||
|
2, /* #define SYSPROTO_CONTROL 2 */
|
||
|
2, /* #define UTUN_OPT_IFNAME 2 */
|
||
|
)
|
||
|
}
|