tewarid/node-tcp-proxy

View on GitHub

Showing 3 of 5 total issues

Function handleAuth has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

TcpProxy.prototype.handleAuth = function(proxySocket) {
    var self = this;
    if (self.allowedIPs.includes(proxySocket.remoteAddress)) {
        self.handleClient(proxySocket);
        return;
Severity: Minor
Found in tcp-proxy.js - About 1 hr to fix

    Function TcpProxy has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function TcpProxy(proxyPort, serviceHost, servicePort, options) {
        this.proxyPort = proxyPort;
        this.serviceHosts = parse(serviceHost);
        this.servicePorts = parse(servicePort);
        this.serviceHostIndex = -1;
    Severity: Minor
    Found in tcp-proxy.js - About 1 hr to fix

      Function createServiceSocket has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      TcpProxy.prototype.createServiceSocket = function(context) {
          var self = this;
          var options = self.parseServiceOptions(context);
          if (self.options.tls === "both") {
              context.serviceSocket = tls.connect(options, function() {
      Severity: Minor
      Found in tcp-proxy.js - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language