Skip to content

Commit

Permalink
Include header file order
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Oct 29, 2023
1 parent 8bc3476 commit 77181ad
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 57 deletions.
11 changes: 6 additions & 5 deletions example/http_proxy_client/http_proxy_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#include "proxy/http_proxy_client.hpp"
#include "proxy/logging.hpp"

#include "proxy/use_awaitable.hpp"

#include <boost/asio/io_context.hpp>
#include <boost/asio/co_spawn.hpp>
#include <boost/asio/detached.hpp>

#include <boost/program_options.hpp>

#include "proxy/http_proxy_client.hpp"
#include "proxy/logging.hpp"

#include "proxy/use_awaitable.hpp"


namespace net = boost::asio;
using namespace proxy;

Expand Down
15 changes: 9 additions & 6 deletions example/nested_proxy/nested_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#include "proxy/socks_client.hpp"
#include "proxy/http_proxy_client.hpp"
#include "proxy/proxy_server.hpp"
#include "proxy/logging.hpp"

#include "proxy/use_awaitable.hpp"
#include <memory>


#include <boost/asio/io_context.hpp>
#include <boost/asio/co_spawn.hpp>
#include <boost/asio/detached.hpp>

#include <memory>

#include "proxy/socks_client.hpp"
#include "proxy/http_proxy_client.hpp"
#include "proxy/proxy_server.hpp"
#include "proxy/logging.hpp"

#include "proxy/use_awaitable.hpp"

namespace net = boost::asio;
using namespace proxy;
Expand Down
11 changes: 6 additions & 5 deletions example/socks_client/socks_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#include "proxy/socks_client.hpp"
#include "proxy/logging.hpp"

#include "proxy/use_awaitable.hpp"

#include <boost/asio/io_context.hpp>
#include <boost/asio/co_spawn.hpp>
#include <boost/asio/detached.hpp>

#include <boost/program_options.hpp>

#include "proxy/socks_client.hpp"
#include "proxy/logging.hpp"

#include "proxy/use_awaitable.hpp"


namespace net = boost::asio;
using net::ip::tcp;
using namespace proxy;
Expand Down
18 changes: 11 additions & 7 deletions proxy/include/proxy/async_connect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
#ifndef INCLUDE__2023_10_18__ASYNC_CONNECT_HPP
#define INCLUDE__2023_10_18__ASYNC_CONNECT_HPP


#include <iterator>
#include <atomic>
#include <utility>
#include <memory>
#include <vector>
#include <tuple>
#include <type_traits>


#include <boost/asio/dispatch.hpp>
#include <boost/asio/connect.hpp>
#include <boost/asio/ip/tcp.hpp>
Expand All @@ -23,13 +33,7 @@
#include <boost/smart_ptr/make_local_shared.hpp>
#include <boost/smart_ptr/weak_ptr.hpp>

#include <iterator>
#include <atomic>
#include <utility>
#include <memory>
#include <vector>
#include <tuple>
#include <type_traits>
#include <boost/system/error_code.hpp>


namespace asio_util {
Expand Down
5 changes: 3 additions & 2 deletions proxy/include/proxy/base_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#ifndef INCLUDE__2023_10_18__BASE_STREAM_HPP
#define INCLUDE__2023_10_18__BASE_STREAM_HPP


#include <type_traits>

#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ip/udp.hpp>
#include <boost/variant2.hpp>
Expand All @@ -17,8 +20,6 @@
#include <boost/asio/any_io_executor.hpp>
#include <boost/asio/ssl.hpp>

#include <type_traits>


namespace util {
namespace net = boost::asio;
Expand Down
11 changes: 6 additions & 5 deletions proxy/include/proxy/http_proxy_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
#define INCLUDE__2023_10_18__HTTP_PROXY_CLIENT_HPP


#include "proxy/use_awaitable.hpp"
#include "proxy/strutil.hpp"
#include <cstdlib>
#include <string>
#include <memory>


#include <boost/system/error_code.hpp>

Expand All @@ -40,10 +42,9 @@
# pragma warning(pop)
#endif

#include <cstdlib>
#include <string>
#include <memory>

#include "proxy/use_awaitable.hpp"
#include "proxy/strutil.hpp"

namespace proxy {

Expand Down
31 changes: 16 additions & 15 deletions proxy/include/proxy/proxy_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@
#ifndef INCLUDE__2023_10_18__PROXY_SERVER_HPP
#define INCLUDE__2023_10_18__PROXY_SERVER_HPP


#include "proxy/use_awaitable.hpp"
#include "proxy/scoped_exit.hpp"
#include "proxy/async_connect.hpp"
#include "proxy/logging.hpp"
#include "proxy/base_stream.hpp"
#include "proxy/default_cert.hpp"
#include "proxy/fileop.hpp"
#include "proxy/strutil.hpp"

#include "proxy/socks_enums.hpp"
#include "proxy/socks_client.hpp"
#include "proxy/http_proxy_client.hpp"
#include "proxy/socks_io.hpp"

#include <memory>
#include <string>
#include <array>
Expand Down Expand Up @@ -65,6 +50,22 @@
#include <fmt/xchar.h>
#include <fmt/format.h>


#include "proxy/use_awaitable.hpp"
#include "proxy/scoped_exit.hpp"
#include "proxy/async_connect.hpp"
#include "proxy/logging.hpp"
#include "proxy/base_stream.hpp"
#include "proxy/default_cert.hpp"
#include "proxy/fileop.hpp"
#include "proxy/strutil.hpp"

#include "proxy/socks_enums.hpp"
#include "proxy/socks_client.hpp"
#include "proxy/http_proxy_client.hpp"
#include "proxy/socks_io.hpp"


namespace proxy {

namespace net = boost::asio;
Expand Down
13 changes: 7 additions & 6 deletions proxy/include/proxy/socks_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
#define INCLUDE__2023_10_18__SOCKS_CLIENT_HPP


#include "proxy/socks_error_code.hpp"
#include "proxy/socks_enums.hpp"
#include "proxy/socks_io.hpp"

#include "proxy/use_awaitable.hpp"

#include <cstdlib>
#include <string>
#include <memory>
Expand All @@ -34,6 +28,13 @@
#include <boost/asio/write.hpp>


#include "proxy/socks_error_code.hpp"
#include "proxy/socks_enums.hpp"
#include "proxy/socks_io.hpp"

#include "proxy/use_awaitable.hpp"


namespace proxy {

namespace net = boost::asio;
Expand Down
15 changes: 9 additions & 6 deletions server/proxy_server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#include "proxy/proxy_server.hpp"
#include "proxy/socks_client.hpp"
#include "proxy/logging.hpp"

#include "proxy/use_awaitable.hpp"

#include <boost/asio/io_context.hpp>
#include <boost/asio/co_spawn.hpp>
Expand All @@ -22,10 +17,18 @@
#include <boost/program_options.hpp>
namespace po = boost::program_options;

#include <filesystem>
namespace fs = std::filesystem;

#include "proxy/proxy_server.hpp"
#include "proxy/socks_client.hpp"
#include "proxy/logging.hpp"

#include "proxy/use_awaitable.hpp"

#include "main.hpp"

namespace net = boost::asio;
namespace fs = std::filesystem;
using namespace proxy;

using server_ptr = std::shared_ptr<proxy_server>;
Expand Down

0 comments on commit 77181ad

Please sign in to comment.