TEST_P(ProxyProtocolRegressionTest, V2Basic) {
  std::string source_addr;
  Buffer::OwnedImpl buff{};
  if (GetParam() == Network::Address::IpVersion::v4) {
    source_addr = "202.168.0.13";
    generateV2Header(source_addr, "174.2.2.222", 52000, 80, Network::Address::IpVersion::v4, buff);
  } else {
    source_addr = "1:2:3::4";
    generateV2Header(source_addr, "5:6::7:8", 62000, 8000, Network::Address::IpVersion::v6, buff);
  }
  connect();

  write(buff.toString() + "more data");

  expectData("more data");

  EXPECT_EQ(server_connection_->remoteAddress()->ip()->addressAsString(), source_addr);
  EXPECT_TRUE(server_connection_->localAddressRestored());

  disconnect();
}
TEST_P(ProxyProtocolRegressionTest, V2Basic) {
  std::string source_addr;
  Buffer::OwnedImpl buff{};
  if (GetParam() == Network::Address::IpVersion::v4) {
    source_addr = "202.168.0.13";
    generateV2Header(source_addr, "174.2.2.222", 52000, 80, Network::Address::IpVersion::v4, buff);
  } else {
    source_addr = "1:2:3::4";
    generateV2Header(source_addr, "5:6::7:8", 62000, 8000, Network::Address::IpVersion::v6, buff);
  }
  connect();

  write(buff.toString() + "more data");

  expectData("more data");

  EXPECT_EQ(server_connection_->remoteAddress()->ip()->addressAsString(), source_addr);
  EXPECT_TRUE(server_connection_->localAddressRestored());

  disconnect();
}