mirror of
				https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
				synced 2025-11-03 23:23:53 +01:00 
			
		
		
		
	euh ouais j'ai ptet rajouter un VNC, bref on verra
This commit is contained in:
		@@ -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 
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										57
									
								
								Flask/templates/vnc.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								Flask/templates/vnc.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,57 @@
 | 
			
		||||
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
{% block left_pannel %}
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/override';">override</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/config';">config</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/discord';">discord</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/proxy';">proxy</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/logs';">logs</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/stats';">stats</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="selected" onclick="location.href = '/dev_override';">Override</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/settings';">settings</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
{%if not current_user.is_authenticated %}
 | 
			
		||||
    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
			
		||||
{% else %}
 | 
			
		||||
    <iframe src="/novnc/vnc_lite.html?resize=scale&path=novnc/websockify&view_only" width="100%" height="100%" frameborder="0"></iframe>
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{%endblock %}
 | 
			
		||||
							
								
								
									
										4
									
								
								V6.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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()
 | 
			
		||||
 
 | 
			
		||||
@@ -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 
 | 
			
		||||
cp /app/MsRewards-Reborn/config/Stats-dashbord.json /usr/share/grafana/public/dashboards/home.json 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
websockify -D \
 | 
			
		||||
    --web /usr/share/novnc/ \
 | 
			
		||||
    6080 \
 | 
			
		||||
    localhost:2345
 | 
			
		||||
		Reference in New Issue
	
	Block a user