From 97877e6e1891c7f6fc787c86a9c9918e5e8cda13 Mon Sep 17 00:00:00 2001 From: Alexandre DEVELY <12896316+alexandredevely@users.noreply.github.com> Date: Sat, 14 Dec 2024 11:49:59 +0100 Subject: [PATCH] add jsmpeg_service_tcp_port --- etc/nginx/route.conf | 84 +++++++++++++------------------------------- 1 file changed, 25 insertions(+), 59 deletions(-) diff --git a/etc/nginx/route.conf b/etc/nginx/route.conf index f85116a..dd9f36c 100644 --- a/etc/nginx/route.conf +++ b/etc/nginx/route.conf @@ -38,7 +38,6 @@ break; } - location = /signalling { set $jwt_token $args; if ($arg_jwt_token) { @@ -92,6 +91,7 @@ proxy_pass http://$target:$spawner_service_tcp_port; } + # proxy requests to default nginx website content location / { proxy_pass http://$my_website; } @@ -105,6 +105,7 @@ break; } + # proxy requests to user pod terminals service resize location ~ /terminals/(.*)/size { set $jwt_token $http_abcauthorization; rewrite_by_lua_file /etc/nginx/get.targetmap.lua; @@ -112,6 +113,7 @@ break; } + # proxy requests to user pod terminals service location /terminals { # rewrite_by_lua_file /etc/nginx/get.targetmap.lua; # rewrite ^/terminals(/.*)$ $1 break; @@ -121,6 +123,7 @@ break; } + # proxy requests to user pod filer service location /filer { set $jwt_token $http_abcauthorization; rewrite_by_lua_file /etc/nginx/get.targetmap.lua; @@ -129,61 +132,15 @@ break; } + # proxy requests to user pod printerfiler service location /printerfiler { - set $jwt_token $http_abcauthorization; + set $jwt_token $http_abcauthorization; rewrite_by_lua_file /etc/nginx/get.targetmap.lua; - proxy_pass http://$target:$printerfile_service_tcp_port; + proxy_pass http://$target:$printerfile_service_tcp_port; break; } - location /u8_1_11025 { - set $jwt_token $http_abcauthorization; - include sound.conf; - proxy_pass http://$target:$pulseaudio_http_port/listen/source/u8_1_11025.monitor; - } - - location /s16_1_11025 { - set $jwt_token $http_abcauthorization; - include sound.conf; - proxy_pass http://$target:$pulseaudio_http_port/listen/source/s16_1_11025.monitor; - } - - location /u8_1_22050 { - set $jwt_token $http_abcauthorization; - include sound.conf; - proxy_pass http://$target:$pulseaudio_http_port/listen/source/u8_1_22050.monitor; - } - - location /s16_1_22050 { - set $jwt_token $http_abcauthorization; - include sound.conf; - proxy_pass http://$target:$pulseaudio_http_port/listen/source/s16_1_22050.monitor; - } - - location /u8_1_44100 { - set $jwt_token $http_abcauthorization; - include sound.conf; - proxy_pass http://$target:$pulseaudio_http_port/listen/source/u8_1_44100.monitor; - } - - location /s16_1_44100 { - set $jwt_token $http_abcauthorization; - include sound.conf; - proxy_pass http://$target:$pulseaudio_http_port/listen/source/s16_1_44100.monitor; - } - - location /ulaw8_1_8000 { - set $jwt_token $http_abcauthorization; - include sound.conf; - proxy_pass http://$target:$pulseaudio_http_port/listen/source/ulaw8_1_8000.monitor; - } - - location /alaw8_1_8000 { - set $jwt_token $http_abcauthorization; - include sound.conf; - proxy_pass http://$target:$pulseaudio_http_port/listen/source/alaw8_1_8000.monitor; - } - + # proxy requests to user pod broadcast service location /broadcast { # proxy_read_timeout 600; # proxy_read_timeout 1800s; # half one hour @@ -195,25 +152,34 @@ proxy_pass http://$target:$broadcast_tcp_port; } + # proxy requests to user pod jsmpeg service + location /jsmpeg { + set $jwt_token $args; + include ws.conf; + proxy_pass http://$target:$jsmpeg_service_tcp_port/audio; + break; + } + + # proxy requests to user pod speedtest service location /speedtest { - gzip off; # use raw data for speedtest + gzip off; # use raw data for speedtest client_max_body_size 256M; proxy_buffering off; proxy_pass http://$my_speedtest; } - - location /img/app/ { - include proxy.conf; - proxy_pass http://$my_pyos:$api_service_tcp_port; - break; - } + # location /img/app/ { + # include proxy.conf; + # proxy_pass http://$my_pyos:$api_service_tcp_port; + # break; + # } + # proxy requests to pyos location ~ ^/(moauth|fauth|gauth|oauth|autologin|API|status) { # request /API/launchdesktop can take long time # if all pod container images need to be pulled from registry # increase default proxy_read_timeout value - proxy_read_timeout 300s; + proxy_read_timeout 360s; include proxy.conf; proxy_pass http://$my_pyos:$api_service_tcp_port; break;