add README and setup.py

This commit is contained in:
j 2014-09-30 18:04:04 +02:00
parent cbb6e77b20
commit bde2c963a7
4 changed files with 86 additions and 2 deletions

41
README.md Normal file
View file

@ -0,0 +1,41 @@
## peerlink
# get peerlink
git clone https://git.0x2620.org/peerlink.git
# install dependencies
pip3 install -r requirements.txt
# start peerlink
python3 bin/peerlink
# register your application
register application
POST http://[::1]:8842/add
{
"name": "yourappname",
"url": "http://[::1]:YOURPORT/remote/"
}
now peers can make requetss to
GET|POST http://[::1]:8842/<peer id>/PATH
that get proxied and end up on &lt;peer id&gt; at
GET|POST http://[::1]:YOURPORT/remote/PATH
requests have a From: header to indicate the
remote peer id making the request
# local peer discovery
peerlink discovers peers in the local network,
GET http://[::1]:8842/info
contains info on currently visible peers

View file

@ -1,2 +0,0 @@
import server
server.run()

4
requirements.txt Normal file
View file

@ -0,0 +1,4 @@
ed25519>=1.3
pyopenssl>=0.14
requests>=2.3.0
tornado==4.0

41
setup.py Normal file
View file

@ -0,0 +1,41 @@
#!/usr/bin/env python3
# vi:si:et:sw=4:sts=4:ts=4
from setuptools import setup
import subprocess
def get_version():
p = subprocess.Popen(['git', 'describe', '--tags', '--always'], stdout=subprocess.PIPE)
v, e = p.communicate()
return v.decode().strip()
setup(
name="peerlink",
version=get_version(),
description='''peerlink - direct link for networked applications''',
author="j",
author_email="j@mailb.org",
url="http://openmedialibrary.org/peerlink",
download_url="http://git.0x2620.org/peerlink/download",
license="GPLv3",
scripts = [
'bin/peerlink',
],
packages=[
'peerlink'
],
install_requires=[
'ed25519>=1.3',
'pyopenssl>=0.14',
'requests>=2.3.0',
'tornado==4.0'
],
keywords = [],
classifiers = [
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'License :: OSI Approved :: GNU General Public License (GPL)',
],
)