WIP: proxy_support #3

Draft
sectapunterx wants to merge 6 commits from proxy_support into main
Showing only changes of commit dcd0619d40 - Show all commits

View file

@ -99,8 +99,11 @@ TEST(Socks5ProxyTest, ConnectViaProxy) {
expected_request[req_len++] = static_cast<std::uint8_t>(network_order_port & 0xFF); expected_request[req_len++] = static_cast<std::uint8_t>(network_order_port & 0xFF);
std::string expected_data = expected_greeting; std::string expected_data = expected_greeting;
expected_data.append(reinterpret_cast<const char*>(expected_request.data()), req_len); auto transformed_view = expected_request | std::views::take(req_len) | std::views::transform([](std::uint8_t byte) {
return static_cast<char>(byte);
});
expected_data.append(std::ranges::to<std::string>(transformed_view));
EXPECT_EQ(sent_data, expected_data); EXPECT_EQ(sent_data, expected_data);
co_return; co_return;