https://github.com/stef/tmsg
very simple tor-based chat and file sharing
https://github.com/stef/tmsg
Last synced: over 1 year ago
JSON representation
very simple tor-based chat and file sharing
- Host: GitHub
- URL: https://github.com/stef/tmsg
- Owner: stef
- Created: 2012-10-23T15:25:59.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-10-25T23:07:23.000Z (over 13 years ago)
- Last Synced: 2025-02-01T23:17:20.334Z (over 1 year ago)
- Language: Shell
- Size: 148 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* tmsg
Simple, decentralized multiparty chat and file sharing via tor and ecc
for auth. Receiving peers run tmsg hidden services which handle
incoming messages. If an incoming message starts with an line signed
by a peer the rest of the message will be also verified against this
peers public key and if this succeeds, the message is
displayed. Incoming messages are automatically truncated at 4KB.
depends on socat, seccure, ksh
** set up tor hidden service
start a hidden service like this in /etc/tor/torrc:
#+BEGIN_EXAMPLE
HiddenServiceDir /var/lib/tor/tmsg/
HiddenServicePort 80 127.0.0.1:14444
#+END_EXAMPLE
get your onion address from
#+BEGIN_EXAMPLE
sudo cat /var/lib/tor/tmsg/hostname
#+END_EXAMPLE
This hostname together with the HiddenServicePort 80 from above and
your public key from ./pub form your complete address that you can
share with your friends so you can have a two-way conversation. If you
only share your public key, then you will be able to send to people
accepting your key. But you can only be contacted, if you shared your
onion address with others.
** peers
create a list of all your peers data in this format
#+BEGIN_EXAMPLE
myself myaddress.onion
friend 3m3k8x....onion
mom 8xj8nj38x....onion
myself2 my2ndaddress.onion
#+END_EXAMPLE
trailing space but no key, for read only address
#+BEGIN_EXAMPLE
mydeaddrop mydeadrop.onion
#+END_EXAMPLE
twospaces before public key necessary, but no onion address
#+BEGIN_EXAMPLE
poster
#+END_EXAMPLE
** multiple instances
You can run multiple tmsg instances in parallel, you just have to create more onion services, and run each tmsg in a separate directory
You can change the local port for tmsg like this:
#+BEGIN_EXAMPLE
localport=14445 ./tmsg.sh
#+END_EXAMPLE
** sending
example send to self (assuming you have a line with self and your
onion address and public key in *peers*):
#+BEGIN_EXAMPLE
echo "snafu" | ./tsend.sh self
#+END_EXAMPLE
example send to multiple peers:
#+BEGIN_EXAMPLE
echo "immanentize the eschaton" | ./tsend.sh self hugo angela vlad kim
#+END_EXAMPLE
** complete example
#+BEGIN_EXAMPLE
% git clone git://github.com/stef/tmsg.git
Cloning into 'tmsg'...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 5 (delta 0)
Receiving objects: 100% (5/5), done.
% cd tmsg
% ./tmsg.sh
your public key is: $Crmgt8UIjK|jzRP+UcpShH.7crWl6a0&=Dr<<)fl6|b:4}G70rycD$0Pov?X5(G-$pA?Iz:(<|X6zL
don't forget to add your onion address to ./peers^Z
zsh: suspended ./tmsg.sh
% sudo cat /var/lib/tor/tmsg/hostname
[sudo] password for stef:
hvpd33rd4vhx4upd.onion
% echo 'self hvpd33rd4vhx4upd.onion:80 $Crmgt8UIjK|jzRP+UcpShH.7crWl6a0&=Dr<<)fl6|b:4}G70rycD$0Pov?X5(G-$pA?Iz:(<|X6zL' >peers
% fg
[1] + continued ./tmsg.sh
#+END_EXAMPLE
Meanwhile in a different terminal (but the same directory):
#+BEGIN_EXAMPLE
% echo "hello world" | ./tsend.sh self
#+END_EXAMPLE
after some tor specific delay in the tmsg terminal:
#+BEGIN_EXAMPLE
2012-10-23T22:44:50.717327580+0200 hello world
^C
#+END_EXAMPLE
** poor mans repl
#+BEGIN_EXAMPLE
./tmsg.sh &; while read line; do echo "$line" | ./tsend.sh otheruser; done
#+END_EXAMPLE
** wishlist
- support file uploads
- use ephemeral signing keys