pkg/core/tunhandler.go
Function transportTun
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func transportTun(ctx context.Context, tunInbound <-chan *DataElem, tunOutbound chan<- *DataElem, packetConn net.PacketConn, routeMapUDP *RouteMap, routeMapTCP *sync.Map) error {
Function heartbeats
has 5 return statements (exceeds 4 allowed). Open
Open
func heartbeats(ctx context.Context, tun net.Conn) {
conn, err := util.GetTunDeviceByConn(tun)
if err != nil {
log.Errorf("Failed to get tun device: %s", err.Error())
return