kubenetworks/kubevpn

View on GitHub
pkg/core/gvisortcpforwarder.go

Summary

Maintainability
A
1 hr
Test Coverage

Function TCPForwarder has 55 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func TCPForwarder(s *stack.Stack) func(stack.TransportEndpointID, *stack.PacketBuffer) bool {
    GvisorTCPForwardAddr := GvisorTCPForwardAddr
    return tcp.NewForwarder(s, 0, 100000, func(request *tcp.ForwarderRequest) {
        defer request.Complete(false)
        id := request.ID()
Severity: Minor
Found in pkg/core/gvisortcpforwarder.go - About 1 hr to fix

    Function ParseProxyInfo has 7 return statements (exceeds 4 allowed).
    Open

    func ParseProxyInfo(conn net.Conn) (id stack.TransportEndpointID, err error) {
        var n int
        var port = make([]byte, 2)
    
        // local port
    Severity: Major
    Found in pkg/core/gvisortcpforwarder.go - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status