{"size": 569, "ext": "js", "max_stars_repo_path": "example/building/v2.js", "max_stars_repo_name": "Short-io/proxy-protocol-js", "max_stars_repo_stars_event_min_datetime": "2019-04-27T06:17:18.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-26T14:34:08.000Z", "max_issues_repo_path": "example/building/v2.js", "max_issues_repo_name": "moznion/proxy-protocol-js", "max_issues_repo_issues_event_min_datetime": "2019-12-09T22:47:22.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-28T20:01:48.000Z", "max_forks_repo_path": "example/building/v2.js", "max_forks_repo_name": "Short-io/proxy-protocol-js", "max_forks_repo_forks_event_min_datetime": "2021-01-03T20:25:13.000Z", "max_forks_repo_forks_event_max_datetime": "2021-01-03T20:25:13.000Z"}
{"max_stars_count": 8, "max_issues_count": 253, "max_forks_count": 1, "avg_line_length": 33.4705882353, "max_line_length": 92, "alphanum_fraction": 0.7662565905}
const proxyProtocol = require('proxy-protocol-js');

const proto = new proxyProtocol.V2ProxyProtocol(
  proxyProtocol.Command.LOCAL,
  proxyProtocol.TransportProtocol.DGRAM,
  new proxyProtocol.IPv4ProxyAddress(
    proxyProtocol.IPv4Address.createFrom([127, 0, 0, 1]),
    12345,
    proxyProtocol.IPv4Address.createFrom([192, 0, 2, 1]),
    54321,
  ),
).build();
console.log(proto);

const identifiedProtocolVersion = proxyProtocol.ProxyProtocolIdentifier.identify(proto);
console.log(identifiedProtocolVersion); // => proxyProtocol.ProxyProtocolVersion.V2 (= 0x20)
