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

Update README.md with building instructions #49

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# udp-over-tcp

## Introduction

A library (and binaries) for tunneling UDP datagrams over a TCP stream.

Some programs/protocols only work over UDP. And some networks only allow TCP. This is where
Expand All @@ -18,6 +20,35 @@ Some programs/protocols only work over UDP. And some networks only allow TCP. Th
`tcp2udp` continues to accept new incoming TCP connections, and creates a new UDP socket
for each. So a single `tcp2udp` server can be used to service many `udp2tcp` clients.

## Building

Ensure you have the required dependencies installed on:

### Debian / Ubuntu

Install Rust by following the guides for [Rustup]([url](https://www.rust-lang.org/tools/install))

Install ibc6-dev with APT:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo on package name. Missing l


```
sudo apt install -y libc6-dev
```

### Fedora

All dependencies can be installed as follows:

```
sudo dnf install -y cargo rust glibc-static
```

Run the script `build-static-bins.sh` to produce the static binary files. These will be outputted to:

```
$ ls target/x86_64-unknown-linux-gnu/release/
build deps examples incremental tcp2udp tcp2udp.d udp2tcp udp2tcp.d
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only care about a single file here. I'm not going to mark this as a blocker, do whatever fits you. But if the main problem was to make it easy for someone not super into Rust to just produce a tcp2udp from this I would word it as:

Run the script build-static-bins.sh to produce the static binaries. The result will be available at target/x86_64-unknown-linux-gnu/release/tcp2udp

No one runs this script to get udp2tcp so we can ignore talking about that one.

```

## Protocol

The format of the data inside the TCP stream is very simple. Each datagram is preceded
Expand Down