diff --git a/README.md b/README.md new file mode 100644 index 0000000..19ef585 --- /dev/null +++ b/README.md @@ -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//PATH + +that get proxied and end up on <peer id> 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 diff --git a/peerlink/__main__.py b/peerlink/__main__.py deleted file mode 100644 index 6bc39a0..0000000 --- a/peerlink/__main__.py +++ /dev/null @@ -1,2 +0,0 @@ -import server -server.run() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..c4d16c0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +ed25519>=1.3 +pyopenssl>=0.14 +requests>=2.3.0 +tornado==4.0 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e195909 --- /dev/null +++ b/setup.py @@ -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)', + ], +)