proxy_support #3
Loading…
Reference in a new issue
No description provided.
Delete branch "proxy_support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
28147ee0e3
to479c3b628b
No proxy using in ClientCreateVisitor
@ -39,3 +39,3 @@
#
SHELLCHECK_RES=0
for FILE in $GIT_SCRIPT_FILES; do shellcheck -S warning $FILE; RET_CODE=$?; SHELLCHECK_RES=$(( RET_CODE + SHELLCHECK_RES )); done
# for FILE in $GIT_SCRIPT_FILES; do shellcheck -S warning $FILE; RET_CODE=$?; SHELLCHECK_RES=$(( RET_CODE + SHELLCHECK_RES )); done
??????
@ -63,3 +63,3 @@
printf "\n\tLaunch GTests to check\n"
./larra_xmpp_tests --gtest_brief=1
# ./larra_xmpp_tests --gtest_brief=1
?????
@ -33,0 +40,4 @@
#/.idea/codeStyles/Project.xml
#/.idea/vcs.xml
/.idea/
.githooks/
Why .githooks ???
@ -160,0 +171,4 @@
// ответ от прокси-сервера
boost::asio::streambuf response;
std::size_t bytes_transferred = co_await boost::asio::async_read_until(socket, response, kEndOfHeaders, boost::asio::use_awaitable);
Code style. Use camelCase
@ -160,0 +175,4 @@
// статус ответа
std::istream response_stream(&response);
std::string http_version;
camelCase
@ -160,0 +263,4 @@
constexpr std::uint16_t kHttpPort = 8080;
return GetProxySettings<HttpProxy>(proxyEnv, kHttpPort);
}
if(const char* proxy_env = std::getenv("socks_proxy")) {
camelCase
@ -0,0 +28,4 @@
mock_socket.AddReceivedData(proxy_response);
bool connect_successful = false;
camelCase
@ -0,0 +58,4 @@
larra::xmpp::impl::MockSocket socket{executor};
// expected server responses
std::string server_response;
camelCase
@ -0,0 +121,4 @@
setenv("http_proxy", "http://proxy_host:8080", 1);
std::string target_host = "target_host";
uint16_t target_port = 80;
camelCase
@ -0,0 +163,4 @@
HttpProxy proxy{"proxy_host", 8080};
std::string target_host = "target_host";
uint16_t target_port = 80;
camelCase
Still no proxy using in ClientCreateVisitor
@ -33,0 +34,4 @@
#/.idea/discord.xml
#/.idea/editor.xml
#/.idea/larra.iml
#/.idea/material_theme_project_new.xml
Why commented in commit ?
@ -160,0 +173,4 @@
boost::asio::streambuf response;
std::size_t bytesTransferred = co_await boost::asio::async_read_until(socket, response, kEndOfHeaders, boost::asio::use_awaitable);
// статус ответа
Meaningless comments, variable names reflect what they contain. No need to duplicate. And use English for comments in code
WIP: proxy_supportto proxy_support@ -255,6 +427,19 @@ struct ClientCreateVisitor {
co_await boost::asio::async_connect(socket, resolveResults, boost::asio::use_awaitable);
Remove old code
@ -0,0 +82,4 @@
std::string expectedGreeting = "\x05\x01\x00";
std::array<std::uint8_t, kAvailableUdpBufferSpaceForSocks> expectedRequest{};
std::size_t req_len = 0;
camelCase
a042bc9b66
tob563c686e1
b563c686e1
to4ad3045c1b
4ad3045c1b
to46b17dd5f5