88 lines
3.8 KiB
HTML
88 lines
3.8 KiB
HTML
|
<!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="https://proxy.neur0tx.site">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:"$1" ssh.neur0tx.site
|
||
|
}
|
||
|
|
||
|
httpa () {
|
||
|
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" 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><something>.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:"$1" 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 "$1":80:localhost:"$2" ssh.neur0tx.site
|
||
|
}
|
||
|
</code></pre>
|
||
|
</article>
|
||
|
<a href="https://gitea.neur0tx.site/Neur0toxine/neur0tx.site/_edit/master/proxy.md" rel="nofollow" target="_blank">✍️ Edit this page on Gitea.</a>
|
||
|
<footer>
|
||
|
Copyright © Neur0toxine ·
|
||
|
Last modified <time datetime="2023-11-12T20:09:16Z
|
||
|
">Sun Nov 12 20:09:16 UTC 2023
|
||
|
</time> ·
|
||
|
</footer>
|
||
|
<script type="application/javascript" src="/assets/js/highlight.js"></script>
|
||
|
<script type="application/javascript" src="/assets/js/umbrella.js"></script>
|
||
|
<script type="application/javascript" src="/assets/js/live.js"></script>
|
||
|
|
||
|
<script>
|
||
|
hljs.highlightAll();
|
||
|
</script>
|
||
|
</body>
|
||
|
|
||
|
</html>
|