Explanation
Based django-webtelnet python3.7 + django 2.2.3 achieved. Interested students may be slightly modified to integrate their fortress machine on this basis.
Project Address: https://github.com/leffss/django-webtelnet
Required technology:
- websocket, django-channels to provide support for django websocket
- An analog front end shell library terminal xterm.js
- telnetlib, python comes with a telnet connection library
How to integrate the technology needed?
- xterm.js shell browser of the analog terminal, monitor user input through a user input uploads the websocket to django
- django receive content uploaded by the user, the content of the front page of the user input will be performed by telnetlib established uploaded to a remote server telnet channels
- telnetlib processing results back to the remote server django
- django telnetlib results returned back to the user via websocket
- xterm.js django received data and writes it to return to the front page of
currently existing problems
Due to telnetlib library, the terminal can not display color has been dynamically change the size
start up
pip3 install -r requirements.txt
cd django-webtelnet/webtelnet/
python3 manage.py runserver 0.0.0.0:8000
Access: http://127.0.0.1:8000
Preview