Loading .gitmodules +1 −1 Original line number Diff line number Diff line [submodule "external/hermes"] path = external/hermes url = https://github.com/bsc-ssrg/hermes.git url = https://github.com/marcvef/hermes.git [submodule "external/fmt"] path = external/fmt url = https://github.com/fmtlib/fmt CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -201,6 +201,8 @@ include(GNUInstallDirs) add_subdirectory(src/global) # Daemon add_subdirectory(src/daemon) # Proxy add_subdirectory(src/proxy) # Client library add_subdirectory(src/client) Loading include/client/env.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ static constexpr auto HOSTS_FILE = ADD_PREFIX("HOSTS_FILE"); #ifdef GKFS_ENABLE_FORWARDING static constexpr auto FORWARDING_MAP_FILE = ADD_PREFIX("FORWARDING_MAP_FILE"); #endif static constexpr auto PROXY_PID_FILE = ADD_PREFIX("PROXY_PID_FILE"); } // namespace gkfs::env Loading include/client/preload_context.hpp +26 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,11 @@ private: std::string rpc_protocol_; bool auto_sm_{false}; // proxy stuff bool use_proxy_{false}; std::string proxy_address_str_; hermes::endpoint proxy_host_; bool interception_enabled_; std::bitset<MAX_INTERNAL_FDS> internal_fds_; Loading Loading @@ -150,6 +155,27 @@ public: void auto_sm(bool auto_sm); bool use_proxy() const; void use_proxy(bool use_proxy); const std::string& proxy_address_str() const; void proxy_address_str(const std::string& proxy_address_str); const hermes::endpoint& proxy_host() const; void proxy_host(const hermes::endpoint& proxy_host); void clear_proxy_host(); RelativizeStatus relativize_fd_path(int dirfd, const char* raw_path, std::string& relative_path, Loading include/client/preload_util.hpp +9 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ class async_engine; } extern std::unique_ptr<hermes::async_engine> ld_network_service; extern std::unique_ptr<hermes::async_engine> ld_proxy_service; // function definitions namespace gkfs::util { Loading Loading @@ -74,6 +75,13 @@ read_hosts_file(); void connect_to_hosts(const std::vector<std::pair<std::string, std::string>>& hosts); } // namespace gkfs::util void check_for_proxy(); void lookup_proxy_addr(); } // namespace util } // namespace gkfs #endif // GEKKOFS_PRELOAD_UTIL_HPP Loading
.gitmodules +1 −1 Original line number Diff line number Diff line [submodule "external/hermes"] path = external/hermes url = https://github.com/bsc-ssrg/hermes.git url = https://github.com/marcvef/hermes.git [submodule "external/fmt"] path = external/fmt url = https://github.com/fmtlib/fmt
CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -201,6 +201,8 @@ include(GNUInstallDirs) add_subdirectory(src/global) # Daemon add_subdirectory(src/daemon) # Proxy add_subdirectory(src/proxy) # Client library add_subdirectory(src/client) Loading
include/client/env.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ static constexpr auto HOSTS_FILE = ADD_PREFIX("HOSTS_FILE"); #ifdef GKFS_ENABLE_FORWARDING static constexpr auto FORWARDING_MAP_FILE = ADD_PREFIX("FORWARDING_MAP_FILE"); #endif static constexpr auto PROXY_PID_FILE = ADD_PREFIX("PROXY_PID_FILE"); } // namespace gkfs::env Loading
include/client/preload_context.hpp +26 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,11 @@ private: std::string rpc_protocol_; bool auto_sm_{false}; // proxy stuff bool use_proxy_{false}; std::string proxy_address_str_; hermes::endpoint proxy_host_; bool interception_enabled_; std::bitset<MAX_INTERNAL_FDS> internal_fds_; Loading Loading @@ -150,6 +155,27 @@ public: void auto_sm(bool auto_sm); bool use_proxy() const; void use_proxy(bool use_proxy); const std::string& proxy_address_str() const; void proxy_address_str(const std::string& proxy_address_str); const hermes::endpoint& proxy_host() const; void proxy_host(const hermes::endpoint& proxy_host); void clear_proxy_host(); RelativizeStatus relativize_fd_path(int dirfd, const char* raw_path, std::string& relative_path, Loading
include/client/preload_util.hpp +9 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ class async_engine; } extern std::unique_ptr<hermes::async_engine> ld_network_service; extern std::unique_ptr<hermes::async_engine> ld_proxy_service; // function definitions namespace gkfs::util { Loading Loading @@ -74,6 +75,13 @@ read_hosts_file(); void connect_to_hosts(const std::vector<std::pair<std::string, std::string>>& hosts); } // namespace gkfs::util void check_for_proxy(); void lookup_proxy_addr(); } // namespace util } // namespace gkfs #endif // GEKKOFS_PRELOAD_UTIL_HPP