proxy_support #3

Merged
sha512sum merged 1 commit from proxy_support into main 2024-11-26 16:06:03 +00:00
Member
  • Added Http, Socks5, System Configured proxy support
  • Added tests for ConnectViaProxy()
- Added Http, Socks5, System Configured proxy support - Added tests for ConnectViaProxy()
sectapunterx added 13 commits 2024-11-17 11:38:11 +00:00
sha512sum force-pushed proxy_support from 28147ee0e3 to 479c3b628b 2024-11-17 13:27:28 +00:00 Compare
sha512sum requested changes 2024-11-17 13:35:35 +00:00
Dismissed
sha512sum left a comment
Owner

No proxy using in ClientCreateVisitor

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
Owner

??????

??????
sha512sum marked this conversation as resolved
@ -63,3 +63,3 @@
printf "\n\tLaunch GTests to check\n"
./larra_xmpp_tests --gtest_brief=1
# ./larra_xmpp_tests --gtest_brief=1
Owner

?????

?????
sha512sum marked this conversation as resolved
.gitignore Outdated
@ -33,0 +40,4 @@
#/.idea/codeStyles/Project.xml
#/.idea/vcs.xml
/.idea/
.githooks/
Owner

Why .githooks ???

Why .githooks ???
sha512sum marked this conversation as resolved
@ -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);
Owner

Code style. Use camelCase

Code style. Use camelCase
sha512sum marked this conversation as resolved
@ -160,0 +175,4 @@
// статус ответа
std::istream response_stream(&response);
std::string http_version;
Owner

camelCase

camelCase
sha512sum marked this conversation as resolved
@ -160,0 +263,4 @@
constexpr std::uint16_t kHttpPort = 8080;
return GetProxySettings<HttpProxy>(proxyEnv, kHttpPort);
}
if(const char* proxy_env = std::getenv("socks_proxy")) {
Owner

camelCase

camelCase
sha512sum marked this conversation as resolved
tests/proxy.cpp Outdated
@ -0,0 +28,4 @@
mock_socket.AddReceivedData(proxy_response);
bool connect_successful = false;
Owner

camelCase

camelCase
sha512sum marked this conversation as resolved
tests/proxy.cpp Outdated
@ -0,0 +58,4 @@
larra::xmpp::impl::MockSocket socket{executor};
// expected server responses
std::string server_response;
Owner

camelCase

camelCase
sha512sum marked this conversation as resolved
tests/proxy.cpp Outdated
@ -0,0 +121,4 @@
setenv("http_proxy", "http://proxy_host:8080", 1);
std::string target_host = "target_host";
uint16_t target_port = 80;
Owner

camelCase

camelCase
sha512sum marked this conversation as resolved
tests/proxy.cpp Outdated
@ -0,0 +163,4 @@
HttpProxy proxy{"proxy_host", 8080};
std::string target_host = "target_host";
uint16_t target_port = 80;
Owner

camelCase

camelCase
sha512sum marked this conversation as resolved
sectapunterx added 1 commit 2024-11-18 21:10:45 +00:00
Refactoring
All checks were successful
PR Check / on-push-commit-check (push) Successful in 11m29s
760bc2ab68
Owner

Still no proxy using in ClientCreateVisitor

Still no proxy using in ClientCreateVisitor
sha512sum requested changes 2024-11-19 14:03:04 +00:00
Dismissed
.gitignore Outdated
@ -33,0 +34,4 @@
#/.idea/discord.xml
#/.idea/editor.xml
#/.idea/larra.iml
#/.idea/material_theme_project_new.xml
Owner

Why commented in commit ?

Why commented in commit ?
sha512sum marked this conversation as resolved
@ -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);
// статус ответа
Owner

Meaningless comments, variable names reflect what they contain. No need to duplicate. And use English for comments in code

Meaningless comments, variable names reflect what they contain. No need to duplicate. And use English for comments in code
sha512sum marked this conversation as resolved
sectapunterx added 1 commit 2024-11-21 15:46:36 +00:00
Refactoring
All checks were successful
PR Check / on-push-commit-check (push) Successful in 12m7s
665ceb9604
sectapunterx added 2 commits 2024-11-23 17:00:12 +00:00
sectapunterx changed title from WIP: proxy_support to proxy_support 2024-11-23 17:04:48 +00:00
sectapunterx added 1 commit 2024-11-23 17:23:12 +00:00
Successful connection using Connect() overload for proxy
Some checks failed
PR Check / on-push-commit-check (push) Failing after 11m48s
5d64a8ca26
sectapunterx added 1 commit 2024-11-23 17:42:36 +00:00
[clang-tidy fixes] Successful connection using Connect() overload for proxy
All checks were successful
PR Check / on-push-commit-check (push) Successful in 11m53s
9f408fd4b8
sectapunterx added 1 commit 2024-11-23 18:02:03 +00:00
[clang-tidy fixes] Successful connection using Connect() overload for proxy
Some checks failed
PR Check / on-push-commit-check (push) Has been cancelled
e1993511ac
sectapunterx added 1 commit 2024-11-23 18:11:59 +00:00
[clang-tidy fixes] Successful connection using Connect() overload for proxy
All checks were successful
PR Check / on-push-commit-check (push) Successful in 12m12s
20e31808ba
sha512sum requested changes 2024-11-23 20:11:38 +00:00
Dismissed
@ -255,6 +427,19 @@ struct ClientCreateVisitor {
co_await boost::asio::async_connect(socket, resolveResults, boost::asio::use_awaitable);
Owner

Remove old code

Remove old code
sectapunterx added 1 commit 2024-11-23 20:26:32 +00:00
[clang-tidy fixes & reformating] Successful connection using Connect() overload for proxy
All checks were successful
PR Check / on-push-commit-check (push) Successful in 12m10s
7d6b783fe5
sha512sum requested changes 2024-11-25 11:30:21 +00:00
Dismissed
tests/proxy.cpp Outdated
@ -0,0 +82,4 @@
std::string expectedGreeting = "\x05\x01\x00";
std::array<std::uint8_t, kAvailableUdpBufferSpaceForSocks> expectedRequest{};
std::size_t req_len = 0;
Owner

camelCase

camelCase
sectapunterx added 2 commits 2024-11-25 18:03:38 +00:00
sectapunterx force-pushed proxy_support from a042bc9b66 to b563c686e1 2024-11-25 18:24:46 +00:00 Compare
sectapunterx force-pushed proxy_support from b563c686e1 to 4ad3045c1b 2024-11-26 15:35:15 +00:00 Compare
sectapunterx force-pushed proxy_support from 4ad3045c1b to 46b17dd5f5 2024-11-26 15:48:57 +00:00 Compare
sha512sum approved these changes 2024-11-26 16:05:43 +00:00
sha512sum merged commit 7f5c9cfd49 into main 2024-11-26 16:06:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Larra/larra#3
No description provided.