Add the new Gateway/Relay and make them act in HTTPS

This commit is contained in:
AnthorNet 2017-06-29 14:01:40 +02:00
parent 8bffbe91fa
commit 97ed7ad101
4 changed files with 21 additions and 8 deletions

View File

@ -6,10 +6,12 @@ var updateInterval = 60000,
relayBottlePort = 9090, relayBottlePort = 9090,
gateways = [ gateways = [
'eddn.edcd.io',
'eddn-gateway.elite-markets.net' 'eddn-gateway.elite-markets.net'
], // Must find a way to bind them to monitor ], // Must find a way to bind them to monitor
relays = [ relays = [
'eddn.edcd.io',
'eddn-relay.elite-markets.net' 'eddn-relay.elite-markets.net'
]; // Must find a way to bind them to monitor ]; // Must find a way to bind them to monitor
@ -539,7 +541,7 @@ var start = function(){
gateway = gateway.replace(':8500', ''); gateway = gateway.replace(':8500', '');
$("select[name=gateways]").append($('<option>', { $("select[name=gateways]").append($('<option>', {
value: 'http://' + gateway + ':' + gatewayBottlePort + '/stats/', value: 'https://' + gateway + ':' + gatewayBottlePort + '/stats/',
text : gateway text : gateway
})); }));
@ -586,7 +588,7 @@ var start = function(){
//relays = relays.sort(); //relays = relays.sort();
$.each(relays, function(k, relay){ $.each(relays, function(k, relay){
$("select[name=relays]").append($('<option>', { $("select[name=relays]").append($('<option>', {
value: 'http://' + relay + ':' + relayBottlePort + '/stats/', value: 'https://' + relay + ':' + relayBottlePort + '/stats/',
text : relay text : relay
})); }));

View File

@ -213,8 +213,13 @@ class MalformedUploadError(Exception):
def main(): def main():
loadConfig() loadConfig()
configure() configure()
run(host=Settings.GATEWAY_HTTP_BIND_ADDRESS, port=Settings.GATEWAY_HTTP_PORT, server='gevent') run(
host=Settings.GATEWAY_HTTP_BIND_ADDRESS,
port=Settings.GATEWAY_HTTP_PORT,
server='gevent',
certfile='/etc/letsencrypt/live/eddn.edcd.io/fullchain.pem',
keyfile='/etc/letsencrypt/live/eddn.edcd.io/privkey.pem'
)
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@ -111,7 +111,13 @@ def main():
loadConfig() loadConfig()
r = Relay() r = Relay()
r.start() r.start()
bottle_run(host='0.0.0.0', port=9090, server='gevent') bottle_run(
host='0.0.0.0',
port=9090,
server='gevent',
certfile='/etc/letsencrypt/live/eddn.edcd.io/fullchain.pem',
keyfile='/etc/letsencrypt/live/eddn.edcd.io/privkey.pem'
)
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -13,7 +13,7 @@ class _Settings(object):
# Relay settings # Relay settings
############################################################################### ###############################################################################
RELAY_RECEIVER_BINDINGS = ["tcp://eddn-gateway.elite-markets.net:8500"] RELAY_RECEIVER_BINDINGS = ["tcp://eddn.edcd.io:8500", "tcp://eddn-gateway.elite-markets.net:8500"]
RELAY_SENDER_BINDINGS = ["tcp://*:9500"] RELAY_SENDER_BINDINGS = ["tcp://*:9500"]
@ -70,9 +70,9 @@ class _Settings(object):
# Monitor settings # Monitor settings
############################################################################### ###############################################################################
MONITOR_RECEIVER_BINDINGS = ["tcp://eddn-gateway.elite-markets.net:8500"] MONITOR_RECEIVER_BINDINGS = ["tcp://eddn.edcd.io:8500", "tcp://eddn-gateway.elite-markets.net:8500"]
MONITOR_DB = "/opt/eddn/EDDN_Monitor.s3db" MONITOR_DB = "/home/EDDN_Monitor.s3db"
MONITOR_DECOMPRESS_MESSAGES = True MONITOR_DECOMPRESS_MESSAGES = True