1.autoIptables 开关
2.go.mod 调整
3.processName 调整
4.makefile 调整
5.Tun模块 部分代码调整
This commit is contained in:
MetaCubeX
2022-03-19 01:11:27 +08:00
parent c8b1050c15
commit 9270d3c475
20 changed files with 502 additions and 87 deletions

View File

@ -211,10 +211,15 @@ func resolveProcessNameByProcSearch(inode, uid int32) (string, error) {
}
func splitCmdline(cmdline []byte) string {
cmdline = bytes.Trim(cmdline, " ")
idx := bytes.IndexFunc(cmdline, func(r rune) bool {
return unicode.IsControl(r) || unicode.IsSpace(r)
})
if idx == -1 {
return filepath.Base(string(cmdline))
}
return filepath.Base(string(cmdline[:idx]))
}