Compare commits
No commits in common. "47d0631d812b57ca0c4d9d4a74cb45e34b330c2a" and "7a4b278704a46fefa3701de19f82f4ab5de79d2c" have entirely different histories.
47d0631d81
...
7a4b278704
@ -1,64 +0,0 @@
|
|||||||
# saul-tee.conf — nginx site for saul-t-mote.evthings.app reverse proxy
|
|
||||||
#
|
|
||||||
# Replaces: python3 -m http.server 8080 --directory /home/seb
|
|
||||||
# Router (ASUS Merlin / OpenResty) terminates TLS on :443 and proxies to Orin:8080
|
|
||||||
#
|
|
||||||
# Deploy:
|
|
||||||
# sudo cp saul-tee.conf /etc/nginx/sites-available/saul-tee
|
|
||||||
# sudo ln -sf /etc/nginx/sites-available/saul-tee /etc/nginx/sites-enabled/saul-tee
|
|
||||||
# sudo systemctl reload nginx
|
|
||||||
#
|
|
||||||
# ROUTER REQUIREMENT for WSS to work:
|
|
||||||
# The ASUS Merlin router's nginx/OpenResty must proxy /rosbridge with
|
|
||||||
# WebSocket headers. Add to /jffs/configs/nginx.conf.add:
|
|
||||||
#
|
|
||||||
# map $http_upgrade $connection_upgrade {
|
|
||||||
# default upgrade;
|
|
||||||
# '' close;
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# And in the server block that proxies to 192.168.86.158:8080, add:
|
|
||||||
#
|
|
||||||
# location /rosbridge {
|
|
||||||
# proxy_pass http://192.168.86.158:8080/rosbridge;
|
|
||||||
# proxy_http_version 1.1;
|
|
||||||
# proxy_set_header Upgrade $http_upgrade;
|
|
||||||
# proxy_set_header Connection $connection_upgrade;
|
|
||||||
# proxy_read_timeout 86400;
|
|
||||||
# }
|
|
||||||
|
|
||||||
# Infer WebSocket upgrade from Connection header.
|
|
||||||
# Handles the case where an upstream proxy (e.g. ASUS Merlin OpenResty)
|
|
||||||
# passes Connection: upgrade but strips the Upgrade: websocket header.
|
|
||||||
map $http_connection $ws_upgrade {
|
|
||||||
"upgrade" "websocket";
|
|
||||||
default "";
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 8080 default_server;
|
|
||||||
listen [::]:8080 default_server;
|
|
||||||
|
|
||||||
root /home/seb;
|
|
||||||
index index.html;
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
# Static files — replaces python3 -m http.server 8080 --directory /home/seb
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ =404;
|
|
||||||
autoindex on;
|
|
||||||
}
|
|
||||||
|
|
||||||
# rosbridge WebSocket reverse proxy
|
|
||||||
# wss://saul-t-mote.evthings.app/rosbridge --> ws://127.0.0.1:9090
|
|
||||||
location /rosbridge {
|
|
||||||
proxy_pass http://127.0.0.1:9090/;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $ws_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_read_timeout 86400;
|
|
||||||
proxy_send_timeout 86400;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -227,7 +227,7 @@ body {
|
|||||||
<div class="logo">⚡ SAUL-TEE TRACKER</div>
|
<div class="logo">⚡ SAUL-TEE TRACKER</div>
|
||||||
<div id="conn-bar">
|
<div id="conn-bar">
|
||||||
<div id="ros-dot" title="ROS Bridge"></div>
|
<div id="ros-dot" title="ROS Bridge"></div>
|
||||||
<input id="ws-input" type="text" value="" placeholder="ws://host:port" />
|
<input id="ws-input" type="text" value="ws://100.64.0.2:9090" placeholder="ws://host:port" />
|
||||||
<button class="hbtn" id="btn-connect">CONNECT</button>
|
<button class="hbtn" id="btn-connect">CONNECT</button>
|
||||||
<span id="conn-label">Not connected</span>
|
<span id="conn-label">Not connected</span>
|
||||||
</div>
|
</div>
|
||||||
@ -732,10 +732,7 @@ map.on('dragstart', () => {
|
|||||||
// ── Init ──────────────────────────────────────────────────────────────────────
|
// ── Init ──────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
(function init() {
|
(function init() {
|
||||||
const defaultUrl = location.protocol === 'https:'
|
const saved = localStorage.getItem('saul_tee_ws_url') || 'ws://100.64.0.2:9090';
|
||||||
? 'wss://saul-t-mote.evthings.app/rosbridge'
|
|
||||||
: 'ws://100.64.0.2:9090';
|
|
||||||
const saved = localStorage.getItem('saul_tee_ws_url') || defaultUrl;
|
|
||||||
$('ws-input').value = saved;
|
$('ws-input').value = saved;
|
||||||
drawCompass(null);
|
drawCompass(null);
|
||||||
connectRos(saved);
|
connectRos(saved);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user