initial commit
This commit is contained in:
commit
d701e4a474
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
html/*
|
||||
!html/.gitkeep
|
||||
node_modules
|
47
docs/index.md
Normal file
47
docs/index.md
Normal file
@ -0,0 +1,47 @@
|
||||
EN | [RU](index_ru.md)
|
||||
|
||||
# How to use the service
|
||||
|
||||
## Easiest method
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
httpa () {
|
||||
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p 2222.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 -p 2222.neur0tx.site
|
||||
```
|
||||
* Forward service on port `:8080` with custom subdomain:
|
||||
```sh
|
||||
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh -p 2222.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
|
||||
}
|
||||
```
|
||||
* 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
|
||||
}
|
||||
```
|
47
docs/index_ru.md
Normal file
47
docs/index_ru.md
Normal file
@ -0,0 +1,47 @@
|
||||
[EN](index.md) | RU
|
||||
|
||||
# Инструкция по использованию сервиса
|
||||
|
||||
## Самый простой метод
|
||||
|
||||
Добавьте код ниже в `~/.bashrc` или `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
http () {
|
||||
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R 80:localhost:"$1" ssh -p 2222.neur0tx.site
|
||||
}
|
||||
|
||||
httpa () {
|
||||
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p 2222.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 -p 2222.neur0tx.site
|
||||
```
|
||||
* Проксировать сервис на порту `:8080` на заранее определенный поддомен:
|
||||
```sh
|
||||
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh -p 2222.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
|
||||
}
|
||||
```
|
||||
* Та же функция с кастомным поддоменом (пример: `httpa subdomain 80`):
|
||||
```bash
|
||||
httpa () {
|
||||
ssh -p 2222 -oHostKeyAlgorithms=+ssh -p 2222-rsa -R "$1":80:localhost:"$2" ssh -p 2222.neur0tx.site
|
||||
}
|
||||
```
|
0
html/.gitkeep
Normal file
0
html/.gitkeep
Normal file
108
layout/assets/hljs-solarized-dark.min.css
vendored
Normal file
108
layout/assets/hljs-solarized-dark.min.css
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
/*
|
||||
|
||||
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
/* background: #fdf6e3; */
|
||||
color: #657b83;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.diff .hljs-header,
|
||||
.hljs-doctype,
|
||||
.hljs-pi,
|
||||
.lisp .hljs-string,
|
||||
.hljs-javadoc {
|
||||
color: #93a1a1;
|
||||
}
|
||||
|
||||
/* Solarized Green */
|
||||
.hljs-keyword,
|
||||
.hljs-winutils,
|
||||
.method,
|
||||
.hljs-addition,
|
||||
.css .hljs-tag,
|
||||
.hljs-request,
|
||||
.hljs-status,
|
||||
.nginx .hljs-title {
|
||||
color: #859900;
|
||||
}
|
||||
|
||||
/* Solarized Cyan */
|
||||
.hljs-number,
|
||||
.hljs-command,
|
||||
.hljs-string,
|
||||
.hljs-tag .hljs-value,
|
||||
.hljs-rules .hljs-value,
|
||||
.hljs-phpdoc,
|
||||
.hljs-dartdoc,
|
||||
.tex .hljs-formula,
|
||||
.hljs-regexp,
|
||||
.hljs-hexcolor,
|
||||
.hljs-link_url {
|
||||
color: #2aa198;
|
||||
}
|
||||
|
||||
/* Solarized Blue */
|
||||
.hljs-title,
|
||||
.hljs-localvars,
|
||||
.hljs-chunk,
|
||||
.hljs-decorator,
|
||||
.hljs-built_in,
|
||||
.hljs-identifier,
|
||||
.vhdl .hljs-literal,
|
||||
.hljs-id,
|
||||
.css .hljs-function {
|
||||
color: #268bd2;
|
||||
}
|
||||
|
||||
/* Solarized Yellow */
|
||||
.hljs-attribute,
|
||||
.hljs-variable,
|
||||
.lisp .hljs-body,
|
||||
.smalltalk .hljs-number,
|
||||
.hljs-constant,
|
||||
.hljs-class .hljs-title,
|
||||
.hljs-parent,
|
||||
.hljs-type,
|
||||
.hljs-link_reference {
|
||||
color: #b58900;
|
||||
}
|
||||
|
||||
/* Solarized Orange */
|
||||
.hljs-preprocessor,
|
||||
.hljs-preprocessor .hljs-keyword,
|
||||
.hljs-pragma,
|
||||
.hljs-shebang,
|
||||
.hljs-symbol,
|
||||
.hljs-symbol .hljs-string,
|
||||
.diff .hljs-change,
|
||||
.hljs-special,
|
||||
.hljs-attr_selector,
|
||||
.hljs-subst,
|
||||
.hljs-cdata,
|
||||
.css .hljs-pseudo,
|
||||
.hljs-header {
|
||||
color: #cb4b16;
|
||||
}
|
||||
|
||||
/* Solarized Red */
|
||||
.hljs-deletion,
|
||||
.hljs-important {
|
||||
color: #dc322f;
|
||||
}
|
||||
|
||||
/* Solarized Violet */
|
||||
.hljs-link_label {
|
||||
color: #6c71c4;
|
||||
}
|
||||
|
||||
.tex .hljs-formula {
|
||||
background: #eee8d5;
|
||||
}
|
42
layout/assets/pilcrow.css
Normal file
42
layout/assets/pilcrow.css
Normal file
@ -0,0 +1,42 @@
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
h1:hover .header-link:before,
|
||||
h2:hover .header-link:before,
|
||||
h3:hover .header-link:before,
|
||||
h4:hover .header-link:before,
|
||||
h5:hover .header-link:before,
|
||||
h6:hover .header-link:before {
|
||||
content: "\00B6";/* pilcrow */
|
||||
color: #888;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.header-link {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -0.7em;
|
||||
display: block;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
h1:hover .header-link,
|
||||
h2:hover .header-link,
|
||||
h3:hover .header-link,
|
||||
h4:hover .header-link,
|
||||
h5:hover .header-link,
|
||||
h6:hover .header-link {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
}
|
300
layout/assets/style.css
Normal file
300
layout/assets/style.css
Normal file
@ -0,0 +1,300 @@
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
audio,
|
||||
canvas,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
a:focus {
|
||||
outline: thin dotted;
|
||||
}
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
q {
|
||||
quotes: "\201C" "\201D" "\2018" "\2019";
|
||||
}
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
legend {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
font-size: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
button,
|
||||
input {
|
||||
line-height: normal;
|
||||
}
|
||||
button,
|
||||
html input[type="button"],
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
cursor: pointer;
|
||||
}
|
||||
button[disabled],
|
||||
input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
textarea {
|
||||
overflow: auto;
|
||||
vertical-align: top;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
@import url(//fonts.googleapis.com/css?family=PT+Sans);
|
||||
@import url(//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700);
|
||||
html {
|
||||
font-family: 'PT Sans', sans-serif;
|
||||
}
|
||||
pre,
|
||||
code {
|
||||
font-family: monospace, sans-serif;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'PT Sans Narrow', sans-serif;
|
||||
font-weight: 700;
|
||||
}
|
||||
html {
|
||||
background-color: #002b36;
|
||||
color: #839496;
|
||||
margin: 1em;
|
||||
}
|
||||
code {
|
||||
background-color: #073642;
|
||||
padding: 2px;
|
||||
}
|
||||
a {
|
||||
color: #b58900;
|
||||
}
|
||||
a:visited {
|
||||
color: #cb4b16;
|
||||
}
|
||||
a:hover {
|
||||
color: #cb4b16;
|
||||
}
|
||||
h1 {
|
||||
color: #d33682;
|
||||
}
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #859900;
|
||||
}
|
||||
pre {
|
||||
background-color: #002b36;
|
||||
color: #839496;
|
||||
border: 1pt solid #586e75;
|
||||
padding: 1em;
|
||||
box-shadow: 5pt 5pt 8pt #073642;
|
||||
}
|
||||
pre code {
|
||||
background-color: #002b36;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2.8em;
|
||||
}
|
||||
h2 {
|
||||
font-size: 2.4em;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
h4 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
h5 {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
h6 {
|
||||
font-size: 1.15em;
|
||||
}
|
||||
.tag {
|
||||
background-color: #073642;
|
||||
color: #d33682;
|
||||
padding: 0 0.2em;
|
||||
}
|
||||
.todo,
|
||||
.next,
|
||||
.done {
|
||||
color: #002b36;
|
||||
background-color: #dc322f;
|
||||
padding: 0 0.2em;
|
||||
}
|
||||
.tag {
|
||||
-webkit-border-radius: 0.35em;
|
||||
-moz-border-radius: 0.35em;
|
||||
border-radius: 0.35em;
|
||||
}
|
||||
.TODO {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
background-color: #2aa198;
|
||||
}
|
||||
.NEXT {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
background-color: #268bd2;
|
||||
}
|
||||
.ACTIVE {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
background-color: #268bd2;
|
||||
}
|
||||
.DONE {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
background-color: #859900;
|
||||
}
|
||||
.WAITING {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
foreground-color: #cb4b16;
|
||||
}
|
||||
.HOLD {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
foreground-color: #d33682;
|
||||
}
|
||||
.NOTE {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
foreground-color: #d33682;
|
||||
}
|
||||
.CANCELLED {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
foreground-color: #859900;
|
||||
}
|
||||
#container {
|
||||
max-width: 900px;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
16
layout/page.html
Normal file
16
layout/page.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{title}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link type="text/css" rel="stylesheet" href="{{asset 'style.css'}}" />
|
||||
<link type="text/css" rel="stylesheet" href="{{asset 'pilcrow.css'}}" />
|
||||
<link type="text/css" rel="stylesheet" href="{{asset 'hljs-solarized-dark.min.css'}}"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
{{~> content}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
1109
package-lock.json
generated
Normal file
1109
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
17
package.json
Normal file
17
package.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "neur0tx-proxy-docs",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"doc": "docs"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npx generate-md --layout ./layout --input ./docs --output ./html"
|
||||
},
|
||||
"author": "Neur0toxine",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"markdown-styles": "^3.2.0"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user