diff --git a/Dockerfile b/Dockerfile index 3d2fc9e..2522a04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN curl -sSLO https://piair.xyz/download/chrome.deb \ && wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key \ && echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list \ && apt update \ - && apt install grafana xvfb nginx nano tzdata sqlite3 apt-transport-https software-properties-common wget wfrench tigervnc-standalone-server libasound2 libatk-bridge2.0-0 libnss3 libnspr4 xvfb libgbm1 libatk1.0-0 libu2f-udev libatspi2.0-0 libcups2 libxkbcommon0 libxrandr2 libdbus-1-3 xdg-utils fonts-liberation libdrm2 -y \ + && apt install novnc websockify grafana xvfb nginx nano tzdata sqlite3 apt-transport-https software-properties-common wget wfrench tigervnc-standalone-server libasound2 libatk-bridge2.0-0 libnss3 libnspr4 xvfb libgbm1 libatk1.0-0 libu2f-udev libatspi2.0-0 libcups2 libxkbcommon0 libxrandr2 libdbus-1-3 xdg-utils fonts-liberation libdrm2 -y \ && bash MsRewards-Reborn/config/config.sh \ && dpkg -i chrome.deb diff --git a/Flask/templates/vnc.html b/Flask/templates/vnc.html new file mode 100644 index 0000000..55d89c7 --- /dev/null +++ b/Flask/templates/vnc.html @@ -0,0 +1,57 @@ + +{% extends "base.html" %} +{% block left_pannel %} + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+{% endblock %} + +{% block content %} + +{%if not current_user.is_authenticated %} + +{% else %} + +{% endif %} + +{%endblock %} \ No newline at end of file diff --git a/V6.py b/V6.py index 502fa6a..ee5134d 100755 --- a/V6.py +++ b/V6.py @@ -367,7 +367,9 @@ def try_play(nom="inconnu"): custom_sleep(5) printf("not connected, fixed") if "legaltextbox" in driver.current_url: + log_error("dev1") driver.find_element(By.CLASS_NAME, "actionLink").click() + log_error("dev2") try: if wait_until_visible(By.ID, "rqStartQuiz", 5, driver): custom_sleep(3) @@ -827,7 +829,7 @@ else : display = SmartDisplay(size=(1920, 1080)) display.start() -webhookFailure.send(f"Starting on this config", username="Check de lancement", avatar_url="https://cdn-icons-png.flaticon.com/512/1688/1688988.png") +webhookFailure.send(f"@silent Starting on this config", username="Check de lancement", avatar_url="https://cdn-icons-png.flaticon.com/512/1688/1688988.png") if g.custom_start: CustomStart() diff --git a/config/config.sh b/config/config.sh index 88de766..4395d41 100644 --- a/config/config.sh +++ b/config/config.sh @@ -27,6 +27,19 @@ server { proxy_pass http://grafana; rewrite ^/grafana/(.*) /\$1 break; } + + location /novnc/ { + proxy_pass http://127.0.0.1:6080/; + } + + location /novnc/websockify { + proxy_pass http://127.0.0.1:6080/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } + location / { proxy_set_header X-Forwarded-For \$remote_addr; proxy_set_header Host \$http_host; @@ -47,4 +60,10 @@ cp /app/MsRewards-Reborn/config/grafana.ini /etc/grafana/ grafana-cli plugins install frser-sqlite-datasource printf "setting up default dashboard" -cp /app/MsRewards-Reborn/config/Stats-dashbord.json /usr/share/grafana/public/dashboards/home.json \ No newline at end of file +cp /app/MsRewards-Reborn/config/Stats-dashbord.json /usr/share/grafana/public/dashboards/home.json + + +websockify -D \ + --web /usr/share/novnc/ \ + 6080 \ + localhost:2345 \ No newline at end of file