https://github.com/longern/webtransportify
https://github.com/longern/webtransportify
javascript webtransport
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/longern/webtransportify
- Owner: longern
- Created: 2024-08-30T08:32:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-18T02:53:05.000Z (12 months ago)
- Last Synced: 2024-10-21T04:06:36.998Z (12 months ago)
- Topics: javascript, webtransport
- Language: Rust
- Homepage: https://webtransportify.pages.dev
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## webtransportify
Translates WebTransport traffic to TCP socket traffic.
If you have a server with public IP address, but
- you don't have a domain name
- or your domain name resolution is banned
- or you don't have a TLS certificateYou can use this tool to securely visit your server through WebTransport tunnel.
### Features
- Auto renew self-signed WebTransport certificates (ECDSA P-256, 14 days)
- Service worker to proxy requests through WebTransport tunnel### Usage
Run the server along with the target server.
```bash
cargo run -r -- 80
```Certificate hash will be printed to the console.
Then visit the demo page. Set the `URL` to `:34433` and `Certificate Hash` to the hash printed.
Click `Connect` and you should see the target server's response.
Test the client by running the following command:
```
cargo run -r -- 127.0.0.1:34433 --client --port 34480 --sch
```### Security
Set environment variable `ALLOW_ORIGINS` as `https://example.com,https://*.your-domain.com`.
### Limitations
Safari and WebView on iOS do not support WebTransport yet. See [Browser compatibility](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport#browser_compatibility).
In the demo we use a service worker to proxy requests, which means:
- Any service worker provided by the original server will not work
- Basic authentication will not show the login dialog
- `HttpOnly` cookies cannot be stored securely so they are ignored
- `WebSocket` will not go through the tunnel automatically