Compare commits

..

7 Commits

26 changed files with 234 additions and 3395 deletions

View File

@ -1,37 +0,0 @@
kind: pipeline
type: docker
name: default
steps:
- name: generate
image: golang:1.19-alpine
commands:
- apk add --no-cache curl make bash
- make all
- name: release
image: alpine:latest
environment:
SSH_KEY:
from_secret: ssh_key
commands:
- apk add --no-cache git openssh
- mkdir -p $HOME/.ssh
- echo "$SSH_KEY" > $HOME/.ssh/id_rsa
- ssh-keyscan -H git.neur0tx.site > $HOME/.ssh/known_hosts 2> /dev/null
- chmod -R 600 $HOME/.ssh
- cd .pub
- git clone --filter=tree:0 git@git.neur0tx.site:Neur0toxine/neur0toxine.pages.neur0tx.site.git site
- cd site
- git checkout gitea-pages || git checkout -b gitea-pages
- cd ..
- mv site/.git .
- rm -rf site
- git add .
- git commit -a -m "`date +'%Y-%m-%d %R:%S'` > deploy"
- git push -u origin gitea-pages
- cd ..
- rm -rf .pub
trigger:
branch:
- master

4
.gitignore vendored
View File

@ -1,4 +0,0 @@
*~
*.bak
**/.DS_Store
/.pub

View File

@ -1,7 +0,0 @@
{
"cSpell.words": [
"insideme",
"Shiprock",
"wikilinks"
]
}

View File

@ -1,17 +0,0 @@
---
title: neur0tx.site
description: neur0tx.site contents
extensions:
- anchor
- d2
- definitionlist
- embed
- fences
- linkify
- footnote
- strikethrough
- table
- tasklist
- typography
- wikilink

View File

@ -1,14 +0,0 @@
#!/bin/sh
set -e
if [ ! $# = 1 ]; then
printf "Usage: %s <file>\n" "$(basename "$0")"
exit 0
fi
if [ -f "$1" ]; then
cat "$1"
else
echo "error: file not found $1"
fi

View File

@ -1,33 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{ styles }}
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>{{ title }}</title>
<meta name="title" content="{{ title }}" />
<meta name="description" content="{{ description }}" />
<meta name="keywords" content="{{ keywords }}" />
</head>
<body>
<nav>
<a id="brand" href="/">home 🏠</a>
<a href="/proxy.html">proxy 💻</a>
</nav>
<article>{{ content }}</article>
<footer>
Copyright &copy; Neur0toxine ·
Last modified <time datetime="{{ date +%Y-%m-%dT%H:%M:%SZ%:z }}">{{ date }}</time> ·
</footer>
{{ scripts }}
<script>
hljs.highlightAll();
</script>
</body>
</html>

View File

@ -1,29 +0,0 @@
#!/bin/sh
set -e
if [ ! $# = 1 ]; then
printf >&2 "Usage: %s <path> [ext]\n" "$(basename "$0")"
exit 0
fi
p="$1"
t="${2:-md}"
if [ ! -d "$p" ]; then
printf >&2 "error: path %s not found\n" "$p"
exit 1
fi
find "$p" -type f -name "*.$t" | while read -r file; do
name="${file#"$p"}"
name="${name#"/"}"
name="${name%.*}"
title="$(zs vars "$file" title)"
if [ -z "$title" ]; then
title="$name"
fi
echo "- [$title](${p}/${name}.html)"
done

View File

@ -1,17 +0,0 @@
#!/bin/sh
set -e
minify_assets() {
p="$1"
t="$2"
find "$p" -type f -name "*.$t" | while read -r file; do
name="${file#"$p"}"
name="${name#"/"}"
minify -o "${p}/${name}" "$file"
done
}
minify_assets "$ZS_OUTDIR" "css"
minify_assets "$ZS_OUTDIR" "js"

View File

@ -1,3 +0,0 @@
#!/bin/sh
exit 0

View File

@ -1,9 +0,0 @@
#!/bin/sh
set -e
JS="highlight umbrella"
for js in $JS; do
printf "<script type=\"application/javascript\" src=\"/assets/js/%s.js\"></script>\n" "$js"
done

View File

@ -1,9 +0,0 @@
#!/bin/sh
set -e
CSS="bahunya board highlight site"
for css in $CSS; do
printf "<link rel=\"stylesheet\" href=\"/assets/css/%s.css\">\n" "$css"
done

View File

@ -1,4 +0,0 @@
*~
*.bak
Makefile
README.md

View File

@ -1,20 +0,0 @@
.PHONY: deps dev build clean
GOCMD=go
TAG := latest
all: deps build
deps:
@$(GOCMD) install go.mills.io/zs@latest
@$(GOCMD) install github.com/tdewolff/minify/v2/cmd/minify@latest
dev : DEBUG=1
dev : build
@zs serve
build:
@zs build
clean:
@git clean -f -d -X

View File

@ -1,3 +0,0 @@
# neur0tx.site
Site contents.

File diff suppressed because one or more lines are too long

View File

@ -1,35 +1 @@
.board {
display: grid;
column-gap: 50px;
justify-items: center;
}
/* Display long board titles without extending first grid column. Will display at least 6 columns */
.board h1 {
grid-column: 1/6;
justify-self: left;
padding-left: 5%;
}
.board h2 {
grid-row: 2;
}
/* Disable anchor hover effect */
.board h2:hover .anchor:before {
display: none;
}
.board ul {
grid-row: 3;
padding-left: 0;
}
.board li {
display: block;
border: 1px solid;
padding: 15px;
margin-bottom: 30px;
text-align: center;
border-radius: 25px;
}
.board{display:grid;column-gap:50px;justify-items:center}.board h1{grid-column:1/6;justify-self:left;padding-left:5%}.board h2{grid-row:2}.board h2:hover .anchor:before{display:none}.board ul{grid-row:3;padding-left:0}.board li{display:block;border:1px solid;padding:15px;margin-bottom:30px;text-align:center;border-radius:25px}

View File

@ -1,9 +1,6 @@
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
Theme: GitHub Dark Dimmed
Description: Dark dimmed theme as seen on github.com
Author: github.com
Maintainer: @Hirse
Updated: 2021-05-15
Colors taken from GitHub's CSS
*/.hljs{color:#adbac7;background:#22272e}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#f47067}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#dcbdfb}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#6cb6ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#96d0ff}.hljs-built_in,.hljs-symbol{color:#f69d50}.hljs-code,.hljs-comment,.hljs-formula{color:#768390}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#8ddb8c}.hljs-subst{color:#adbac7}.hljs-section{color:#316dca;font-weight:700}.hljs-bullet{color:#eac55f}.hljs-emphasis{color:#adbac7;font-style:italic}.hljs-strong{color:#adbac7;font-weight:700}.hljs-addition{color:#b4f1b4;background-color:#1b4721}.hljs-deletion{color:#ffd8d3;background-color:#78191b}
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!Theme: GitHub Dark Dimmed
Description: Dark dimmed theme as seen on github.com
Author: github.com
Maintainer: @Hirse
Updated: 2021-05-15
Colors taken from GitHub's CSS*/.hljs{color:#adbac7;background:#22272e}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#f47067}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#dcbdfb}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#6cb6ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#96d0ff}.hljs-built_in,.hljs-symbol{color:#f69d50}.hljs-code,.hljs-comment,.hljs-formula{color:#768390}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#8ddb8c}.hljs-subst{color:#adbac7}.hljs-section{color:#316dca;font-weight:700}.hljs-bullet{color:#eac55f}.hljs-emphasis{color:#adbac7;font-style:italic}.hljs-strong{color:#adbac7;font-weight:700}.hljs-addition{color:#b4f1b4;background-color:#1b4721}.hljs-deletion{color:#ffd8d3;background-color:#78191b}

View File

@ -1,45 +1 @@
/* Anchors */
h1:hover .anchor:before,
h2:hover .anchor:before,
h3:hover .anchor:before,
h4:hover .anchor:before,
h5:hover .anchor:before,
h6:hover .anchor:before {
width: 16px;
height: 16px;
content: ' ';
display: inline-block;
background-color: currentColor;
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
}
/* Wider site */
body {
max-width: 60rem;
}
body nav:first-of-type {
padding: 0 calc((100vw - 60rem)/2);
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--button-hover);
}
::-webkit-scrollbar-thumb:hover {
background: #384e62;
}
h1:hover .anchor:before,h2:hover .anchor:before,h3:hover .anchor:before,h4:hover .anchor:before,h5:hover .anchor:before,h6:hover .anchor:before{width:16px;height:16px;content:' ';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>")}body{max-width:60rem}body nav:first-of-type{padding:0 calc((100vw - 60rem)/2)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--button-hover)}::-webkit-scrollbar-thumb:hover{background:#384e62}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

47
index.html Normal file
View File

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/assets/css/bahunya.css">
<link rel="stylesheet" href="/assets/css/board.css">
<link rel="stylesheet" href="/assets/css/highlight.css">
<link rel="stylesheet" href="/assets/css/site.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>neur0tx.site</title>
<meta name="title" content="neur0tx.site" />
<meta name="description" content="neur0tx.site contents" />
<meta name="keywords" content="" />
</head>
<body>
<nav>
<a id="brand" href="/">home 🏠</a>
<a href="/proxy.html">proxy 💻</a>
</nav>
<article><h1 id="links">Links <a class="anchor" href="#links"> </a></h1>
<ul>
<li><a href="https://gitea.neur0tx.site">gitea</a></li>
<li><a href="https://drone.neur0tx.site">drone CI</a></li>
<li><a href="/proxy.html">proxy</a></li>
</ul>
</article>
<footer>
Copyright &copy; Neur0toxine ·
Last modified <time datetime="2024-12-25T14:11:29Z
">Wed Dec 25 14:11:29 UTC 2024
</time> ·
</footer>
<script type="application/javascript" src="/assets/js/highlight.js"></script>
<script type="application/javascript" src="/assets/js/umbrella.js"></script>
<script>
hljs.highlightAll();
</script>
</body>
</html>

View File

@ -1,5 +0,0 @@
# Links
- [gitea](https://gitea.neur0tx.site)
- [drone CI](https://drone.neur0tx.site)
- [proxy](/proxy.html)

86
proxy.html Normal file
View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/assets/css/bahunya.css">
<link rel="stylesheet" href="/assets/css/board.css">
<link rel="stylesheet" href="/assets/css/highlight.css">
<link rel="stylesheet" href="/assets/css/site.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>neur0tx.site</title>
<meta name="title" content="neur0tx.site" />
<meta name="description" content="neur0tx.site contents" />
<meta name="keywords" content="" />
</head>
<body>
<nav>
<a id="brand" href="/">home 🏠</a>
<a href="/proxy.html">proxy 💻</a>
</nav>
<article><p>EN | <a href="proxy_ru.html">RU</a></p>
<hr />
<h1 id="how-to-use-the-service">How to use the service <a class="anchor" href="#how-to-use-the-service"> </a></h1>
<h2 id="easiest-method">Easiest method <a class="anchor" href="#easiest-method"> </a></h2>
<p>Add this to your <code>~/.bashrc</code> or <code>~/.zshrc</code>:</p>
<pre><code class="language-sh">http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:&quot;$1&quot; ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R &quot;$1&quot;:80:localhost:&quot;$2&quot; ssh.neur0tx.site
}
</code></pre>
<p>and then run <code>source ~/.bashrc</code> or <code>source ~/.zshrc</code>.</p>
<p>Now you can forward your services like this:</p>
<ul>
<li><code>http 80</code> to forward a service on port <code>:80</code> with random subdomain. Service will be available at <code>&lt;something&gt;.proxy.neur0tx.site</code>.</li>
<li><code>httpa domain 80</code> to forward a service on port <code>:80</code> with subdomain <code>domain</code>. Service will be available at <code>domain.proxy.neur0tx.site</code> (if this domain is not taken yet).</li>
</ul>
<h2 id="all-methods">All methods <a class="anchor" href="#all-methods"> </a></h2>
<ul>
<li>Forward service on port <code>:80</code> with random subdomain:</li>
</ul>
<pre><code class="language-sh">$ ssh -p 2222 -R 80:localhost:80 ssh.neur0tx.site
</code></pre>
<ul>
<li>Forward service on port <code>:8080</code> with custom subdomain:</li>
</ul>
<pre><code class="language-sh">$ ssh -p 2222 -R subdomain:80:localhost:80 ssh.neur0tx.site
</code></pre>
<ul>
<li>For Fedora you can add <code>-oHostKeyAlgorithms=+ssh-rsa</code> before <code>ssh -p 2222</code> to prevent any problems with the key compatibility.</li>
<li>Function for <code>bash</code> / <code>zsh</code> to use as an alias (usage: <code>http 80</code>):</li>
</ul>
<pre><code class="language-sh">http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:&quot;$1&quot; ssh.neur0tx.site
}
</code></pre>
<ul>
<li>Same function but with custom subdomain (usage: <code>httpa subdomain 80</code>):</li>
</ul>
<pre><code class="language-sh">httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R &quot;$1&quot;:80:localhost:&quot;$2&quot; ssh.neur0tx.site
}
</code></pre>
</article>
<footer>
Copyright &copy; Neur0toxine ·
Last modified <time datetime="2024-12-25T14:11:29Z
">Wed Dec 25 14:11:29 UTC 2024
</time> ·
</footer>
<script type="application/javascript" src="/assets/js/highlight.js"></script>
<script type="application/javascript" src="/assets/js/umbrella.js"></script>
<script>
hljs.highlightAll();
</script>
</body>
</html>

View File

@ -1,49 +0,0 @@
EN | [RU](proxy_ru.html)
___
# How to use the service
## Easiest method
Add this to your `~/.bashrc` or `~/.zshrc`:
```sh
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.neur0tx.site
}
```
and then run `source ~/.bashrc` or `source ~/.zshrc`.
Now you can forward your services like this:
* `http 80` to forward a service on port `:80` with random subdomain. Service will be available at `<something>.proxy.neur0tx.site`.
* `httpa domain 80` to forward a service on port `:80` with subdomain `domain`. Service will be available at `domain.proxy.neur0tx.site` (if this domain is not taken yet).
## All methods
* Forward service on port `:80` with random subdomain:
```sh
$ ssh -p 2222 -R 80:localhost:80 ssh.neur0tx.site
```
* Forward service on port `:8080` with custom subdomain:
```sh
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh.neur0tx.site
```
* For Fedora you can add `-oHostKeyAlgorithms=+ssh-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`):
```sh
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.neur0tx.site
}
```
* Same function but with custom subdomain (usage: `httpa subdomain 80`):
```sh
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.neur0tx.site
}
```

86
proxy_ru.html Normal file
View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/assets/css/bahunya.css">
<link rel="stylesheet" href="/assets/css/board.css">
<link rel="stylesheet" href="/assets/css/highlight.css">
<link rel="stylesheet" href="/assets/css/site.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>neur0tx.site</title>
<meta name="title" content="neur0tx.site" />
<meta name="description" content="neur0tx.site contents" />
<meta name="keywords" content="" />
</head>
<body>
<nav>
<a id="brand" href="/">home 🏠</a>
<a href="/proxy.html">proxy 💻</a>
</nav>
<article><p><a href="proxy.html">EN</a> | RU</p>
<hr />
<h1 id="---">Инструкция по использованию сервиса <a class="anchor" href="#---"> </a></h1>
<h2 id="--">Самый простой метод <a class="anchor" href="#--"> </a></h2>
<p>Добавьте код ниже в <code>~/.bashrc</code> или <code>~/.zshrc</code>:</p>
<pre><code class="language-sh">http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:&quot;$1&quot; ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R &quot;$1&quot;:80:localhost:&quot;$2&quot; ssh.neur0tx.site
}
</code></pre>
<p>и выполните <code>source ~/.bashrc</code> или <code>source ~/.zshrc</code>.</p>
<p>Теперь вы можете проксировать сервисы вот так:</p>
<ul>
<li><code>http 80</code> чтобы проксировать сервис на порту <code>:80</code> со случайным поддоменом. Сервис будет доступен на <code>&lt;something&gt;.proxy.neur0tx.site</code>.</li>
<li><code>httpa domain 80</code> чтобы проксировать сервис на порту <code>:80</code> с поддоменом <code>domain</code>. Сервис будет доступен на <code>domain.proxy.neur0tx.site</code> (если поддомен еще свободен).</li>
</ul>
<h2 id="-">Все методы <a class="anchor" href="#-"> </a></h2>
<ul>
<li>Проксировать сервис на порту <code>:80</code> на случайный поддомен:</li>
</ul>
<pre><code class="language-sh">$ ssh -p 2222 -R 80:localhost:80 ssh.neur0tx.site
</code></pre>
<ul>
<li>Проксировать сервис на порту <code>:8080</code> на заранее определенный поддомен:</li>
</ul>
<pre><code class="language-sh">$ ssh -p 2222 -R subdomain:80:localhost:80 ssh.neur0tx.site
</code></pre>
<ul>
<li>Для Fedora можно использовать аргумент <code>-oHostKeyAlgorithms=+ssh-rsa</code> перед <code>ssh -p 2222</code> чтобы предотвратить проблемы совместимости с ключом.</li>
<li>Функции для <code>bash</code> / <code>zsh</code> чтобы использовать как alias (пример: <code>http 80</code>):</li>
</ul>
<pre><code class="language-sh">http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:&quot;$1&quot; ssh.neur0tx.site
}
</code></pre>
<ul>
<li>Та же функция с кастомным поддоменом (пример: <code>httpa subdomain 80</code>):</li>
</ul>
<pre><code class="language-sh">httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R &quot;$1&quot;:80:localhost:&quot;$2&quot; ssh.neur0tx.site
}
</code></pre>
</article>
<footer>
Copyright &copy; Neur0toxine ·
Last modified <time datetime="2024-12-25T14:11:29Z
">Wed Dec 25 14:11:29 UTC 2024
</time> ·
</footer>
<script type="application/javascript" src="/assets/js/highlight.js"></script>
<script type="application/javascript" src="/assets/js/umbrella.js"></script>
<script>
hljs.highlightAll();
</script>
</body>
</html>

View File

@ -1,49 +0,0 @@
[EN](proxy.html) | RU
___
# Инструкция по использованию сервиса
## Самый простой метод
Добавьте код ниже в `~/.bashrc` или `~/.zshrc`:
```sh
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.neur0tx.site
}
```
и выполните `source ~/.bashrc` или `source ~/.zshrc`.
Теперь вы можете проксировать сервисы вот так:
* `http 80` чтобы проксировать сервис на порту `:80` со случайным поддоменом. Сервис будет доступен на `<something>.proxy.neur0tx.site`.
* `httpa domain 80` чтобы проксировать сервис на порту `:80` с поддоменом `domain`. Сервис будет доступен на `domain.proxy.neur0tx.site` (если поддомен еще свободен).
## Все методы
* Проксировать сервис на порту `:80` на случайный поддомен:
```sh
$ ssh -p 2222 -R 80:localhost:80 ssh.neur0tx.site
```
* Проксировать сервис на порту `:8080` на заранее определенный поддомен:
```sh
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh.neur0tx.site
```
* Для Fedora можно использовать аргумент `-oHostKeyAlgorithms=+ssh-rsa` перед `ssh -p 2222` чтобы предотвратить проблемы совместимости с ключом.
* Функции для `bash` / `zsh` чтобы использовать как alias (пример: `http 80`):
```sh
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.neur0tx.site
}
```
* Та же функция с кастомным поддоменом (пример: `httpa subdomain 80`):
```sh
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.neur0tx.site
}
```