This commit is contained in:
arm64v8a
2022-08-24 14:48:20 +08:00
parent ffef5ab07e
commit c991be78a7
2 changed files with 27 additions and 0 deletions

View File

@@ -72,6 +72,7 @@ func ServeProtect(path string, fwmark int) {
log.Println("getOneFd:", err)
return
}
defer syscall.Close(fd)
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_MARK, fwmark); err != nil {
log.Println("syscall.SetsockoptInt:", err)