mirror of https://github.com/Box-boi/vubuntu.git
Update v1.4.3
This commit is contained in:
parent
dede11f84b
commit
a5c8b2326d
19
Dockerfile
19
Dockerfile
|
|
@ -1,7 +1,5 @@
|
|||
FROM vital987/vubuntu:latest
|
||||
|
||||
LABEL AboutImage "Ubuntu20.04_Fluxbox_PureVNC"
|
||||
|
||||
LABEL Maintainer "Apoorv Vyavahare <apoorvvyavahare@pm.me>"
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
|
@ -9,7 +7,7 @@ ARG DEBIAN_FRONTEND=noninteractive
|
|||
#VNC Server Password
|
||||
ENV VNC_PASS="samplepass" \
|
||||
#VNC Server Title(w/o spaces)
|
||||
VNC_TITLE="Vubuntu_Desktop" \
|
||||
VNC_TITLE="Vubuntu-PureVNC" \
|
||||
#VNC Resolution(720p is preferable)
|
||||
VNC_RESOLUTION="1280x720" \
|
||||
#VNC Shared Mode (0=no, 1=yes)
|
||||
|
|
@ -29,12 +27,17 @@ ENV VNC_PASS="samplepass" \
|
|||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN apt update && \
|
||||
apt install --no-install-recommends -y socat && \
|
||||
apt purge -y novnc && \
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends -y socat && \
|
||||
apt-get purge -y novnc && \
|
||||
npm uninstall --global websockify && \
|
||||
pip install pyngrok && \
|
||||
rm -rf /app/.vubuntu/assets/configs/*
|
||||
rm -rf /app/.vubuntu/assets/configs/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
apt-get clean && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /tmp/* && \
|
||||
pip install pyngrok PyYAML && \
|
||||
python3 -c 'from pyngrok import installer;installer.install_ngrok(ngrok_path="/usr/local/lib/python3.8/dist-packages/pyngrok/bin/ngrok")'
|
||||
|
||||
COPY assets/configs/ /app/.vubuntu/assets/configs/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# **Ubuntu Fluxbox with Direct VNC**
|
||||
[]() []() []() [](https://hub.docker.com/r/vital987/vubuntu) []()<br>[](http://heroku.com/deploy?template=https://github.com/vital987/vubuntu/tree/purevnc)<br>
|
||||
# VNC + Ubuntu = Vubuntu ¯\\_\(ツ\)\_\/¯
|
||||
|
||||
[]() []() []() [](https://hub.docker.com/r/vital987/vubuntu) []()<br>[](https://heroku.com/deploy?template=https://github.com/vital987/vubuntu/tree/purevnc)<br>
|
||||
|
||||
## **Introduction:**
|
||||
* **Vubuntu-PureVNC is a modified version of Vubuntu where one can connect to the server directly via VNC url without any web client like NoVNC.**
|
||||
|
|
|
|||
24
app.json
24
app.json
|
|
@ -1,18 +1,23 @@
|
|||
{
|
||||
"name": "Vubuntu-PureVNC",
|
||||
"description": "Fully fledged Ubuntu with pure VNC, refer readme for more info.",
|
||||
"description": "Fully fledged Ubuntu with direct VNC, refer readme for more info.",
|
||||
"repository": "https://github.com/vital987/vubuntu.git",
|
||||
"logo": "https://imgur.com/1qCGUwK.png",
|
||||
"keywords": ["docker","ubuntu", "vscode", "purevnc", "pure", "firefox", "brave", "fluxbox", "linux", "remote", "ssh", "vnc", "vubuntu"],
|
||||
"logo": "https://raw.githubusercontent.com/vital987/vubuntu/master/assets/icons/64x64.png",
|
||||
"keywords": ["docker","ubuntu", "vscode", "purevnc", "pure", "firefox", "brave", "fluxbox", "linux", "remote", "ssh", "direct-vnc", "vnc", "vubuntu"],
|
||||
"stack": "container",
|
||||
"env": {
|
||||
"APP_NAME" : {
|
||||
"description": "Name of the app, same as mentioned above.",
|
||||
"value" : "",
|
||||
"required" : true
|
||||
},
|
||||
"VNC_TITLE" : {
|
||||
"description": "VNC Session Title, w/o spaces.",
|
||||
"description": "VNC Session Title, without spaces.",
|
||||
"value" : "Vubuntu-PureVNC",
|
||||
"required" : true
|
||||
} ,
|
||||
},
|
||||
"VNC_PASS": {
|
||||
"description": "VNC server password w/o spaces.",
|
||||
"description": "VNC server password without spaces.",
|
||||
"required" : true
|
||||
},
|
||||
"VNC_RESOLUTION" : {
|
||||
|
|
@ -29,11 +34,6 @@
|
|||
"description": "Prevent app from sleeping, 1=on, 0=off",
|
||||
"value" : "0",
|
||||
"required" : true
|
||||
},
|
||||
"APP_NAME" : {
|
||||
"description": "Name of the app, same as mentioned above.",
|
||||
"value" : "",
|
||||
"required" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[program:VNC]
|
||||
command=bash -c 'if ((VNC_SHARED==0)); then x11vnc -storepasswd $VNC_PASS /app/.xpass && x11vnc -usepw -rfbport 5900 -rfbauth /app/.xpass -geometry $VNC_RESOLUTION -forever -alwaysshared -permitfiletransfer -bg -desktop $VNC_TITLE; else x11vnc -storepasswd $VNC_PASS /app/.xpass && x11vnc -usepw -rfbport 5900 -rfbauth /app/.xpass -geometry $VNC_RESOLUTION -forever -shared -alwaysshared -permitfiletransfer -bg -desktop $VNC_TITLE; fi'
|
||||
autostart=true
|
||||
autorestart=false
|
||||
autorestart=unexpected
|
||||
startsecs=0
|
||||
exitcodes=0,1
|
||||
stderr_logfile=/var/log/x11vnc.stderr.log
|
||||
priority=3
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[program:portforward]
|
||||
command=bash -c 'socat TCP-LISTEN:$PORT,fork TCP:127.0.0.1:4040'
|
||||
stderr_logfile=/var/log/socat.err.log
|
||||
autorestart=unexpected
|
||||
exitcodes=0
|
||||
startseconds=0
|
||||
priority=1
|
||||
autostart=true
|
||||
autorestart=false
|
||||
|
|
|
|||
|
|
@ -1,17 +1,25 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import logging
|
||||
from time import sleep
|
||||
|
||||
logging.basicConfig(filename="/app/.vubuntu/assets/logs/ngrok_tunnel.py.log", format='%(asctime)s %(message)s', filemode='w')
|
||||
logger=logging.getLogger()
|
||||
|
||||
try:
|
||||
from pyngrok import ngrok, conf
|
||||
except:
|
||||
os.system('pip3 install pyngrok')
|
||||
logger.info('Pyngrok not installed, installing pyngrok...')
|
||||
os.system('pip3 install pyngrok PyYAML')
|
||||
logger.info('PyNgrok Installed')
|
||||
from pyngrok import ngrok, conf
|
||||
|
||||
try:
|
||||
AUTH_TOKEN=os.environ['NGROK_AUTH_TOKEN']
|
||||
except:
|
||||
print('[-] Ngrok token not found, assign the token to NGROK_AUTH_TOKEN environment variable & try again.\n[-] Terminating...')
|
||||
logger.error('NGROK_AUTH_TOKEN environment variable not set, terminating...')
|
||||
exit()
|
||||
|
||||
ngrok.set_auth_token(AUTH_TOKEN)
|
||||
|
|
@ -19,16 +27,21 @@ ngrok.set_auth_token(AUTH_TOKEN)
|
|||
if "NGROK_REGION" in os.environ:
|
||||
conf.get_default().region = os.environ['NGROK_REGION']
|
||||
else:
|
||||
print("[!] NGROK_REGION unset, defaulting ngrok location to India.")
|
||||
print("[!] NGROK_REGION unset, defaulting ngrok region to India.")
|
||||
logger.warning('NGROK_REGION unset, defaulting ngrok region to India.')
|
||||
conf.get_default().region = "in"
|
||||
|
||||
try:
|
||||
primary_tunnel = ngrok.connect(os.environ['NGROK_PORT'], os.environ['NGROK_METHOD'], bind_tls=bool(int(os.getenv('NGROK_BINDTLS', 1))))
|
||||
except:
|
||||
logger.warning('NGROK_PORT or/and NGROK_METHOD environment variable not set, terminating...')
|
||||
print('[-] NGROK_PORT or NGROK_METHOD environment variables has not been set properly, NGROK_METHOD should be http or tcp')
|
||||
|
||||
sleep(10)
|
||||
|
||||
url=primary_tunnel.public_url
|
||||
|
||||
print(f'[>NGROK]: {url}')
|
||||
|
||||
input()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue