Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make WATER composable #79

Open
fortuna opened this issue Oct 11, 2024 · 0 comments
Open

Make WATER composable #79

fortuna opened this issue Oct 11, 2024 · 0 comments

Comments

@fortuna
Copy link

fortuna commented Oct 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant