neur0toxine.pages.neur0tx.site/proxy.html

87 lines
3.7 KiB
HTML
Raw Normal View History

2023-11-12 23:09:21 +03:00
<!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:&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>
<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 &copy; Neur0toxine ·
2023-11-13 09:42:24 +03:00
Last modified <time datetime="2023-11-13T06:42:20Z
">Mon Nov 13 06:42:20 UTC 2023
2023-11-12 23:09:21 +03:00
</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>