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

Changes for repo migration & fix dependabot security alerts #35

Merged
merged 4 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# W.A.T.E.R.: WebAssembly Transport Executables Runtime
![GitHub License](https://img.shields.io/github/license/erikziyunchi/water-rs)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ferikziyunchi%2Fwater-rs.svg?type=shield&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Ferikziyunchi%2Fwater-rs?ref=badge_shield&issueType=license) [![Build & Test Status](https://github.com/erikziyunchi/WASMable-Transport/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/erikziyunchi/WASMable-Transport/actions/workflows/rust.yml)
![GitHub License](https://img.shields.io/github/license/refraction-networking/water-rs)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frefraction-networking%2Fwater-rs.svg?type=shield&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Frefraction-networking%2Fwater-rs?ref=badge_shield&issueType=license)
[![Build & Test Status](https://github.com/refraction-networking/water-rs/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/refraction-networking/water-rs/actions/workflows/rust.yml)

<div style="width: 100%; height = 160px">
<div style="width: 75%; height: 150px; float: left;">
Expand All @@ -12,29 +13,28 @@
</div>
</div>

The Go implementation of the runtime library can be found in [water-go](https://github.com/gaukas/water). We now also support building WATM in Go, please refer to [watm](https://github.com/gaukas/watm) for examples and helper libraries interfacing Pluggable Transports-like interfaces. Official Go compiler is currently not supported ([watm#4](https://github.com/gaukas/watm/issues/4)).
The Go implementation of the runtime library can be found in [water-go](https://github.com/refraction-networking/water). We now also support building WATM in Go, please refer to [watm](https://github.com/refraction-networking/watm) for examples and helper libraries interfacing Pluggable Transports-like interfaces. Official Go compiler is currently not supported ([watm#4](https://github.com/gaukas/watm/issues/4)).
erikziyunchi marked this conversation as resolved.
Show resolved Hide resolved

### Cite our work

If you quoted or used our work in your own project/paper/research, please cite our paper [Just add WATER: WebAssembly-based Circumvention Transports](https://arxiv.org/pdf/2312.00163.pdf).
If you quoted or used our work in your own project/paper/research, please cite our paper [Just add WATER: WebAssembly-based Circumvention Transports](https://www.petsymposium.org/foci/2024/foci-2024-0003.pdf).

<details>
<summary>BibTeX</summary>

```bibtex
@inproceedings{water-foci24,
author = {Chi, Erik and Wang, Gaukas and Halderman, J. Alex and Wustrow, Eric and Wampler, Jack},
year = {2024},
month = {02},
author = {Erik Chi and Gaukas Wang and J. Alex Halderman and Eric Wustrow and Jack Wampler},
title = {Just add {WATER}: {WebAssembly}-based Circumvention Transports},
address = {Virtual Event},
series = {FOCI '24},
booktitle = {Free and Open Communications on the Internet},
publisher = {},
year = {2024},
url = {https://www.petsymposium.org/foci/2024/foci-2024-0003.pdf},
}
```
</details>

**Update**: our paper has been accepted by FOCI and will appear at [FOCI 2024](https://foci.community/foci24.html) on Feb 19, 2024!
**Update**: our paper has been accepted by FOCI and presented at [FOCI 2024](https://foci.community/foci24.html)!

## Be Water

Expand All @@ -45,14 +45,14 @@ If you quoted or used our work in your own project/paper/research, please cite o
## Contents

The repo contains 2 main components:
1. A Rust crate [`water`](https://github.com/erikziyunchi/water-rs/tree/main/crates/water) runtime library used to interact with `.wasm` WebAssembly Transport Modules(WATM).
2. A Rust crate [`watm_v0`](https://github.com/erikziyunchi/water-rs/tree/main/crates/watm_v0) for the v0 WATM-development where developers can easily create their own `.wasm` (the general version of `watm` is still under development).
1. A Rust crate [`water`](https://github.com/refraction-networking/water-rs/tree/main/crates/water) runtime library used to interact with `.wasm` WebAssembly Transport Modules(WATM).
2. A Rust crate [`watm_v0`](https://github.com/refraction-networking/water-rs/tree/main/crates/watm_v0) for the v0 WATM-development where developers can easily create their own `.wasm` (the general version of `watm` is still under development).


Also include examples for demonstration of usage:
1. ⭐ A standalone [`cli`](https://github.com/erikziyunchi/water-rs/tree/main/examples/clients/cli) tool which is compatible with both `v0` and `v1_preview`, and can run all different roles with all of our example WATM binaries.
2. A few examples WATM implementations with `water_wasm` crate, see [water-rs/tree/main/examples/water_bins](https://github.com/erikziyunchi/water-rs/tree/main/examples/water_bins).
3. Examples of using the above WATM examples with our `water` library, see [tests](https://github.com/erikziyunchi/water-rs/tree/main/tests/tests) for usage.
1. ⭐ A standalone [`cli`](https://github.com/refraction-networking/water-rs/tree/main/examples/clients/cli) tool which is compatible with both `v0` and `v1_preview`, and can run all different roles with all of our example WATM binaries.
2. A few examples WATM implementations with `water_wasm` crate, see [water-rs/tree/main/examples/water_bins](https://github.com/refraction-networking/water-rs/tree/main/examples/water_bins).
3. Examples of using the above WATM examples with our `water` library, see [tests](https://github.com/refraction-networking/water-rs/tree/main/tests/tests) for usage.

## Running tests

Expand Down
2 changes: 1 addition & 1 deletion crates/water/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! Passed as command line arguments when used with cli tool
//!
//! Will have the similar feat as required in [issue#19](https://github.com/gaukas/water/issues/19) on the go-side.
//! Will have the similar feat as required in [issue#19](https://github.com/refraction-networking/water/issues/19) on the go-side.

pub mod wasm_shared_config;

Expand Down
2 changes: 1 addition & 1 deletion examples/clients/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ you should see `> CONNECTED` in the terminal of running WASM, then you can conne
"password": "WATERisAwesome!",

// for now, this is a global variable set in the ShadowSocks WATM, will add the config for it later
// the global var is set here: https://github.com/erikziyunchi/water-rs/blob/48716579a3ff69a5de5e4f69c47ff2a80470d96d/examples/water_bins/ss_client_wasm_v1/src/lib.rs#L2
// the global var is set here: https://github.com/refraction-networking/water-rs/blob/48716579a3ff69a5de5e4f69c47ff2a80470d96d/examples/water_bins/ss_client_wasm_v1/src/lib.rs#L2
// [remove these comment lines when copying]
"method": "chacha20-ietf-poly1305"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/water_bins/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WATM Examples

This folder is for all the WATM examples that developed using the [WATM library crate](https://github.com/erikziyunchi/water-rs/tree/main/crates/wasm), and runnable with the [WATER library engine](https://github.com/erikziyunchi/water-rs/tree/main/crates/water).
This folder is for all the WATM examples that developed using the [WATM library crate](https://github.com/refraction-networking/water-rs/tree/main/crates/wasm), and runnable with the [WATER library engine](https://github.com/refraction-networking/water-rs/tree/main/crates/water).

One can find details of these in each examples' README.

Expand Down
2 changes: 1 addition & 1 deletion examples/water_bins/echo_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
It uses the `water-wasm-crate` library and is able to run as a `Dialer` or `Listener` Role. It is currently implemented with `v1_preview` where it has the capability of managing connections inside it (tell the Host which `address:port` it `dial()` to / `listen()` on).

## How to run?
You can also find a full runnable test for this example with using our water-host library [here](https://github.com/erikziyunchi/water-rs/blob/main/tests/tests/echo_tests.rs).
You can also find a full runnable test for this example with using our water-host library [here](https://github.com/refraction-networking/water-rs/blob/main/tests/tests/echo_tests.rs).

You can config it as the following:
```json
Expand Down
2 changes: 1 addition & 1 deletion examples/water_bins/ss_client_wasm_v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
It uses the `water-wasm-crate` library and manages the whole flow of the ShadowSocks Client as an example(ported from [ShadowSocks' official Rust implementation](https://github.com/shadowsocks/shadowsocks-rust)) of porting existing proxy protocol implementations, to test it for now, you need to also deploy the ShadowSocks's [native server](https://github.com/shadowsocks/shadowsocks-rust) with the same configuration using here. It is currently implemented with `v1_preview`.

## How to run?
You can also find a full runnable test for this example with using our water-host library [here](https://github.com/erikziyunchi/water-rs/blob/main/tests/tests/ss_testing.rs).
You can also find a full runnable test for this example with using our water-host library [here](https://github.com/refraction-networking/water-rs/blob/main/tests/tests/ss_testing.rs).

Currently the config we have written into the client is:
```json
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/echo_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn test_echo() -> Result<(), Box<dyn std::error::Error>> {

let conf = config::WATERConfig::init(
// Source code of echo_client.wasm:
// https://github.com/erikziyunchi/water-rs/tree/main/examples/water_bins/echo_client
// https://github.com/refraction-networking/water-rs/tree/main/examples/water_bins/echo_client
//
String::from("./test_wasm/echo_client.wasm"),
String::from("_water_init"),
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/ss_testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async fn wasm_managed_shadowsocks_async() -> Result<(), Box<dyn std::error::Erro
// ==== setup WASM Shadowsocks client ====
let conf = config::WATERConfig::init(
// Source code of ss_client_wasm.wasm:
// https://github.com/erikziyunchi/water-rs/tree/main/examples/water_bins/ss_client_wasm_v1
// https://github.com/refraction-networking/water-rs/tree/main/examples/water_bins/ss_client_wasm_v1
//
String::from("./test_wasm/ss_client_wasm.wasm"),
String::from("v1_listen"),
Expand Down
4 changes: 2 additions & 2 deletions tests/tests/v0_plus_relay_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ fn test_cross_lang_wasm_relay() -> Result<(), Box<dyn std::error::Error>> {
let conf = config::WATERConfig::init(
// plain.wasm is in v0 and fully compatible with the Go engine
// More details for the Go-side of running plain.wasm check here:
// https://github.com/gaukas/water/tree/master/examples/v0/plain
// https://github.com/refraction-networking/water/tree/master/examples/v0/plain
//
// Source code of plain.wasm:
// https://github.com/erikziyunchi/water-rs/tree/main/examples/water_bins/plain_v0
// https://github.com/refraction-networking/water-rs/tree/main/examples/water_bins/plain_v0
//
String::from("./test_wasm/plain.wasm"),
String::from("_water_worker"),
Expand Down
4 changes: 2 additions & 2 deletions tests/tests/v0_plus_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ fn test_cross_lang_wasm_dialer() -> Result<(), Box<dyn std::error::Error>> {
let conf = config::WATERConfig::init(
// plain.wasm is in v0 and fully compatible with the Go engine
// More details for the Go-side of running plain.wasm check here:
// https://github.com/gaukas/water/tree/master/examples/v0/plain
// https://github.com/refraction-networking/water/tree/master/examples/v0/plain
//
// Source code of plain.wasm:
// https://github.com/erikziyunchi/water-rs/tree/main/examples/water_bins/plain_v0
// https://github.com/refraction-networking/water-rs/tree/main/examples/water_bins/plain_v0
//
String::from("./test_wasm/plain.wasm"),
String::from("_water_worker"),
Expand Down
Loading