1
1
Fork
You've already forked ShaarliGo
1
mirror of https://code.mro.name/mro/ShaarliGo synced 2026年01月12日 23:04:39 +01:00
🌺 self-reliantly posting on the #Fediverse with painless hosting and security in mind: 1. Rent any web space from EUR 2 mo...
Go 67%
XSLT 15.5%
JavaScript 7.6%
HTML 7.2%
CSS 1.6%
Other 1.1%
Find a file
2023年11月08日 12:13:49 +01:00
static phase out 0x4c.de 2021年03月18日 10:21:43 +01:00
testdata also use <title>. 2019年07月07日 12:16:43 +02:00
tpl back to shaarligo.cgi. 2020年04月27日 11:16:44 +02:00
.gitattributes fix github language detection 2018年03月13日 13:54:20 +01:00
.gitignore Add en theme and make default. 2020年04月26日 17:28:03 +02:00
.travis.yml template & travis 2019年04月16日 22:47:39 +02:00
api0.go - silence Cookie warning, 2021年03月10日 21:35:03 +01:00
api0_test.go toolchain update 2023年11月08日 12:11:04 +01:00
atom.go Copyright 2021年01月05日 17:56:32 +01:00
atom_test.go Copyright 2021年01月05日 17:56:32 +01:00
ban.go Copyright 2021年01月05日 17:56:32 +01:00
ban_test.go Copyright 2021年01月05日 17:56:32 +01:00
build.sh gently towards unicode hashtags https://www.unicode.org/reports/tr31/#D2 2023年11月08日 12:13:49 +01:00
cgi-fake.sh - rename, 2nd. 2017年11月12日 19:55:58 +01:00
comb.go Copyright 2021年01月05日 17:56:32 +01:00
comb_test.go Copyright 2021年01月05日 17:56:32 +01:00
config-core.go Copyright 2021年01月05日 17:56:32 +01:00
config-core_test.go Copyright 2021年01月05日 17:56:32 +01:00
config.go Copyright 2021年01月05日 17:56:32 +01:00
config_test.go Copyright 2021年01月05日 17:56:32 +01:00
doap.rdf Brush up. 2020年04月15日 17:30:54 +02:00
emoji_map.go make #§ and #† proper tags and make emojis implicit tags. 2018年12月08日 23:02:14 +01:00
feedwriter.go comply with go version go1.15.6 darwin/amd64 2021年01月05日 18:35:01 +01:00
feedwriter_test.go Copyright 2021年01月05日 17:56:32 +01:00
flow.dot - rename, 2nd. 2017年11月12日 19:55:58 +01:00
go.mod toolchain update 2023年11月08日 12:11:04 +01:00
go.sum toolchain update 2023年11月08日 12:11:04 +01:00
http.go Copyright 2021年01月05日 17:56:32 +01:00
mastodon.go toolchain update 2023年11月08日 12:11:04 +01:00
mini-build.sh rename ‚pub/posts‘ to ‚=/p and according. 2018年04月12日 23:29:25 +02:00
pinboard.go Copyright 2021年01月05日 17:56:32 +01:00
pinboard_test.go Copyright 2021年01月05日 17:56:32 +01:00
post-test.sh - trailing slashes 2017年11月18日 18:15:36 +01:00
README.md lightning talk link. 2023年10月27日 09:53:00 +02:00
search.go Copyright 2021年01月05日 17:56:32 +01:00
search_test.go Copyright 2021年01月05日 17:56:32 +01:00
ShaarliGo.go toolchain update 2023年11月08日 12:11:04 +01:00
ShaarliGo_test.go toolchain update 2023年11月08日 12:11:04 +01:00
tags.go gently towards unicode hashtags https://www.unicode.org/reports/tr31/#D2 2023年11月08日 12:13:49 +01:00
tags_test.go gently towards unicode hashtags https://www.unicode.org/reports/tr31/#D2 2023年11月08日 12:13:49 +01:00
tools.go Copyright 2021年01月05日 17:56:32 +01:00
tools_test.go Copyright 2021年01月05日 17:56:32 +01:00
version.go gently towards unicode hashtags https://www.unicode.org/reports/tr31/#D2 2023年11月08日 12:13:49 +01:00

🌩 Lightning Talk at the 34c3 🚀

ShaarliGo

🌺 Self-reliant publishing for laypeople like your loved ones and mine. Have a say and not be subjected to any T&Cs, just local law. All without setup headaches, but truly self-sustained and enduringly independent:

Install / Update

  1. Rent any web space from EUR 2 monthly with a domain-name as your enduring digital property (e.g. https://variomedia.de/hosting),
  2. download https://mro.name/Linux-x86_64/shaarligo.cgi and
  3. copy it to the webspace, see e.g. https://www.variomedia.de/faq/Wie-uebertrage-ich-meine-Seite-auf-den-Server/article/177,
  4. set the file permissions (chmod) to read-only+execute for all (numeric 555), see e.g. https://wiki.filezilla-project.org/Other_Features#Chmod,
  5. visit http://example.com/shaarligo.cgi and off you go!

That's if the webserver is Apache (Linux, 64 bit, modules cgi and rewrite) as common with shared hosting.

For lighttpd see static/app/lighttpd.conf. Nginx lacks CGI support (srsly?).

Or build from source at http://mro.name/ShaarliGo

Responsible Disclosure

In case you are reluctant to file a public issue, feel free to email security@mro.name (🔏key).

POSSE

POSSE is an abbreviation for Publish (on your) Own Site, Syndicate Elsewhere, a content publishing model that starts with posting content on your own domain first, then syndicating out copies to 3rd party services with permashortlinks back to the original on your site.

(says https://indieweb.org/POSSE)

You can POSSE to

Pinboard.in

enter your Pinboard Auth Token from https://pinboard.in/settings/password at the end of app/config.yaml like this

posse:- pinboard:https://api.pinboard.in/v1?auth_token=johndoe:XOG6EJIYMIZZprefix:

It's ok to leave prefix empty. Each pinboard post gets a backlink as an additional footer line. If prefix is set, the footer line is prefix + id.

Mastodon

at first manually obtain an access token (example server here is https://social.tchncs.de/):

  1. create an application in https://social.tchncs.de/settings/applications
  2. give it permission write:statuses
  3. note the access token and enter it below.

Then enter the server endpoint plus /api/v1/ and access token into app/config.yaml like so:

posse:- mastodon:https://social.tchncs.de/api/v1/token:...boph1koomie4eikaiG...prefix:

It's ok to leave prefix empty. Each mastodon post gets a backlink as an additional footer line. If prefix is set, the footer line is prefix + id.

Also, if you don't know the token but the endpoint accepts basic auth (pleroma), you may add the credentials to the url for the time being until I figure out how to get a token from pleroma or do proper OAuth2.

Design Goals

  • backwards compatible posting (https://code.mro.name/mro/Shaarli-API-test)
  • trivial installation and minimal hosting requirements (run on simple hosted webspace),
  • keep server lean, especially for readers,
  • standards compliant (Atom, Atompub, WebSub),
  • easy migration from existing shaarlis,
  • run ok without javascript,
  • visitor reading operates on static flat files only (no server code),
  • secure against brute force login attacks,
  • easy translation & skinning,
  • leverage existing, widely deployed web tec (CGI, XSLT, HTML, CSS),
  • easy fail2ban integration / DOS mitigation,
Quality very good good normal irrelevant
Functionality ×ばつ
Reliability ×ばつ
Usability ×ばつ
Efficiency ×ばつ
Changeability ×ばつ
Portability ×ばつ

Dependencies

tl;dr: a webserver that can execute CGIs and serve files from disc.

ShaarliGo is an old-school CGI binary executable, so it needs a webserver to drive it. Configurations come for Apache (automatic, see static/.htaccess) and Lighttpd (see static/app/lighttpd.conf).

As a self-contained, statically linked, Go executable, it has no runtime dependencies and works on a variety of platforms.

ShaarliGo needs write access to the webroot filesystem to once unpack the web assets and when posting update the content.

Storage footprint is <25 KiB per post.

When posting a page, it is once accessed via HTTP GET to infer title, tags and a thumbnail image URL.

Todos

  1. pinned posts,
  2. private posts,
  3. PuSH/PubSubhubbub / WebSub,
  4. import shaarlis (login?),
  5. pwd reset (maybe deleting from app/config.yaml is acceptable),
  6. images/enclosures,
  7. comments,
  8. trackback/pingback

Credits

inspired by and compatible to http://sebsauvage.net/wiki/doku.php?id=php:shaarli.