fix wrong domain in docs

This commit is contained in:
Pavel 2022-09-23 17:45:45 +03:00
parent d701e4a474
commit c404d65eef
2 changed files with 12 additions and 12 deletions

View File

@ -8,11 +8,11 @@ Add this to your `~/.bashrc` or `~/.zshrc`:
```bash
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R 80:localhost:"$1" ssh -p 2222.neur0tx.site
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R 80:localhost:"$1" ssh -p ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p 2222.neur0tx.site
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p ssh.neur0tx.site
}
```
@ -26,22 +26,22 @@ Now you can forward your services like this:
* Forward service on port `:80` with random subdomain:
```sh
$ ssh -p 2222 -R 80:localhost:80 ssh -p 2222.neur0tx.site
$ ssh -p 2222 -R 80:localhost:80 ssh -p ssh.neur0tx.site
```
* Forward service on port `:8080` with custom subdomain:
```sh
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh -p 2222.neur0tx.site
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh -p ssh.neur0tx.site
```
* For Fedora you can add `-oHostKeyAlgorithms=+ssh -p 2222-rsa` before `ssh -p 2222` to prevent any problems with the key compatibility.
* Function for `bash` / `zsh` to use as an alias (usage: `http 80`):
```bash
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R 80:localhost:"$1" ssh -p 2222.neur0tx.site
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R 80:localhost:"$1" ssh -p ssh.neur0tx.site
}
```
* Same function but with custom subdomain (usage: `httpa subdomain 80`):
```bash
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p 2222.neur0tx.site
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p ssh.neur0tx.site
}
```

View File

@ -8,11 +8,11 @@
```bash
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R 80:localhost:"$1" ssh -p 2222.neur0tx.site
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R 80:localhost:"$1" ssh -p ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p 2222.neur0tx.site
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p ssh.neur0tx.site
}
```
@ -26,22 +26,22 @@ httpa () {
* Проксировать сервис на порту `:80` на случайный поддомен:
```sh
$ ssh -p 2222 -R 80:localhost:80 ssh -p 2222.neur0tx.site
$ ssh -p 2222 -R 80:localhost:80 ssh -p ssh.neur0tx.site
```
* Проксировать сервис на порту `:8080` на заранее определенный поддомен:
```sh
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh -p 2222.neur0tx.site
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh -p ssh.neur0tx.site
```
* Для Fedora можно использовать аргумент `-oHostKeyAlgorithms=+ssh -p 2222-rsa` перед `ssh -p 2222` чтобы предотвратить проблемы совместимости с ключом.
* Функции для `bash` / `zsh` чтобы использовать как alias (пример: `http 80`):
```bash
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R 80:localhost:"$1" ssh -p 2222.neur0tx.site
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R 80:localhost:"$1" ssh -p ssh.neur0tx.site
}
```
* Та же функция с кастомным поддоменом (пример: `httpa subdomain 80`):
```bash
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p 2222.neur0tx.site
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p ssh.neur0tx.site
}
```