Compare commits

...

13 Commits
wip ... stable

Author SHA1 Message Date
AJ ONeal f0049c7f06 better param parsing 2019-05-28 17:07:45 -06:00
AJ ONeal b5d57817cf fix some typos, move some phrases to the i18n toml file 2019-05-18 13:52:51 -06:00
AJ ONeal 1e3f7f671d use Root links (new branding) 2019-05-18 13:37:49 -06:00
AJ ONeal 00f3b3ab45 more descriptive wait message 2019-05-18 13:24:19 -06:00
fountainheadllc 19a42a596c Update 'lib/html/index.html' 2019-05-17 16:09:23 +00:00
fountainheadllc de2290dd3e Update 'lib/html/index.html' 2019-05-17 03:14:11 +00:00
fountainheadllc 7db8a7a4ae Update 'lib/html/index.html'
Rachel's edits to index.html to make information easier to understand.
2019-05-15 00:28:15 +00:00
AJ ONeal ceddf444b0 update node version to v10.13 2019-05-11 18:22:20 -06:00
AJ ONeal 76ec7eb066 typo fix conifg -> config 2019-01-17 06:31:32 +00:00
RubenVinke 05dab9a52c 'README.md' updaten 2019-01-16 23:03:09 +00:00
AJ ONeal 20321b2fbe continue when systemd --user fails 2018-11-20 17:01:57 -07:00
AJ ONeal 8bf4bfc7c0 typo fix apt-install -> apt-get install 2018-11-20 16:59:32 -07:00
AJ ONeal 4f0db8bc9c continue when systemd --user fails 2018-11-20 16:57:44 -07:00
7 changed files with 66 additions and 45 deletions

View File

@ -1,8 +1,7 @@
# Telebit™ Remote
# Telebit™ Remote | a [Root](https://rootprojects.org) project
Because friends don't let friends localhost™
| Sponsored by [ppl](https://ppl.family)
| **Telebit Remote**
| [Telebit Relay](https://git.coolaj86.com/coolaj86/telebit-relay.js)
| [sclient](https://telebit.cloud/sclient)
@ -121,8 +120,8 @@ Windows & Node.js
1. Install [node.js](https://nodejs.org)
2. Open _Node.js_
2. Run the command `npm install -g telebit`
2. Copy the example daemon conifg to your user folder `.config/telebit/telebitd.yml` (such as `/Users/John/.config/telebit/telebitd.yml`)
2. Copy the example remote conifg to your user folder `.config/telebit/telebit.yml` (such as `/Users/John/.config/telebit/telebit.yml`)
2. Copy the example daemon config to your user folder `.config/telebit/telebitd.yml` (such as `/Users/John/.config/telebit/telebitd.yml`)
2. Copy the example remote config to your user folder `.config/telebit/telebit.yml` (such as `/Users/John/.config/telebit/telebit.yml`)
2. Change the email address
2. Run `npx telebit init` and follow the instructions
2. Run `npx telebit list`

View File

@ -539,7 +539,7 @@ function getToken(err, state) {
console.error(err);
return;
}
console.info("waiting...");
console.info(TPLS.remote.waiting.replace(/{email}/, state.config.email));
next();
});
}
@ -574,18 +574,12 @@ function getToken(err, state) {
, end: function () {
utils.putConfig('enable', [], function (err) {
if (err) { console.error(err); return; }
console.info("Success");
console.info(TPLS.remote.success);
// workaround for https://github.com/nodejs/node/issues/21319
if (state._useTty) {
setTimeout(function () {
console.info("Some fun things to try first:\n");
console.info(" ~/telebit http ~/public");
console.info(" ~/telebit tcp 5050");
console.info(" ~/telebit ssh auto");
console.info();
console.info("Press any key to continue...");
console.info();
console.info(TPLS.remote.next_steps);
process.exit(0);
}, 0.5 * 1000);
return;

0
bin/telebit.js Normal file → Executable file
View File

View File

@ -6,7 +6,7 @@ Telebit Remote is the T-Rex long-arm of the Internet. UNSTOPPABLE!
Using reliable HTTPS tunneling to establishing peer-to-peer connections,
Telebit is empowering the next generation of tinkerers. Access your devices.
Share your stuff. Be UNSTOPPABLE! (Join us at https://ppl.family)
Share your stuff. Be UNSTOPPABLE! (Join us at https://rootprojects.org)
Usage:
@ -135,7 +135,7 @@ usage: telebit http <path/port/none> [subdomain]
Use cases:
- Lazy man's AirDrop (works or lazy women too!)
- Lazy man's AirDrop (works for lazy women too!)
- Testing dev sites on a phone
- Sharing indie music and movies with friends"
@ -145,7 +145,7 @@ usage: telebit ssh <auto|port|none>
All https traffic will be inspected to see if it looks like ssh Once enabled all traffic that looks
ssh auto Make ssh Just Works (on port 22)
ssh auto Make ssh Just Work (on port 22)
ssh <port> forward ssh traffic to non-standard port
ex: telebit ssh 22 ex: explicitly forward ssh-looking packets to localhost:22
@ -464,6 +464,19 @@ code = "
==============================================
"
waiting = "waiting for you to check your email..."
success = "Success"
next_steps = "Some fun things to try first:
~/telebit http ~/Public
~/telebit tcp 5050
~/telebit ssh auto
Press any key to continue...
"
[remote.setup]
email = "Welcome!

View File

@ -51,18 +51,24 @@
<div>
<h2>You've claimed <span class="js-servername">{{servername}}</span></h2>
<p>Here's some ways you can use it:</p>
<p>Here are some ways you can use Telebit via Terminal or other Command Line Interface:</p>
<div class="code-block">
<pre><code>telebit http ~/Public # serve a public folder
telebit http 3000 # forward all https traffic to localhost:3000
telebit http none # remove all https handlers</code></pre>
<br />
<pre><code>~/telebit ssh auto # allows you to connect to your computer with <br /> ssh-over-https from a different computer</span></code></pre>
<pre><code>~/telebit http ~/Public # serve a public folder
~/telebit http 3000 # forward all https traffic to localhost:3000
~/telebit http none # remove all https handlers</code></pre>
</div>
</div>
<p>You can <em>always</em> tunnel <strong>SSH over HTTPS</strong>,
<p>And remember you can <em>always</em> tunnel <strong>SSH over HTTPS</strong>,
even while you're using it for something else:</p>
<div class="code-block"><pre><code>telebit ssh auto</code></pre>
<p>&nbsp;</p>
<details>
<p><summary><strong>Here are some examples for those of you that want to access files and folders remotely. </strong></summary></p>
<p><strong>This function allows you to connect one computer to another computer you also have SSH on.</strong></p>
<div class="code-block"><pre><code>~/telebit ssh <span class="js-servername">{{servername}}</span></code></pre>
<br>
<pre><code>telebit ssh <span class="js-servername">{{servername}}</span></code></pre>
- or -
<pre><code>ssh -o ProxyCommand='<a href="https://telebit.cloud/sclient">sclient</a> %h' <span class="js-servername">{{servername}}</span></code></pre>
- or -
@ -70,8 +76,7 @@ telebit http none # remove all https handlers</code></pre>
ssh -o ProxyCommand="$proxy_cmd" <span class="js-servername">{{servername}}</span></code></pre>
</div>
<pre><code>ssh -o ProxyCommand='openssl s_client -connect %h:443 -servername %h -quiet' <span class="js-servername">{{servername}}</span></code></pre>
</details>
<!--div class="js-port" hidden>
<h2>You've claimed port <span class="js-serviceport">{{serviceport}}</span></h2>
<p>Here's some ways you can use it:</p>
@ -87,4 +92,4 @@ ssh <span class="js-servername">{{servername}}</span> -p <span class="js-service
<script src="js/app.js"></script>
</body>
</html>
</html>

View File

@ -3,7 +3,7 @@
document.body.hidden = false;
var hash = window.location.hash.substr(1);
var hash = window.location.hash.replace(/^[\/#?]+/, '');
var query = window.location.search;
function parseQuery(search) {

View File

@ -133,8 +133,11 @@ my_tmp="$(mktemp -d -t telebit.XXXXXXXX)"
#TELEBIT_TMP="$my_tmp/telebit"
echo "Installing $my_name to '$TELEBIT_REAL_PATH'"
# v10.2+ has much needed networking fixes, but breaks ursa. v9.x has severe networking bugs. v8.x has working ursa, but requires tls workarounds"
NODEJS_VER="${NODEJS_VER:-v10.6}"
# v10.2+ has much needed networking fixes, but breaks ursa.
# v9.x has severe networking bugs.
# v8.x has working ursa, but requires tls workarounds"
# v10.13 seems to work for me locally (new greenlock)
NODEJS_VER="${NODEJS_VER:-v10.13}"
export NODEJS_VER
export NODE_PATH="$TELEBIT_TMP/lib/node_modules"
export NPM_CONFIG_PREFIX="$TELEBIT_TMP"
@ -493,23 +496,30 @@ elif [ "systemd" == "$my_system_launcher" ]; then
else
echo -n "."
fi
systemctl --user daemon-reload
# enable also puts success output to stderr... why?
systemctl --user enable $my_app >/dev/null 2>/dev/null
#echo " > systemctl --user enable systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer"
#systemctl --user enable systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer
if [ -n "${TELEBIT_DEBUG}" ]; then
echo " > systemctl --user start $my_app"
fi
systemctl --user stop $my_app >/dev/null 2>/dev/null
systemctl --user start $my_app >/dev/null
sleep 2; # give it time to start
_is_running=$(systemctl --user status --no-pager $my_app 2>/dev/null | grep "active.*running")
if [ -z "$_is_running" ]; then
echo "Something went wrong:"
systemctl --user status --no-pager $my_app
exit 1
set +e
if systemctl --user daemon-reload; then
# enable also puts success output to stderr... why?
systemctl --user enable $my_app >/dev/null 2>/dev/null
#echo " > systemctl --user enable systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer"
#systemctl --user enable systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer
if [ -n "${TELEBIT_DEBUG}" ]; then
echo " > systemctl --user start $my_app"
fi
systemctl --user stop $my_app >/dev/null 2>/dev/null
systemctl --user start $my_app >/dev/null
sleep 2; # give it time to start
_is_running=$(systemctl --user status --no-pager $my_app 2>/dev/null | grep "active.*running")
if [ -z "$_is_running" ]; then
echo "Something went wrong:"
systemctl --user status --no-pager $my_app
fi
else
echo "libpam-systemd is missing, which is required on Linux to register Telebit with the user launcher."
echo "sudo apt-get install -y libpam-systemd"
sudo apt-get install -y libpam-systemd
fi
set -e
echo -n "."
else