Verified Commit 9c6d9a79 authored by Marc Vef's avatar Marc Vef
Browse files

Added Proxy

parent e83e86d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
[submodule "external/hermes"]
	path = external/hermes
	url = https://github.com/gekkofs/hermes.git
	url = https://github.com/marcvef/hermes.git
[submodule "tests/scripts/bats"]
	path = tests/scripts/bats
	url = https://github.com/bats-core/bats-core.git
+3 −0
Original line number Diff line number Diff line
@@ -32,5 +32,8 @@ add_subdirectory(common)
add_subdirectory(daemon)
# Client library
add_subdirectory(client)
# Proxy
add_subdirectory(proxy)

target_sources(gkfs_daemon PUBLIC config.hpp version.hpp.in)
target_sources(gkfs_proxy PUBLIC config.hpp version.hpp.in)
+2 −0
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ static constexpr auto METRICS_IP_PORT = ADD_PREFIX("METRICS_IP_PORT");
#endif

static constexpr auto NUM_REPL = ADD_PREFIX("NUM_REPL");
static constexpr auto PROXY_PID_FILE = ADD_PREFIX("PROXY_PID_FILE");

} // namespace gkfs::env

#undef ADD_PREFIX
+3 −0
Original line number Diff line number Diff line
@@ -205,6 +205,9 @@ hook_fsync(unsigned int fd);
int
hook_getxattr(const char* path, const char* name, void* value, size_t size);

int
hook_lgetxattr(const char* path, const char* name, void* value, size_t size);

int
hook_fallocate(int fd, int mode, off_t offset, off_t len);

+26 −0
Original line number Diff line number Diff line
@@ -101,6 +101,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<GKFS_MAX_INTERNAL_FDS> internal_fds_;
@@ -191,6 +196,27 @@ public:
    relativize_path(const char* raw_path, std::string& relative_path,
                    bool resolve_last_link = true) const;

    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();

    const std::shared_ptr<gkfs::filemap::OpenFileMap>&
    file_map() const;

Loading