Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cedric05/tcp-relay-rust
Simple tcp proxy using tokio and rust
https://github.com/cedric05/tcp-relay-rust
proxy socat tcp tcp-proxy tcp-proxy-server
Last synced: about 2 months ago
JSON representation
Simple tcp proxy using tokio and rust
- Host: GitHub
- URL: https://github.com/cedric05/tcp-relay-rust
- Owner: cedric05
- Created: 2022-04-13T10:53:48.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-10T12:31:18.000Z (5 months ago)
- Last Synced: 2024-11-02T08:51:39.025Z (about 2 months ago)
- Topics: proxy, socat, tcp, tcp-proxy, tcp-proxy-server
- Language: Rust
- Homepage: https://crates.io/crates/tcp-relay-rust
- Size: 35.2 KB
- Stars: 10
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple tcp relay using rust and tokio
## Build
`cargo build --release`
## Run
To create local tcp relay to `google.com:443` from `localhost:3333`.
`./target/release/tcp-relay-rust google.com:443 localhost:3333`
To try:
curl https://localhost:3333/ -k
### Tcp Example
- start redis server using: `docker run --rm -p 6379:6379 redis`
- start relay service: `./target/release/tcp-relay-rust localhost:6379 localhost:3333`
- start client by connecting to `redis-cli -p 3333`### Unix Example
- start relay service: `./target/release/tcp-relay-rust /var/run/docker.sock localhost:3333` (danger, its not safe to share docker.sock)
- invoke sample request by `curl localhost:3333`### Std Example
- start relay service: `./target/release/tcp-relay-rust /var/run/docker.sock ` (danger, its not safe to share docker.sock)
- type below text. (docker.sock will respond with text)
"""
GET /containers/json HTTP/1.1
Host: localhost:3333
"""