mirror of
https://github.com/ShaYmez/HBMonv2.git
synced 2024-11-08 08:46:28 -05:00
small update
This commit is contained in:
parent
7e5b6c943c
commit
9922d3dd74
15
monitor.py
15
monitor.py
@ -1003,11 +1003,24 @@ if __name__ == '__main__':
|
||||
|
||||
# Connect to HBlink
|
||||
reactor.connectTCP(HBLINK_IP, HBLINK_PORT, reportClientFactory())
|
||||
|
||||
|
||||
# Create websocket server to push content to clients
|
||||
# HBmonitor does not require the use of SSL as no "sensitive data" is sent to it but if you want to use SSL:
|
||||
# create websocket server to push content to clients via SSL https://
|
||||
# the web server apache2 should be configured with a signed certificate for example Letsencrypt
|
||||
# we need install pyOpenSSL required by twisted: pip3 install pyOpenSSL
|
||||
# and add load ssl module in line number 43: from twisted.internet import reactor, task, ssl
|
||||
#
|
||||
# put certificate https://letsencrypt.org/ used in apache server
|
||||
#certificate = ssl.DefaultOpenSSLContextFactory('/etc/letsencrypt/live/hbmon.dmrserver.org/privkey.pem', '/etc/letsencrypt/live/hbmon.dmrserver.org/cert.pem')
|
||||
#dashboard_server = dashboardFactory('wss://*:9000')
|
||||
#dashboard_server.protocol = dashboard
|
||||
#reactor.listenSSL(9000, dashboard_server,certificate)
|
||||
|
||||
# Create websocket server to push content to clients via http:// non SSL
|
||||
dashboard_server = dashboardFactory('ws://*:9000')
|
||||
dashboard_server.protocol = dashboard
|
||||
reactor.listenTCP(9000, dashboard_server)
|
||||
|
||||
|
||||
reactor.run()
|
||||
|
Loading…
Reference in New Issue
Block a user