Saljut - your gate to the scuttleweb
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
Vincent Truchseß ce67eb93b0 added publish error output 9 месяцев назад
doc initial commit 9 месяцев назад
src/saljut added publish error output 9 месяцев назад
test/saljut_publish initial commit 9 месяцев назад
.gitignore initial commit 9 месяцев назад
CHANGELOG.md initial commit 9 месяцев назад
LICENSE updated readme and LICENSE 9 месяцев назад
README.md add ssb-server to dependencies 9 месяцев назад
project.clj Implemented saljut-proxy prototype 9 месяцев назад

README.md

Saljut

A web-ssb-proxy. Saljut is a web-proxy that let's you acess websites hosted on SSB as well as a publishing-tool to publish websites to SSB.

Installation

Dependencies

To build saljut, you first need a working leningen installation. As well as a recent version of OpenJDK.

To integrate well in a linux-environment you'll need to install

  • nginx
  • dnsmasq
  • ssb-server

Building Saljut

First, clone the git-repository and build the jar.

git clone ssb://%4ZjCXSI6Q86smKrR88zaVxqrAICuJmkZXfezTCAkszA=.sha256 saljut
cd saljut
lein uberjar

The jar-file should noe be located in target/uberjar.

Integrating Saljut into your environment

First copy the jar to some unsuspicious place (e.g. /local/opt/saljut) and place a small start-script

#! /bin/sh

java -jar [the path to the jar-file] "$@"

somewhere in your $PATH (e.g. /local/bin/saljut) and make it executable

chmod +x [the path to your start-script].

Now place the following config-snippet into the http-section

server {
  listen 3030;
  server_name *.ssb;

  location / {
    proxy_set_header Host $host;
    proxy_pass http://localhost:9876;
  }
}

server {
  listen 3030;
  server_name ~.* ;

  location / {
    resolver 127.0.0.1;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_pass $scheme://$host;
  }
}

of /etc/nginx/nginx.conf and start/enable the nginx-service

systemctl enable --now nginx

Last but not least, nginx needs a dns-resolver running in this setup, so you should start/enable dnsmasq as well

systemctl enable --now dnsmasq

Browser setup

In firefox, open the settings-page, scroll down to “Network-Settings” and configure the web-proxy as shown here: firefox_settings.png

If you can't see the picture because you are reading this outside git-ssb, setup:

  • Manual Proxy Configuration
  • http proxy -> localhost Port 3030
  • Uncheck the “Use for all protocols” box
  • Leave all other protocol fields empty and set all other ports to 0

Usage

Start the saljut-proxy

saljut start

Publish a website

saljut publish <path to folder> <subdomain>

It will now be accessible under subdomain.your-base32-pubkey.b32.ssb.

If the alias ot the identity contains only a-z 0-9 -, you can also use subdomain.alias.ssb.

Get the base32-key to a SSB-id

saljut convert b32 <ssb-id>

Get the base64 SSB-id from a base32-key

saljut convert b64 <basae32-key>

More Information / Support

The SSB-Info-Thread is found here %rr5HHGlQ+GNk7xwRD7wpofzl3nv/KKzo0Yhjfg+L0yI=.sha256.

Contributors

Vincent Truchseß - redtux@posteo.net

License

Copyright - see contributors. This code is published under the GNU General Public License, version 2. You should have recieved a copy of this license here. You can also find a copy of this license under [](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).