Saljut - your gate to the scuttleweb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 3.0KB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
11 months ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # Saljut
  2. A web-ssb-proxy. Saljut is a web-proxy that let's you acess websites hosted on
  3. SSB as well as a publishing-tool to publish websites to SSB.
  4. ## Installation
  5. ### Dependencies
  6. To build saljut, you first need a working [leningen](https://leiningen.org/)
  7. installation. As well as a recent version of
  8. [OpenJDK](https://openjdk.java.net/).
  9. To integrate well in a linux-environment you'll need to install
  10. * nginx
  11. * dnsmasq
  12. * ssb-server
  13. ### Building Saljut
  14. First, clone the git-repository and build the jar.
  15. ```
  16. git clone ssb://%4ZjCXSI6Q86smKrR88zaVxqrAICuJmkZXfezTCAkszA=.sha256 saljut
  17. cd saljut
  18. lein uberjar
  19. ```
  20. The jar-file should noe be located in ```target/uberjar```.
  21. ### Integrating Saljut into your environment
  22. First copy the jar to some unsuspicious place (e.g. ```/local/opt/saljut```) and
  23. place a small start-script
  24. ```bash
  25. #! /bin/sh
  26. java -jar [the path to the jar-file] "$@"
  27. ```
  28. somewhere in your ```$PATH``` (e.g. ```/local/bin/saljut```) and make it executable
  29. ```
  30. chmod +x [the path to your start-script].
  31. ```
  32. Now place the following config-snippet into the ```http```-section
  33. ```nginx
  34. server {
  35. listen 3030;
  36. server_name *.ssb;
  37. location / {
  38. proxy_set_header Host $host;
  39. proxy_pass http://localhost:9876;
  40. }
  41. }
  42. server {
  43. listen 3030;
  44. server_name ~.* ;
  45. location / {
  46. resolver 127.0.0.1;
  47. proxy_set_header X-Real-IP $remote_addr;
  48. proxy_pass $scheme://$host;
  49. }
  50. }
  51. ```
  52. of ```/etc/nginx/nginx.conf``` and start/enable the nginx-service
  53. ```
  54. systemctl enable --now nginx
  55. ```
  56. Last but not least, nginx needs a dns-resolver running in this setup, so you
  57. should start/enable dnsmasq as well
  58. ```
  59. systemctl enable --now dnsmasq
  60. ```
  61. ### Browser setup
  62. In firefox, open the settings-page, scroll down to "Network-Settings" and
  63. configure the web-proxy as shown here:
  64. ![firefox_settings.png](&gBS+8zWjqh1iE6wIpf6HypACN9HsBcqVw60+CTkpp/8=.sha256)
  65. If you can't see the picture because you are reading this outside git-ssb, setup:
  66. * Manual Proxy Configuration
  67. * http proxy -> localhost Port 3030
  68. * Uncheck the "Use for all protocols" box
  69. * Leave all other protocol fields empty and set all other ports to 0
  70. ## Usage
  71. Start the saljut-proxy
  72. ```
  73. saljut start
  74. ```
  75. Publish a website
  76. ```
  77. saljut publish <path to folder> <subdomain>
  78. ```
  79. It will now be accessible under ```subdomain.your-base32-pubkey.b32.ssb```.
  80. If the alias ot the identity contains only ```a-z 0-9 -```, you can also use ```subdomain.alias.ssb```.
  81. Get the base32-key to a SSB-id
  82. ```
  83. saljut convert b32 <ssb-id>
  84. ```
  85. Get the base64 SSB-id from a base32-key
  86. ```
  87. saljut convert b64 <basae32-key>
  88. ```
  89. ## More Information / Support
  90. The SSB-Info-Thread is found here
  91. ```%rr5HHGlQ+GNk7xwRD7wpofzl3nv/KKzo0Yhjfg+L0yI=.sha256```.
  92. ## Contributors
  93. Vincent Truchseß - redtux@posteo.net
  94. ## License
  95. Copyright - see contributors.
  96. This code is published under the GNU General Public License, version 2. You should have recieved a copy
  97. of this license [here](LICENSE). You can also find a copy of this license
  98. under [](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).