add SSL example conf, fix more commands

This commit is contained in:
KF7EEL 2021-12-10 06:33:52 -08:00
parent 8563f22a6a
commit f511e27aa2
3 changed files with 48 additions and 10 deletions

View File

@ -805,7 +805,7 @@ def process_sms(_rf_src, sms, call_type, system_name):
parse_sms = sms.split(' ')
logger.info(parse_sms)
# Social Status function
if '*SS' in parse_sms[0]:
if '*SS' == parse_sms[0]:
s = ' '
post = s.join(parse_sms[1:])
send_ss(CONFIG, str(get_alias(int_id(_rf_src), subscriber_ids)), post, int_id(_rf_src))
@ -831,13 +831,13 @@ def process_sms(_rf_src, sms, call_type, system_name):
# APRS settings
elif '*ICON' in parse_sms[0]:
user_setting_write(int_id(_rf_src), re.sub(' .*|\*','',sms), re.sub('\*ICON| ','',sms), call_type)
user_setting_write(int_id(_rf_src), re.sub(' .*|\*','', parse_sms[0]), parse_sms[1], call_type)
elif '*SSID' in parse_sms[0]:
user_setting_write(int_id(_rf_src), re.sub(' .*|\*','',sms), re.sub('\*SSID| ','',sms), call_type)
user_setting_write(int_id(_rf_src), re.sub(' .*|\*','', parse_sms[0]), parse_sms[1], call_type)
elif '*COM' in parse_sms[0]:
user_setting_write(int_id(_rf_src), re.sub(' .*|\*','',sms), re.sub('\*COM |\*COM','',sms), call_type)
user_setting_write(int_id(_rf_src), re.sub(' .*|\*','', parse_sms[0]), parse_sms[1], call_type)
elif '*PIN' in parse_sms[0]:
user_setting_write(int_id(_rf_src), re.sub(' .*|\*','',sms), int(re.sub('\*PIN |\*PIN','',sms)), call_type)
user_setting_write(int_id(_rf_src), re.sub(' .*|\*','', parse_sms[0]), int(parse_sms[1]), call_type)
# Write blank entry to cause APRS receive to look for packets for this station.
elif '*APRS ON' in sms or '*APRS on' in sms:
user_setting_write(int_id(_rf_src), 'APRS ON', True, call_type)

View File

@ -9,8 +9,8 @@ services:
context: ./web
ports:
# Port outside container:Port inside container
- 8084:80
- 8083:443
- 80:80
- 443:443
volumes:
# Path to config.py
- ./hbnet/web_service/config.py:/opt/hbnet_web/config.py
@ -18,8 +18,13 @@ services:
- ./hbnet/web_service/data:/opt/hbnet_web/data:rw
# NGINX logs
- ./hbnet/log/web_service:/var/log/nginx:rw
# Path to custom NGINX config for SSL
#- ./hbnet/web_service/hbnet_ssl.conf:/etc/nginx/sites-enabled/hbnet.conf
# Path to SSL certificates
#- ./hbnet/web_service/ssl:/etc/nginx/ssl:ro
# Path to custon logo
# - /path/to/logo.png:/opt/hbnet_web/static/HBnet.png
#- /path/to/logo.png:/opt/hbnet_web/static/HBnet.png
networks:
- hbnet_internal
@ -53,7 +58,6 @@ services:
# Port outside container:Port inside container
# Port for clients
- 62032:62032/udp
- 62033:62033/udp
# Reporting port for hbmon
- 4321:4321
volumes:

View File

@ -0,0 +1,34 @@
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
# listen 443 default_server;
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/domain.cert.pem;
ssl_trusted_certificate /etc/nginx/ssl/domain.cert.pem;
ssl_certificate_key /etc/nginx/ssl/private.key.pem;
server_name _;
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/hbnet_web_service.sock;
}
}
# Used for internal connections
server{
listen 8080;
server_name _;
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/hbnet_web_service.sock;
}
}