Closed ant-7802 closed 1 month ago
you can do it by using nginx reverse proxy simply
server {
listen 443 ssl;
ssl_certificate /etc/ssl/ca.crt;
ssl_certificate_key /etc/ssl/ca.key;
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Host and X headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Connectivity Options
proxy_http_version 1.1;
proxy_read_timeout 1800s;
proxy_send_timeout 1800s;
proxy_connect_timeout 1800s;
proxy_buffering off;
#base64 basic auth set header
# default => kasm_user:password
proxy_set_header Authorization "Basic a2FzbV91c2VyOnBhc3N3b3Jk";
# Allow large requests to support file uploads to sessions
client_max_body_size 10M;
proxy_pass https://127.0.1.1:8444 ;
}
}
KasmVNC will bind to 0.0.0.0 by default, https://www.kasmweb.com/kasmvnc/docs/latest/configuration.html#network
After I have run vncserver
and chose GNONE
, it showed:
Paste this url in your browser:
https://127.0.1.1:8445
Tried http://127.0.0.1:8445 there was nothing. It did listen on https://127.0.1.1:8445
After I have run
vncserver
and choseGNONE
, it showed:Paste this url in your browser: https://127.0.1.1:8445
Tried http://127.0.0.1:8445 there was nothing. It did listen on https://127.0.1.1:8445
https://www.kasmweb.com/kasmvnc/docs/latest/configuration.html#network look here, either find out how to change the config or just use nginx or caddy or whatever
I did changed the configurations.
I have tried putting some invalid values onto it.
Running vncserver
returned error.
So I should be editing the correct file.
It looks like the application is not using the configuration correctly.
I am using Ubuntu 22.04. Below are the configuration files.
/etc/kasmvnc/kasmvnc.yaml
# ---
# desktop:
# resolution:
# width: 1024
# height: 768
# allow_resize: true
# pixel_depth: 24
# gpu:
# hw3d: false
# drinode: /dev/dri/renderD128
# network:
# protocol: http
# interface: 0.0.0.0
# websocket_port: auto
# use_ipv4: true
# use_ipv6: true
# udp:
# public_ip: auto
# port: auto
# stun_server: auto
# ssl:
# pem_certificate: /etc/ssl/certs/ssl-cert-snakeoil.pem
# pem_key: /etc/ssl/private/ssl-cert-snakeoil.key
# require_ssl: true
# # unix_relay:
# # name:
# # path:
# user_session:
# # session_type: shared
# new_session_disconnects_existing_exclusive_session: false
# concurrent_connections_prompt: false
# concurrent_connections_prompt_timeout: 10
# idle_timeout: never
# keyboard:
# remap_keys:
# # - 0x22->0x40
# ignore_numlock: false
# raw_keyboard: false
# Mouse, trackpad, etc.
# pointer:
# enabled: true
# runtime_configuration:
# allow_client_to_override_kasm_server_settings: true
# allow_override_standard_vnc_server_settings: true
# allow_override_list:
# - pointer.enabled
# - data_loss_prevention.clipboard.server_to_client.enabled
# - data_loss_prevention.clipboard.client_to_server.enabled
# - data_loss_prevention.clipboard.server_to_client.primary_clipboard_enabled
# logging:
# log_writer_name: all
# log_dest: logfile
# # 0 - minimal verbosity, 100 - most verbose
# level: 30
# security:
# brute_force_protection:
# blacklist_threshold: 5
# blacklist_timeout: 10
# data_loss_prevention:
# visible_region:
# # top: 10
# # left: 10
# # right: 40
# # bottom: 40
# concealed_region:
# allow_click_down: false
# allow_click_release: false
# clipboard:
# delay_between_operations: none
# allow_mimetypes:
# - chromium/x-web-custom-data
# - text/html
# - image/png
# # Add to docs: Cut buffers and CLIPBOARD selection.
# server_to_client:
# enabled: true
# size: unlimited
# primary_clipboard_enabled: false
# client_to_server:
# enabled: true
# size: unlimited
# keyboard:
# enabled: true
# rate_limit: unlimited
# watermark:
# # image: /etc/kasmvnc/picture.png
# # location: 10,10
# # tint: 255,20,20,128
# # repeat_spacing: 10
# #text:
# # template: "${USER} %H:%M"
# # font: auto
# # font_size: 48
# # timezone_name: Australia/Adelaide
# # angle: 0
# logging:
# # "verbose" SETTING LOGS YOUR PRIVATE INFORMATION. Keypresses and clipboard content
# level: off
# encoding:
# max_frame_rate: 60
# full_frame_updates: none
# rect_encoding_mode:
# min_quality: 7
# max_quality: 8
# consider_lossless_quality: 10
# rectangle_compress_threads: auto
# video_encoding_mode:
# jpeg_quality: -1
# webp_quality: -1
# max_resolution:
# width: 1920
# height: 1080
# enter_video_encoding_mode:
# time_threshold: 5
# area_threshold: 45%
# exit_video_encoding_mode:
# time_threshold: 3
# logging:
# level: off
# scaling_algorithm: progressive_bilinear
# compare_framebuffer: auto
# zrle_zlib_level: auto
# hextile_improved_compression: true
# server:
# http:
# headers:
# - Cross-Origin-Embedder-Policy=require-corp
# - Cross-Origin-Opener-Policy=same-origin
# httpd_directory: /usr/share/kasmvnc/www
# advanced:
# x_font_path: auto
# kasm_password_file: ${HOME}/.kasmpasswd
# x_authority_file: auto
# auto_shutdown:
# no_user_session_timeout: never
# active_user_session_timeout: never
# inactive_user_session_timeout: never
# command_line:
# prompt: true
~/.vnc/kasmvnc.yaml
network:
protocol: http
interface: 0.0.0.0
websocket_port: auto
use_ipv4: true
use_ipv6: true
Use nginx
how do I make it public??? HELP