Browse Source

Added setup.py setup.cfg

pull/12/merge
Sheng 7 years ago
parent
commit
eb55ae2cce
  1. 19
      README.md
  2. 7
      setup.cfg
  3. 46
      setup.py
  4. 4
      webssh/__init__.py
  5. 2
      webssh/_version.py

19
README.md

@ -20,28 +20,26 @@ A simple web application to be used as an ssh client to connect to your ssh serv
### Instructions
```
git clone https://github.com/huashengdun/webssh.git
cd webssh
pip install -r requirements.txt
cd webssh
python main.py
pip install ./webssh/
wssh
```
### Options
```
# configure listen address and port
python main.py --address='0.0.0.0' --port=8000
wssh --address='0.0.0.0' --port=8000
# configure missing host key policy
python main.py --policy=reject
wssh --policy=reject
# configure logging level
python main.py --logging=debug
wssh --logging=debug
# log to file
python main.py --log-file-prefix=main.log
wssh --log-file-prefix=main.log
# more options
python main.py --help
wssh --help
```````
### Nginx config example for running this app behind an nginx server
@ -61,6 +59,3 @@ location / {
### Tips
* Try to use Nginx as a front web server (see config example above) and enable SSL, this will prevent your ssh credentials from being uncovered. Also afterwards the communication between your browser and the web server will be encrypted as they use secured websockets.
* Try to use reject policy as the missing host key policy along with your verified known_hosts, this will prevent man-in-the-middle attacks. The idea is that it checks the system host keys file("~/.ssh/known_hosts") and the application host keys file("./known_hosts") in order, if the ssh server's hostname is not found or the key is not matched, the connection will be aborted.
### Todo
Add more unittests

7
setup.cfg

@ -0,0 +1,7 @@
[metadata]
license_file = LICENSE
[flake8]
exclude = .git,build,dist,tests, __init__.py
max-line-length = 79

46
setup.py

@ -0,0 +1,46 @@
import codecs
from setuptools import setup
from webssh._version import __version__ as version
starts = [u'### Preview', u'![Login]', u'![Terminal]']
def starts_with(line):
for start in starts:
if line.startswith(start):
return True
with codecs.open('README.md', encoding='utf-8') as f:
long_description = ''.join(line for line in f if not starts_with(line))
setup(
name='webssh',
version=version,
description='Web based ssh client',
long_description=long_description,
author='Shengdun Hua',
author_email='webmaster0115@gmail.com',
url='https://github.com/huashengdun/webssh',
packages=['webssh'],
entry_points='''
[console_scripts]
wssh = webssh.main:main
''',
license='MIT',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
install_requires=[
'tornado>=4.5.0',
'paramiko>=2.3.1',
],
)

4
webssh/__init__.py

@ -0,0 +1,4 @@
from webssh._version import __version__, __version_info__
__author__ = 'Shengdun Hua <webmaster0115@gmail.com>'

2
webssh/_version.py

@ -0,0 +1,2 @@
__version_info__ = (0, 1, 0)
__version__ = '.'.join(map(str, __version_info__))
Loading…
Cancel
Save