Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
528917e
Update copyright year/link
LittleVulpix Apr 25, 2016
f63f535
Update addkeyweb_success.html
LittleVulpix Apr 25, 2016
9bdcf85
Update api_error_pretty.html
LittleVulpix Apr 25, 2016
f00a333
Update edit_ui.html
LittleVulpix Apr 25, 2016
2f98596
Update fourohfour.html
LittleVulpix Apr 25, 2016
c10ea92
Update lookup_home.html
LittleVulpix Apr 25, 2016
278e06f
Update onemomentplease.html
LittleVulpix Apr 25, 2016
e527bb4
Update public_userlist.html
LittleVulpix Apr 25, 2016
d47a922
Merge pull request #1 from LittleVulpix/Update-copyright
LittleVulpix Apr 25, 2016
23b2284
Merge pull request #2 from subliun/master
LittleVulpix Apr 27, 2016
b653cf7
Get rid of some crawlers
LittleVulpix May 11, 2016
2b2e9f2
Add the robots.txt file to be served
LittleVulpix May 11, 2016
f852b19
Merge pull request #3 from LittleVulpix/LittleVulpix-robotstxt
LittleVulpix May 11, 2016
140f964
Also delete item from cache...
LittleVulpix Jul 3, 2016
2fff88a
Merge #4 - Fix cache for user deletion
LittleVulpix Jul 3, 2016
3c7fa35
Switch original link.
LittleVulpix Jul 8, 2016
3540ae4
Disallow crawling of specific users, allow root
LittleVulpix Jul 21, 2016
08e5d3d
Add a way to contact me
LittleVulpix Jul 21, 2016
8e7a235
Add a more apparent way of contacting me
LittleVulpix Aug 29, 2016
edf6c53
Merge pull request #5 from LittleVulpix/Contact-the-maintainer
LittleVulpix Aug 29, 2016
cc3dae9
Modify the way of contacting me, add tox contact
LittleVulpix Sep 12, 2016
7b59667
Update README.md
bennabiy Dec 27, 2016
5089026
Merge pull request #7 from bennabiy/patch-2
LittleVulpix Dec 28, 2016
f9aaa91
Update README.md
LittleVulpix Dec 28, 2016
8c013ea
Merge pull request #8 from LittleVulpix/fix-missing-dependency
LittleVulpix Dec 28, 2016
6ed4909
@toxme.io is not an e-mail domain
LittleVulpix Jan 4, 2017
1e8ab68
Merge pull request #9 from LittleVulpix/not-an-email
LittleVulpix Jan 4, 2017
49d5290
Fix headings in README
TheDcoder Apr 1, 2017
40048e5
Merge pull request #10 from TheDcoder/patch-1
LittleVulpix Apr 1, 2017
d80ad34
Show full tox ID even when user has no bio
LittleVulpix Jul 4, 2017
313d6f6
Merge pull request #11 from LittleVulpix/LittleVulpix-show-id
LittleVulpix Jul 4, 2017
65c1fc1
Add echobot as a test contact
LittleVulpix Jul 5, 2017
f3344ec
Merge pull request #12 from LittleVulpix/LittleVulpix-echobot
LittleVulpix Jul 5, 2017
f91a3f2
Add favicon to the template
LittleVulpix Sep 7, 2017
08ad329
Upload the favicon file
LittleVulpix Sep 7, 2017
c9e68b6
Merge pull request #13 from LittleVulpix/favicon
LittleVulpix Sep 7, 2017
061c944
Fix headings in doc/config.md
robinlinden Nov 3, 2017
98b3ffd
Merge pull request #15 from robinlinden/fix-markdown
LittleVulpix Nov 27, 2017
e62ccd7
Omit Bios from public view (#16)
Jan 12, 2018
c852428
toxme.io copyright update for 2018 (#17)
LittleVulpix Jan 12, 2018
fd5613c
Remove CDN dependency for the font+css (#18)
LittleVulpix Jan 12, 2018
ba2c5e3
This is why we can't have nice things. (#19)
LittleVulpix Mar 6, 2018
1895c8f
No more friends (#22)
LittleVulpix Mar 7, 2019
045b7cd
Don't redirect to friends, friends are no more.
LittleVulpix May 30, 2019
1d8aed9
It is 2019 my dudes. (#24)
LittleVulpix Jun 6, 2019
52c7319
RIP
LittleVulpix Oct 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 45 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,74 @@
#ToxMe source
## I no longer run this service.

https://blog.fefe.de/?ts=a3695410 and this is why we can't have nice things.

Due to recent uninformed and stupid decisions by people who should uphold and protect the law and order, and because I have no need of such drama in my life, I'm no longer maintaining this service.

You can find me on toktok IRC if you are interested in having the torch passed to you, but I'll only accept trustworthy individuals I've known to be active in the community/dev team.

So long.


~~## You can contact the maintainer of the toxme.io directly.~~

~~I can be found on freenode IRC, channel #tox , or you can add me from tox by adding [email protected] .~~

~~I can assist you with removing or changing your user account on toxme.io in the event that you forget your toxme.io-generated password.~~

~~However, please note that you need to be able to prove the account in question is yours. This means that you need to have access to your old toxid.~~

~~I am not a tech support for tox issues. If you have an issue with tox, raise a ticket on github or ask someone on the IRC.~~

# ToxMe source

ToxMe is a speedy and feature-packed Tox name resolution server.

##Installing:
## Installing:

Quick notes before we get started, ToxMe's source is not required to access and use it in a client. Additionally, it's being written in OS X and ran on Ubuntu, so please correct any odd quirks I might accidentally include.

###OS X
### OS X
Install homebrew from http://brew.sh

```bash
brew install libsodium python3 git libffi
git clone https://github.com/subliun/toxme
git clone https://github.com/LittleVulpix/toxme
pip install -r misc/requirements.txt
```

And you should be ready!

###Ubuntu
Note: we use Ubuntu 14.04
### Ubuntu
Note: we use Ubuntu 14.04, but newer releases should work too.

```bash
apt-get install python3 python3-pip libffi-dev build-essential wget git sqlite
wget -P /tmp/ https://download.libsodium.org/libsodium/releases/libsodium-1.0.3.tar.gz
cd /tmp/
tar -xvf libsodium-1.0.3.tar.gz
cd libsodium*
apt-get install python3 python3-pip libffi-dev build-essential wget git sqlite libtool autotools-dev automake checkinstall check git yasm
git clone https://github.com/jedisct1/libsodium.git
cd libsodium
git checkout tags/1.0.3
./autogen.sh
./configure --prefix=/usr
make -j4 && make install
cd .. && rm -rf libsodium*
make check
sudo make install
cd ~
git clone https://github.com/subliun/toxme
pip install -r misc/requirements.txt
git clone https://github.com/LittleVulpix/toxme
cd toxme
pip3 install -r misc/requirements.txt
```

### Optional:
#### postgres support:
#####OS X
##### OS X
```brew install postgresql```

#####Ubuntu
##### Ubuntu
```apt-get install libpq-dev```

#####All
##### All ( For Ubuntu, use pip3 instead of pip )
```pip install psycopg2```


##Getting started:
## Getting started:

For most testing and development work you'll need both a config.json and a sqlite3 database.

Expand All @@ -56,11 +78,13 @@ A database can be generated locally by running ```sqlite3 -init misc/structure.s

Now just run python3 src/main.py and it should start automatically!

##Tips:
## Tips:

If you're testing it locally make sure secure_mode in config.json is marked off (0) otherwise you'll be required to reverse proxy it and use an SSL cert

##Documentation:
## Documentation:
- [API reference](/doc/api.md)
- [config options](/doc/config.md)
- [PyToxMe](https://github.com/ToxMe/PyToxMe)

~~
26 changes: 13 additions & 13 deletions doc/config.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
#Config options refrence
# Config options refrence

config.json is a json based set of options evaluated by main.py that set various properties and options in the sever.

###Database URL
### Database URL
```"database_url": "sqlite:///tox.db"```

A SQL alchemy style connector to the database to use. This can be sqlite, postgres, mssql, etc.

###Registration domain
### Registration domain
```"registration_domain": "localhost"```

The domain appended by ToxMe to the end of records (user@localhost for http://localhost/u/user).

###Server port
### Server port
```"server_port": 8080```

The port ToxMe listens on for http.

###Server address
### Server address
```"server_addr": "127.0.0.1"```

The IP ToxMe listens on.

`127.0.0.1` prevents outside connections while `0.0.0.0` allows all.

###PID File
### PID File
```"pid_file": "pidfile.dl"```

Where ToxMe places it's own PID. Useful for daemons.

###Is proxied
### Is proxied
```"is_proxied": 1```

Tells ToxMe to resolve a connecting clients IP from a reverse proxies headers.

###suid
### suid
```"suid": "toxme"```

The user ToxMe runs as, please ensure it exists.

###Sandboxing
### Sandboxing
```"sandbox": 1```

Removes API limits for testing.


###Template
### Template
```"templates" : "tox"```

The template to use for the web interface.

###Find friends
### Find friends
```"findfriends_enabled" : 1```

Enables friend discovery features.

###Number of workers
### Number of workers
```"number_of_workers": 2```

Number of processes to use.
Number of processes to use.
2 changes: 2 additions & 0 deletions src/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ def search_users(self, name, length, num):

def delete_pk(self, pk):
sess = self.gs()
ex = sess.query(User).filter_by(public_key=pk).first()
self.presence_cache[ex.name] = -1
sess.query(User).filter_by(public_key=pk).delete()
sess.commit()
sess.close()
Expand Down
12 changes: 7 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def post(self):
return
elif action == "Delete":
self.settings["local_store"].delete_pk(rec.public_key)
self.redirect("/friends/0")
self.redirect("/")
return

bio = self.get_body_argument("bio", "") or rec.bio
Expand Down Expand Up @@ -747,7 +747,7 @@ def post(self):
return

if self.update_db_entry(rec.public_key, name, pkey, bio, check, privacy, pin):
self.redirect("/friends/0")
self.redirect("/")
return

class AddKeyWeb(APIHandler):
Expand Down Expand Up @@ -859,17 +859,19 @@ def main():
LOGGER.info("Record sign key: {0}".format(crypto_core.verify_key))

templates_dir = "../templates/" + cfg["templates"]
robots_path=os.path.join(os.path.dirname(__file__), "../static")
handlers = [
("/api", _make_handler_for_api_method),
("/pk", PublicKey),
(r"/barcode/(.+)\.svg$", CreateQR),
(r"/u/(.+)?$", LookupAndOpenUser),
(r"^/$", LookupAndOpenUser)
(r"^/$", LookupAndOpenUser),
(r"/add_ui", AddKeyWeb),
(r"/edit_ui", EditKeyWeb),
(r'/robots.txt', tornado.web.StaticFileHandler, {'path': robots_path})
]
if cfg["findfriends_enabled"]:
handlers.append((r"/friends/([0-9]+)$", FindFriends))
handlers.append((r"/add_ui", AddKeyWeb))
handlers.append((r"/edit_ui", EditKeyWeb))
app = tornado.web.Application(
handlers,
template_path=os.path.join(os.path.dirname(__file__), templates_dir),
Expand Down
Binary file added static/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
User-agent: *
Allow: /$

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure the $ mark is only useful in the router regex, marking the end of the line.

Disallow: /
6 changes: 3 additions & 3 deletions templates/tox/add_ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tox ID Service</title>
<link href="/static/tox.css" rel="stylesheet" type="text/css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/static/lookup.js"></script>
</head>
<body>
Expand Down Expand Up @@ -47,8 +47,8 @@
</div>
<div id="footer" class="footer">
<p>
<small class="de-emphasize">Copyright &copy; 2015 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/subliun/toxme">I'm open source!</a></small>
<small class="de-emphasize">Copyright &copy; 2019 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/LittleVulpix/toxme">I'm open source!</a></small>
</p>
</div>
</article>
Expand Down
4 changes: 2 additions & 2 deletions templates/tox/addkeyweb_success.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
</div>
<div id="footer" class="footer">
<p>
<small class="de-emphasize">Copyright &copy; 2015 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/subliun/toxme">I'm open source!</a></small>
<small class="de-emphasize">Copyright &copy; 2019 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/LittleVulpix/toxme">I'm open source!</a></small>
</p>
</div>
</article>
Expand Down
4 changes: 2 additions & 2 deletions templates/tox/api_error_pretty.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<div id="footer" class="footer">
<p>

<small class="de-emphasize">Copyright &copy; 2015 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/subliun/toxme">I'm open source!</a></small>
<small class="de-emphasize">Copyright &copy; 2019 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/LittleVulpix/toxme">I'm open source!</a></small>
</p>
</div>
</article>
Expand Down
6 changes: 3 additions & 3 deletions templates/tox/edit_ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tox ID Service</title>
<link href="/static/tox.css" rel="stylesheet" type="text/css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/static/lookup.js"></script>
</head>
<body>
Expand Down Expand Up @@ -51,8 +51,8 @@
</div>
<div id="footer" class="footer">
<p>
<small class="de-emphasize">Copyright &copy; 2015 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/subliun/toxme">I'm open source!</a></small>
<small class="de-emphasize">Copyright &copy; 2019 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/LittleVulpix/toxme">I'm open source!</a></small>
</p>
</div>
</article>
Expand Down
4 changes: 2 additions & 2 deletions templates/tox/fourohfour.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<div id="footer" class="footer">
<p>

<small class="de-emphasize">Copyright &copy; 2015 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/subliun/toxme">I'm open source!</a></small>
<small class="de-emphasize">Copyright &copy; 2019 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/LittleVulpix/toxme">I'm open source!</a></small>
</p>
</div>
</article>
Expand Down
9 changes: 5 additions & 4 deletions templates/tox/lookup_home.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/static/favicon.ico">
<title>Tox ID Service</title>
<link href="/static/tox.css" rel="stylesheet" type="text/css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/static/lookup.js"></script>
</head>
<body>
Expand All @@ -25,7 +26,7 @@
<input id="search_text" type="text" placeholder="[email protected]">
<button id="search_go"><span class="fa fa-search"></span></button>
</div>
<p>Don't know anyone? <a href="/friends/0">Find some friends here.</a></p>
<p>Want to test toxme? Add echobot! - <a href="/u/echobot">tox://[email protected]</a>
</div>
<div class="chunk results">
<div id="lookup_error" class="chunk report" style="display:none"></div>
Expand All @@ -42,8 +43,8 @@
<div id="footer" class="footer">
<p>

<small class="de-emphasize">Copyright &copy; 2015 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/subliun/toxme">I'm open source!</a></small>
<small class="de-emphasize">Copyright &copy; 2019 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/LittleVulpix/toxme">I'm open source!</a></small>
</p>
</div>
</article>
Expand Down
9 changes: 5 additions & 4 deletions templates/tox/onemomentplease.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
<a href="tox:{{ record.public_key }}{{ record.pin }}{{ record.checksum }}">Click here to add {{record.name}}.</a>
<br><br>You can also add <b>{{ record.name }}@{{ realm }}</b> in your client.
</p>
{% if record.bio %}
<div class="user_entry">
{% if record.bio %}
<p class="quote">{{ record.bio }}</p>
<p class="quote_tail"></p>
<span class="username">
<b>{{ record.name }}</b><span class="de-emphasize">@{{ realm }}</span>
</span>
{% end %}
{% if record.pin %}
<p class="public_id"><b>Full Tox ID</b>: {{ record.public_key }}{{ record.pin }}{{ record.checksum }}</p>
{% end %}
</div>
{% end %}
</div>
<div class="chunk barcode">
<img src="/barcode/{{ url_escape(record.name) }}.svg">
Expand All @@ -42,8 +42,9 @@
<div id="footer" class="footer">
<p>

<small class="de-emphasize">Copyright &copy; 2015 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/subliun/toxme">I'm open source!</a></small> </p>
<small class="de-emphasize">Copyright &copy; 2019 Tox Project. All rights reserved.</small>
<small class="de-emphasize"><a href="https://github.com/LittleVulpix/toxme">I'm open source!</a></small>
</p>
</div>
</article>
</body>
Expand Down
Loading