twproxy – an authentication proxy for your TiddlyWiki

388 views
Skip to first unread message

Steve Gattuso

unread,
Apr 17, 2016, 11:05:37 AM4/17/16
to TiddlyWiki
Hi everyone!

I'm a newcomer to the TiddlyWiki community (coming off of a long affair with Vimwiki) and have really enjoyed developing my personal wiki so far.

One of my favorite aspects of TiddlyWiki has been that it's web-based, making it possible for me to access my wiki from everywhere (especially my phone). That being said, I'm a bit paranoid, so I was left a bit unsatisfied with the tiddlywiki server's HTTP basic auth for protecting my wiki. ~23 commits later, I've created something called twproxy that I'd like to share with you all today, as I'm hoping somebody other than myself will find it useful.

Essentially it is a simple proxy that puts your wiki behind a username, password, and optional 2-factor auth prompt. This gives you added security in addition to the ability to remember your credentials past one browsing session (I was getting sick and tired of typing my username/password in over and over using basic auth).

The project is open-source and released under the MIT license here: https://github.com/stevenleeg/twproxy

Hope some of you find it useful, and any/all feedback is welcome!
- Steve

Mat

unread,
Apr 17, 2016, 4:50:18 PM4/17/16
to TiddlyWiki
Hi Steve and warmly welcome to both a really fantastic software and a fantastic community. (I'm myself just a long time tw-user, no official role or anything).


I'm a newcomer to the TiddlyWiki community (coming off of a long affair with Vimwiki) and have really enjoyed developing my personal wiki so far.

Given your experience with Vimwiki, I would loooove to hear much more in which ways you feel Vimwiki and TW differ and what Vimwiki is better at/for so TW can be improved even more. Why did you switch to TW, or maybe you use both?
 

One of my favorite aspects of TiddlyWiki has been that it's web-based, making it possible for me to access my wiki from everywhere (especially my phone).

Actually, TW is not "web based" unless you choose to put it on the web. I guess you could call it "browser based" though? The reason I'm picky about this is that on some site someone listed as a negative that "TW is web based so you need an internet connection". Totally false.

As for you creation - that sounds like a valuable addition! I don't personally have any need for it ATM but I'm sure I will one day. Really thanks for sharing, Steve!!

<:-)

Tristan Kohl

unread,
Apr 18, 2016, 5:09:13 AM4/18/16
to TiddlyWiki
HI Steve,

this looks very promising and I can already think of a wiki I want to try this on :)

One little hint: In your readme you wrote port 8080 in the command and in the next sentence it is port 8888.

Cheers
Tristan

Steve Gattuso

unread,
Apr 18, 2016, 11:19:33 AM4/18/16
to tiddl...@googlegroups.com
Thanks for the warm welcome everyone!

One little hint: In your readme you wrote port 8080 in the command and in the next sentence it is port 8888.

This is actually on purpose – port 8080 is the TiddlyWiki server and 8888 is the twproxy URL. The example is a little ambiguous so I just updated the readme to add some clarification. Thanks for the tip!

Given your experience with Vimwiki, I would loooove to hear much more in which ways you feel Vimwiki and TW differ and what Vimwiki is better at/for so TW can be improved even more. Why did you switch to TW, or maybe you use both?

I switched over out of frustration with my lack of use of Vimwiki. Since I could only access it in one place (on my computer within vim) it was largely hidden away from my everday life, making it an easy thing to forget about. TiddlyWiki, on the other hand, is browser-based (thanks for the clarification!) which lets me shove my wiki into my own face as often as possible (by setting it as my homepage and adding bookmarks on the desktop/mobile browsers I use every day). This forces me to have it on my mind and keep writing in it.

There are also a ton of niceties that an HTML-based wiki can provide over a terminal/plaintext, namely images, proper formatting, easier linking, etc. I really like these in day to day use.

One minor frustration I’ve found with TiddlyWiki is the way it handles images. If I want to attach an image to a post I need to upload it to the wiki which makes it automatically load each and every time I bring up my wiki. I could be wrong, but I’m assuming this doesn’t scale well as you add more and more images to your wiki (as the filesize would become enormous and be super slow to load, especially on mobile).

I’m thinking about making my next project be a really simple self-hosted image uploading site that lets you drag in an image and spits out a WikiText formatted image tag for use in the wiki. This fixes the scaling problem by keeping large files (images) external. Maybe some others would find this useful as well :).

Anyways, thanks again for the warm welcome, I’m very excited to be a part of the TiddlyWiki community and hope I can make some useful tools for others as I evolve my own wiki.

Happy wiki-ing, everyone!
- Steve

-- 
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/rQpFXXHF8dA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/96c915cc-8b28-4cfa-922b-3dd647950279%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Sylvain Naudin

unread,
Apr 19, 2016, 6:21:49 AM4/19/16
to TiddlyWiki
Hi,


Le lundi 18 avril 2016 17:19:33 UTC+2, Steve Gattuso a écrit :

One minor frustration I’ve found with TiddlyWiki is the way it handles images.

You still can use img html and don't import and convert it in your wiki to save size.

Also, I've used on a documentation project a macro call and a tiddler to specify image path. Have a look to this thread : [TW5] Set img path variable ?

Cheers,
Sylvain

Mat

unread,
Apr 19, 2016, 10:24:47 AM4/19/16
to TiddlyWiki
@Steve - thanks for your reflections on Vimwiki and TW! Very good to hear.



One minor frustration I’ve found with TiddlyWiki is the way it handles images. If I want to attach an image to a post I need to upload it to the wiki which makes it automatically load each and every time I bring up my wiki. I could be wrong, but I’m assuming this doesn’t scale well as you add more and more images to your wiki (as the filesize would become enormous and be super slow to load, especially on mobile).

As per docs you can have images linked to from the web. And depending on where you host/store your TW you can show a locally stored image like so

[img[file:\\\C:\Users\M\Downloads\done-loud.png]]

Note: This woks on my my PC and also if \ are exchanged for / - but maybe some things depend on browser, OS etc. I host almost all my TWs on TiddlySpot so there you can't store separate images and link like this so it's not an issue for me.

Another tip: tinypng.com

<:-)

Jeremy Ruston

unread,
Apr 24, 2016, 11:04:38 AM4/24/16
to tiddl...@googlegroups.com
Hi Steve

Apologies, I’m late to this thread, and to congratulating you for an excellent, and very useful piece of work. I’ve added a link for 5.1.12:


Best wishes

Jeremy.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Steve Gattuso

unread,
Apr 24, 2016, 11:14:16 AM4/24/16
to tiddl...@googlegroups.com
Woah! That’s awesome, thank you so much for the link. Glad others find this useful and I’m excited to iterate it on it in the future.

If anyone is using it “in production” I’d love to get feedback on what could be improved in future versions.

Cheers,
- Steve
> You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/rQpFXXHF8dA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
> To post to this group, send email to tiddl...@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/46157EF1-C584-48F1-9F0A-B3121EDB1C87%40gmail.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages