Skip to content

Make WATER composable #79

@fortuna

Description

@fortuna

Currently Water is tied to the standard transport protocols (TCP/UDP). This forces the implementation to depend on system calls to do sockets, with security implications, and prevents the composability of transports. Water can't use other transports for multi-hop, and remote measurement for instance. It would be great to do Water over SOCKS5 on a remote server I own. Remote measurements can open up new possibilities to evaluate the performance of Water, for instance.

The composability will also allow the use of external transports, possibly written in other languages.

We will likely need to standardize on some sort of "C" api, so that you can inject the external transport and use that for composability.

There are many ways to do that. I'm not sure what would be best. I'll share a few examples.

OpenSSL uses the BIO type:

A BIO is an I/O abstraction, it hides many of the underlying I/O details from an application. If an application uses a BIO for its I/O it can transparently handle SSL connections, unencrypted network connections and file I/O.

That encapsulates the connection, so the TLS library doesn't need to depend on TCP/UDP and allows for composability.
https://docs.openssl.org/1.1.1/man3/SSL_set_bio/

LibreSSL has tls_connect_cbs, which takes read and write callbacks, also allowing for composition.

Envoy has an IoHandle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions