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

Add code color highlighting to the README #649

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
85 changes: 44 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,38 @@ status](https://repology.org/badge/vertical-allrepos/eternalterminal.svg)](https

The easiest way to install is using Homebrew:

```
```bash
brew install MisterTea/et/et
```

Then if you want a daemon to launch `etserver` on every boot:

On m1 (Apple Silicon) Macs:

```
```bash
sudo sed 's:/usr/local/bin/etserver:/opt/homebrew/bin/etserver:g' ../init/launchd/homebrew.mxcl.et.plist | sudo tee /Library/LaunchDaemons/homebrew.mxcl.et.plist
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.et.plist
```

On x86 Macs:

```
```bash
sudo cp ../init/launchd/homebrew.mxcl.et.plist /Library/LaunchDaemons/homebrew.mxcl.et.plist
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.et.plist
```


Alternatively, a package is available in MacPorts:

```
```bash
sudo port install et
```

### Ubuntu

For Ubuntu, use our PPA:

```
```bash
sudo add-apt-repository ppa:jgmath2000/et
sudo apt-get update
sudo apt-get install et
Expand All @@ -63,9 +63,9 @@ Or see "Debian/Ubuntu" below to install and build from source (e.g., for ARM).

### Debian

For debian, use our deb repo. For buster:
For Debian, use our deb repo. For buster:

```
```bash
echo "deb https://github.com/MisterTea/debian-et/raw/master/debian-source/ buster main" | sudo tee -a /etc/apt/sources.list.d/et.list
curl -sSL https://github.com/MisterTea/debian-et/raw/master/et.gpg | sudo tee /etc/apt/trusted.gpg.d/et.gpg >/dev/null
sudo apt update
Expand All @@ -78,27 +78,27 @@ Up to the present day the only way to install is to [build from source](#centos-

### CentOS 8

```
```bash
sudo dnf install epel-release
sudo dnf install et
```

### FreeBSD
On FreeBSD, use:

```
```bash
pkg install eternalterminal
```

### Fedora (version 29 and later):

```
```bash
sudo dnf install et
```

### openSUSE

```
```bash
zypper ar -f obs://network
zypper ref
zypper in EternalTerminal
Expand All @@ -110,21 +110,21 @@ Install dependencies:

* Fedora (tested on 25):

```
```bash
sudo dnf install boost-devel libsodium-devel protobuf-devel \
protobuf-compiler cmake gflags-devel libcurl-devel
```

* Gentoo:

```
```bash
sudo emerge dev-libs/boost dev-libs/libsodium \
dev-libs/protobuf dev-util/cmake dev-cpp/gflags
```

Download and install from source:

```
```bash
git clone --recurse-submodules https://github.com/MisterTea/EternalTerminal.git
cd EternalTerminal
mkdir build
Expand Down Expand Up @@ -160,26 +160,26 @@ ET uses ssh for handshaking and encryption, so you must be able to ssh into the

ET uses TCP, so you need an open port on your server. By default, it uses 2022.

Once you have an open port, the syntax is similar to ssh. Username is default to the current username starting the et process, use `-u` or `user@` to specify a different if necessary.
```
Once you have an open port, the syntax is similar to ssh. Username is default to the current username starting the et process, use `-u` or `user@` to specify a different one if necessary.
```bash
et hostname (etserver running on default port 2022, username is the same as current)
et user@hostname:8000 (etserver running on port 8000, different user)
```
You can specify a jumphost and the port et is running on jumphost using `--jumphost` and `--jport`. If no `--jport` is given, et will try to connect to default port 2022.
```
et hostname -jumphost jump_hostname (etserver running on port 2022 on both hostname and jumphost)
```bash
et hostname --jumphost jump_hostname (etserver running on port 2022 on both hostname and jumphost)
et hostname:8888 --jumphost jump_hostname --jport 9999
```
Additional arguments that et accept are port forwarding pairs with option `-t "18000:8000, 18001-18003:8001-8003"`, a command to run immediately after the connection is setup through `-c`.
Additional arguments that et accepts are port forwarding pairs with option `-t "18000:8000, 18001-18003:8001-8003"`, a command to run immediately after the connection is set up through `-c`.

Starting from the latest release, et supports parsing both user-specific and system-wide ssh config file.
The config file is required when your sshd on server/jumphost is listening on a port which is not 22.
Here is an example ssh config file showing how to setup when
Starting from the latest release, et supports parsing both user-specific and system-wide ssh config files.
The config file is required when your sshd on server/jumphost is listening on a port that is not 22.
Here is an example SSH config file showing how to set up when
- there is a jumphost in the middle
- sshd is listening on a port which is not 22
- connecting to a different username other than current one.
- sshd is listening on a port that is not 22
- connecting to a different username other than the current one.

```
```ssh-config
Host dev
HostName 192.168.1.1
User fred
Expand All @@ -189,7 +189,7 @@ Host dev

With the ssh config file set as above, you can simply call et with

```
```bash
et dev (etserver running on port 2022 on both hostname and jumphost)
et dev:8000 -jport 9000 (etserver running on port 9000 on jumphost)
```
Expand All @@ -200,7 +200,7 @@ et dev:8000 -jport 9000 (etserver running on port 9000 on jumphost)

To build Eternal Terminal on Mac, the easiest way is to grab dependencies with Homebrew:

```
```bash
brew install --only-dependencies MisterTea/et/et
git clone --recurse-submodules https://github.com/MisterTea/EternalTerminal.git
cd EternalTerminal
Expand All @@ -215,7 +215,7 @@ make && sudo make install
To run an `et` server for testing, run `./etserver`. To run an `et`
server daemon persistently across reboots:

```
```bash
sudo cp ../init/launchd/homebrew.mxcl.et.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.et.plist
```
Expand All @@ -226,15 +226,15 @@ Grab the deps and then follow this process.

Debian/Ubuntu Dependencies:

```
```bash
sudo apt install libboost-dev libsodium-dev \
libprotobuf-dev protobuf-compiler libgflags-dev libutempter-dev libcurl4-openssl-dev \
build-essential ninja-build cmake git zip
```

Fetch source, build and install:

```
```bash
git clone --recurse-submodules https://github.com/MisterTea/EternalTerminal.git
cd EternalTerminal
mkdir build
Expand All @@ -253,21 +253,21 @@ Once built, the binary only requires `libgflags-dev` and `libprotobuf-dev`.
### CentOS 7

Install dependencies:
```
```bash
sudo yum install epel-release
sudo yum install cmake3 boost-devel libsodium-devel protobuf-devel \
protobuf-compiler gflags-devel protobuf-lite-devel libcurl-devel \
perl-IPC-Cmd perl-Data-Dumper libunwind-devel libutempter-devel
```

Install scl dependencies
```
```bash
sudo yum install centos-release-scl
sudo yum install devtoolset-11 devtoolset-11-libatomic-devel rh-git227
```

Download and install from source ([see #238 for details](https://github.com/MisterTea/EternalTerminal/issues/238)):
```
```bash
git clone --recurse-submodules https://github.com/MisterTea/EternalTerminal.git
cd EternalTerminal
mkdir build
Expand All @@ -280,27 +280,31 @@ sudo cp ../etc/et.cfg /etc/

Find the actual location of et:

which etserver
```bash
which etserver
```

Correct the service file (see [#180](https://github.com/MisterTea/EternalTerminal/issues/180) for details).

```
```bash
sudo sed -ie "s|ExecStart=[^[:space:]]*[[:space:]]|ExecStart=$(which etserver) |" /etc/systemd/system/et.service
```

Alternativelly, open the file /etc/systemd/system/et.service in an editor and correct the `ExectStart=...` line to point to the correct path of the `etserver` binary.
Alternatively, open the file /etc/systemd/system/et.service in an editor and correct the `ExectStart=...` line to point to the correct path of the `etserver` binary.

ExecStart=/usr/local/bin/etserver --cfgfile=/etc/et.cfg
```
ExecStart=/usr/local/bin/etserver --cfgfile=/etc/et.cfg
```

Reload systemd configs:

```
```bash
sudo systemctl daemon-reload
```

Start the et service:

```
```bash
sudo systemctl enable --now et.service
```

Expand All @@ -310,11 +314,10 @@ Builder Dockerfiles are located at [deployment/](deployment/). Supported OSes: C

## Reporting issues

If you have any problems with installation or usage, please [file an issue on github](https://github.com/MisterTea/EternalTerminal/issues).
If you have any problems with installation or usage, please [file an issue on GitHub](https://github.com/MisterTea/EternalTerminal/issues).

## Developers

- Jason Gauci: https://github.com/MisterTea
- Ailing Zhang: https://github.com/ailzhang
- James Short: https://github.com/jshort

Loading