Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Oct 18, 2023
1 parent b3b7ff3 commit e96cd97
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions proxy/include/proxy/proxy_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ namespace proxy {
std::string doc_directory_;

// 禁用未加密 http 服务.
bool disable_noraml_http_{ false };
bool disable_http_{ false };
};

// proxy server 虚基类, 任何 proxy server 的实现, 必须基于这个基类.
Expand Down Expand Up @@ -2908,7 +2908,7 @@ Content-Length: 0
continue;
}

// socks4/5 protocol.
// plain socks4/5 protocol.
if (detect[0] == 0x05 || detect[0] == 0x04)
{
LOG_DBG << "socks protocol:"
Expand All @@ -2923,7 +2923,7 @@ Content-Length: 0

new_session->start();
}
else if (detect[0] == 0x16) // socks5 with ssl protocol.
else if (detect[0] == 0x16) // http/socks proxy with ssl crypto protocol.
{
LOG_DBG << "ssl protocol"
", connection id: " << connection_id;
Expand Down Expand Up @@ -2954,12 +2954,12 @@ Content-Length: 0
m_clients[connection_id] = new_session;

new_session->start();
}
else if (detect[0] == 0x47
|| detect[0] == 0x50
|| detect[0] == 0x43)
} // plain http protocol.
else if (detect[0] == 0x47 || // 'G'
detect[0] == 0x50 || // 'P'
detect[0] == 0x43) // 'C'
{
if (m_option.disable_noraml_http_)
if (m_option.disable_http_)
{
LOG_DBG << "http protocol"
", connection id: " << connection_id
Expand Down
2 changes: 1 addition & 1 deletion server/proxy_server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ start_proxy_server(net::io_context& ioc, server_ptr& server)
opt.ssl_dhparam_ = ssl_dhparam;
opt.ssl_sni_ = ssl_sni;

opt.disable_noraml_http_ = disable_http;
opt.disable_http_ = disable_http;
opt.reuse_port_ = reuse_port;

opt.doc_directory_ = doc_directory;
Expand Down

0 comments on commit e96cd97

Please sign in to comment.