I use a vpn with tun device on my macos, and when I tested the example code, the OutofMemory error constantly repeated, and it was caused by sysctl of getting the messages on MacOs. After digging into golang's network library, I found that it's a common issue, and can be solved by retry.
I use a vpn with tun device on my macos, and when I tested the example code, the OutofMemory error constantly repeated, and it was caused by
sysctl
of getting the messages on MacOs. After digging into golang's network library, I found that it's a common issue, and can be solved by retry.See: https://github.com/golang/net/blob/ec05fdcd71141c885f3fb84c41d1c692f094ccbe/route/route.go#L126