Verified Commit 7f5c1602 authored by Marc Vef's avatar Marc Vef
Browse files

Added data proxy

parent 12f25c51
Loading
Loading
Loading
Loading
+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
+2 −0
Original line number Diff line number Diff line
@@ -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)

+1 −0
Original line number Diff line number Diff line
@@ -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

+26 −0
Original line number Diff line number Diff line
@@ -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_;
@@ -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,
+9 −1
Original line number Diff line number Diff line
@@ -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 {
@@ -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