tamga-vdesktop 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/cli.js +60 -18
- package/dist/server.js +59 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
## Özellikler
|
|
6
6
|
|
|
7
7
|
- **%100 Kodla Anlık Masaüstü Kabuğu:** Klasik VNC/RDP gibi bulanık tam ekran görüntü aktarımı yerine; masaüstü, ikonlar, dock, pencere çerçeveleri, Dosya Gezgini, Açık/Koyu tema geçişleri ve özel duvar kağıtları tamamen tarayıcıda 120fps yerli kodla çalışır.
|
|
8
|
-
-
|
|
8
|
+
- **%100 Web-Native VS Code Motoru (`code serve-web`):** Sunucuda kurulu olan resmi VS Code, video akışı veya gecikmeli uzak imleç olmadan doğrudan pencere çerçevemiz içinde %100 yerli DOM hızında (120fps) çalışır.
|
|
9
|
+
- **Sıfır Çift İmleçli, Olay Güdümlü Linux GUI Uygulamaları (`XDamage` + `TurboJPEG` + `XFixes`):** **Firefox**, **Antigravity**, **GIMP**, **VLC** ve diğer Linux X11 uygulamaları yalnızca pikseller değiştiğinde (`XDamage`) `libturbojpeg` ile kodlanır (statikken %0 CPU); X11 imleci görüntüye çizilmez ve imleç şekilleri (`pointer`, `text`, `ew-resize`) doğrudan gerçek işletim sistemi imlecinizle senkronize edilir.
|
|
9
10
|
- **Gerçek Linux Terminali:** Sıfır C++ derleme gerektiren yerleşik PTY köprüsü ile `bash`/`zsh` kabuğu doğrudan sunucunuzda çalışır.
|
|
10
11
|
- **Tek VDS'te Bağımsız Sanal Masaüstleri:** `?desktop=<ad>` üzerinden her biri izole dosya sistemi, tema, duvar kağıdı ve uygulama profiline sahip sınırsız sanal masaüstü.
|
|
11
12
|
- **Animasyonlu Tema & Özel Arka Plan:** Dairesel yayılan Açık ↔ Koyu tema animasyonu, cihazdan veya sanal dosyalardan animasyonlu özel duvar kağıdı seçimi, tam ekran öneri bildirimi.
|
package/dist/cli.js
CHANGED
|
@@ -2386,7 +2386,8 @@ var LinuxAppSession = class {
|
|
|
2386
2386
|
QT_AUTO_SCREEN_SCALE_FACTOR: "0",
|
|
2387
2387
|
MOZ_ENABLE_WAYLAND: "0",
|
|
2388
2388
|
GTK_CSD: "0",
|
|
2389
|
-
NO_AT_BRIDGE: "1"
|
|
2389
|
+
NO_AT_BRIDGE: "1",
|
|
2390
|
+
XCURSOR_THEME: "DMZ-White"
|
|
2390
2391
|
};
|
|
2391
2392
|
this.openboxProc = spawn3("openbox", ["--config-file", obRcPath], {
|
|
2392
2393
|
env: baseEnv,
|
|
@@ -2867,16 +2868,20 @@ import fs7 from "node:fs";
|
|
|
2867
2868
|
import http from "node:http";
|
|
2868
2869
|
import net from "node:net";
|
|
2869
2870
|
import path7 from "node:path";
|
|
2871
|
+
import zlib from "node:zlib";
|
|
2870
2872
|
import { execSync as execSync3, spawn as spawn4 } from "node:child_process";
|
|
2871
|
-
function
|
|
2873
|
+
function resolveCodeServeBinary() {
|
|
2874
|
+
if (fs7.existsSync("/usr/share/code/bin/code-tunnel")) {
|
|
2875
|
+
return "/usr/share/code/bin/code-tunnel";
|
|
2876
|
+
}
|
|
2872
2877
|
try {
|
|
2873
|
-
const out = execSync3("command -v code", {
|
|
2878
|
+
const out = execSync3("command -v code-tunnel || command -v code", {
|
|
2874
2879
|
stdio: ["ignore", "pipe", "ignore"],
|
|
2875
2880
|
shell: "/bin/sh"
|
|
2876
2881
|
}).toString("utf-8").trim();
|
|
2877
|
-
return
|
|
2882
|
+
return out || null;
|
|
2878
2883
|
} catch {
|
|
2879
|
-
return
|
|
2884
|
+
return null;
|
|
2880
2885
|
}
|
|
2881
2886
|
}
|
|
2882
2887
|
var VSCodeServerManager = class {
|
|
@@ -2890,7 +2895,7 @@ var VSCodeServerManager = class {
|
|
|
2890
2895
|
this.dataDir = dataDir;
|
|
2891
2896
|
}
|
|
2892
2897
|
isInstalled() {
|
|
2893
|
-
return
|
|
2898
|
+
return Boolean(resolveCodeServeBinary());
|
|
2894
2899
|
}
|
|
2895
2900
|
getStatus() {
|
|
2896
2901
|
return {
|
|
@@ -2906,18 +2911,36 @@ var VSCodeServerManager = class {
|
|
|
2906
2911
|
if (this.starting) {
|
|
2907
2912
|
return this.starting;
|
|
2908
2913
|
}
|
|
2909
|
-
|
|
2914
|
+
const bin = resolveCodeServeBinary();
|
|
2915
|
+
if (!bin) {
|
|
2910
2916
|
throw new Error("VS Code sunucuda kurulu de\u011Fil. Uygulamalar penceresinden kurabilirsiniz.");
|
|
2911
2917
|
}
|
|
2912
2918
|
this.starting = (async () => {
|
|
2913
2919
|
const cliDir = path7.join(this.dataDir, "vscode-cli");
|
|
2914
2920
|
const srvDir = path7.join(this.dataDir, "vscode-server");
|
|
2921
|
+
const machineSettingsDir = path7.join(srvDir, "data", "Machine");
|
|
2915
2922
|
fs7.mkdirSync(cliDir, { recursive: true });
|
|
2916
|
-
fs7.mkdirSync(
|
|
2923
|
+
fs7.mkdirSync(machineSettingsDir, { recursive: true });
|
|
2924
|
+
const machineSettingsPath = path7.join(machineSettingsDir, "settings.json");
|
|
2925
|
+
if (!fs7.existsSync(machineSettingsPath)) {
|
|
2926
|
+
fs7.writeFileSync(
|
|
2927
|
+
machineSettingsPath,
|
|
2928
|
+
JSON.stringify(
|
|
2929
|
+
{
|
|
2930
|
+
"security.workspace.trust.enabled": false,
|
|
2931
|
+
"workbench.startupEditor": "none",
|
|
2932
|
+
"workbench.colorTheme": "Default Dark Modern"
|
|
2933
|
+
},
|
|
2934
|
+
null,
|
|
2935
|
+
2
|
|
2936
|
+
),
|
|
2937
|
+
"utf-8"
|
|
2938
|
+
);
|
|
2939
|
+
}
|
|
2917
2940
|
this.ready = false;
|
|
2918
2941
|
this.statusMessage = "VS Code Web motoru ba\u015Flat\u0131l\u0131yor (ilk a\xE7\u0131l\u0131\u015Fta bile\u015Fenler indirilebilir)...";
|
|
2919
2942
|
const proc = spawn4(
|
|
2920
|
-
|
|
2943
|
+
bin,
|
|
2921
2944
|
[
|
|
2922
2945
|
"serve-web",
|
|
2923
2946
|
"--host",
|
|
@@ -2935,6 +2958,7 @@ var VSCodeServerManager = class {
|
|
|
2935
2958
|
"--disable-telemetry"
|
|
2936
2959
|
],
|
|
2937
2960
|
{
|
|
2961
|
+
detached: true,
|
|
2938
2962
|
stdio: ["ignore", "pipe", "pipe"],
|
|
2939
2963
|
env: {
|
|
2940
2964
|
...process.env,
|
|
@@ -2999,7 +3023,8 @@ var VSCodeServerManager = class {
|
|
|
2999
3023
|
res.status(503).send("VS Code haz\u0131rlan\u0131yor...");
|
|
3000
3024
|
return;
|
|
3001
3025
|
}
|
|
3002
|
-
const
|
|
3026
|
+
const acceptGzip = String(req.headers["accept-encoding"] || "").includes("gzip");
|
|
3027
|
+
const headers = { ...req.headers };
|
|
3003
3028
|
const upstream = http.request(
|
|
3004
3029
|
{
|
|
3005
3030
|
host: "127.0.0.1",
|
|
@@ -3016,6 +3041,23 @@ var VSCodeServerManager = class {
|
|
|
3016
3041
|
/frame-ancestors[^;]*;?/gi,
|
|
3017
3042
|
""
|
|
3018
3043
|
);
|
|
3044
|
+
} else if (Array.isArray(outHeaders["content-security-policy"])) {
|
|
3045
|
+
outHeaders["content-security-policy"] = outHeaders["content-security-policy"].map(
|
|
3046
|
+
(v) => v.replace(/frame-ancestors[^;]*;?/gi, "")
|
|
3047
|
+
);
|
|
3048
|
+
}
|
|
3049
|
+
const ctype = String(outHeaders["content-type"] || "").toLowerCase();
|
|
3050
|
+
const shouldGzip = acceptGzip && req.method !== "HEAD" && !outHeaders["content-encoding"] && /(javascript|css|json|html|svg|wasm|xml|text\/plain)/.test(ctype);
|
|
3051
|
+
if (shouldGzip) {
|
|
3052
|
+
delete outHeaders["content-length"];
|
|
3053
|
+
outHeaders["content-encoding"] = "gzip";
|
|
3054
|
+
res.writeHead(upRes.statusCode || 200, outHeaders);
|
|
3055
|
+
const gz = zlib.createGzip({ level: 1 });
|
|
3056
|
+
gz.on("error", () => res.destroy());
|
|
3057
|
+
upRes.on("error", () => gz.destroy());
|
|
3058
|
+
res.on("close", () => gz.destroy());
|
|
3059
|
+
upRes.pipe(gz).pipe(res);
|
|
3060
|
+
return;
|
|
3019
3061
|
}
|
|
3020
3062
|
res.writeHead(upRes.statusCode || 200, outHeaders);
|
|
3021
3063
|
upRes.pipe(res);
|
|
@@ -3032,11 +3074,7 @@ var VSCodeServerManager = class {
|
|
|
3032
3074
|
for (let i = 0; i < req.rawHeaders.length; i += 2) {
|
|
3033
3075
|
const k = req.rawHeaders[i];
|
|
3034
3076
|
const v = req.rawHeaders[i + 1];
|
|
3035
|
-
|
|
3036
|
-
lines.push(`Host: 127.0.0.1:${this.port}`);
|
|
3037
|
-
} else {
|
|
3038
|
-
lines.push(`${k}: ${v}`);
|
|
3039
|
-
}
|
|
3077
|
+
lines.push(`${k}: ${v}`);
|
|
3040
3078
|
}
|
|
3041
3079
|
lines.push("", "");
|
|
3042
3080
|
upstream.write(lines.join("\r\n"));
|
|
@@ -3050,7 +3088,11 @@ var VSCodeServerManager = class {
|
|
|
3050
3088
|
stop() {
|
|
3051
3089
|
if (this.proc) {
|
|
3052
3090
|
try {
|
|
3053
|
-
this.proc.
|
|
3091
|
+
if (this.proc.pid) {
|
|
3092
|
+
process.kill(-this.proc.pid, "SIGTERM");
|
|
3093
|
+
} else {
|
|
3094
|
+
this.proc.kill("SIGTERM");
|
|
3095
|
+
}
|
|
3054
3096
|
} catch {
|
|
3055
3097
|
}
|
|
3056
3098
|
this.proc = null;
|
|
@@ -3060,7 +3102,7 @@ var VSCodeServerManager = class {
|
|
|
3060
3102
|
};
|
|
3061
3103
|
|
|
3062
3104
|
// server/index.ts
|
|
3063
|
-
var TAMGA_VERSION = "1.1.
|
|
3105
|
+
var TAMGA_VERSION = "1.1.2";
|
|
3064
3106
|
var MIME_MAP = {
|
|
3065
3107
|
html: "text/html; charset=utf-8",
|
|
3066
3108
|
htm: "text/html; charset=utf-8",
|
|
@@ -4001,7 +4043,7 @@ function cmdSetupLinux(flags) {
|
|
|
4001
4043
|
"set -e",
|
|
4002
4044
|
"export DEBIAN_FRONTEND=noninteractive",
|
|
4003
4045
|
"apt-get update -y",
|
|
4004
|
-
"apt-get install -y --no-install-recommends xvfb openbox ffmpeg libturbojpeg libxdamage1 libxtst6 libx11-6 libxfixes3 libxext6 xclip xdotool wmctrl dbus-x11 x11-utils pulseaudio pulseaudio-utils fonts-dejavu-core fonts-liberation fonts-noto-color-emoji desktop-file-utils hicolor-icon-theme wget gnupg ca-certificates curl"
|
|
4046
|
+
"apt-get install -y --no-install-recommends xvfb openbox ffmpeg libturbojpeg libxdamage1 libxtst6 libx11-6 libxfixes3 libxext6 xclip xdotool wmctrl dbus-x11 x11-utils dmz-cursor-theme pulseaudio pulseaudio-utils fonts-dejavu-core fonts-liberation fonts-noto-color-emoji desktop-file-utils hicolor-icon-theme wget gnupg ca-certificates curl"
|
|
4005
4047
|
];
|
|
4006
4048
|
if (withFirefox) {
|
|
4007
4049
|
parts.push(`
|
package/dist/server.js
CHANGED
|
@@ -2377,7 +2377,8 @@ var LinuxAppSession = class {
|
|
|
2377
2377
|
QT_AUTO_SCREEN_SCALE_FACTOR: "0",
|
|
2378
2378
|
MOZ_ENABLE_WAYLAND: "0",
|
|
2379
2379
|
GTK_CSD: "0",
|
|
2380
|
-
NO_AT_BRIDGE: "1"
|
|
2380
|
+
NO_AT_BRIDGE: "1",
|
|
2381
|
+
XCURSOR_THEME: "DMZ-White"
|
|
2381
2382
|
};
|
|
2382
2383
|
this.openboxProc = spawn3("openbox", ["--config-file", obRcPath], {
|
|
2383
2384
|
env: baseEnv,
|
|
@@ -2858,16 +2859,20 @@ import fs7 from "node:fs";
|
|
|
2858
2859
|
import http from "node:http";
|
|
2859
2860
|
import net from "node:net";
|
|
2860
2861
|
import path7 from "node:path";
|
|
2862
|
+
import zlib from "node:zlib";
|
|
2861
2863
|
import { execSync as execSync3, spawn as spawn4 } from "node:child_process";
|
|
2862
|
-
function
|
|
2864
|
+
function resolveCodeServeBinary() {
|
|
2865
|
+
if (fs7.existsSync("/usr/share/code/bin/code-tunnel")) {
|
|
2866
|
+
return "/usr/share/code/bin/code-tunnel";
|
|
2867
|
+
}
|
|
2863
2868
|
try {
|
|
2864
|
-
const out = execSync3("command -v code", {
|
|
2869
|
+
const out = execSync3("command -v code-tunnel || command -v code", {
|
|
2865
2870
|
stdio: ["ignore", "pipe", "ignore"],
|
|
2866
2871
|
shell: "/bin/sh"
|
|
2867
2872
|
}).toString("utf-8").trim();
|
|
2868
|
-
return
|
|
2873
|
+
return out || null;
|
|
2869
2874
|
} catch {
|
|
2870
|
-
return
|
|
2875
|
+
return null;
|
|
2871
2876
|
}
|
|
2872
2877
|
}
|
|
2873
2878
|
var VSCodeServerManager = class {
|
|
@@ -2881,7 +2886,7 @@ var VSCodeServerManager = class {
|
|
|
2881
2886
|
this.dataDir = dataDir;
|
|
2882
2887
|
}
|
|
2883
2888
|
isInstalled() {
|
|
2884
|
-
return
|
|
2889
|
+
return Boolean(resolveCodeServeBinary());
|
|
2885
2890
|
}
|
|
2886
2891
|
getStatus() {
|
|
2887
2892
|
return {
|
|
@@ -2897,18 +2902,36 @@ var VSCodeServerManager = class {
|
|
|
2897
2902
|
if (this.starting) {
|
|
2898
2903
|
return this.starting;
|
|
2899
2904
|
}
|
|
2900
|
-
|
|
2905
|
+
const bin = resolveCodeServeBinary();
|
|
2906
|
+
if (!bin) {
|
|
2901
2907
|
throw new Error("VS Code sunucuda kurulu de\u011Fil. Uygulamalar penceresinden kurabilirsiniz.");
|
|
2902
2908
|
}
|
|
2903
2909
|
this.starting = (async () => {
|
|
2904
2910
|
const cliDir = path7.join(this.dataDir, "vscode-cli");
|
|
2905
2911
|
const srvDir = path7.join(this.dataDir, "vscode-server");
|
|
2912
|
+
const machineSettingsDir = path7.join(srvDir, "data", "Machine");
|
|
2906
2913
|
fs7.mkdirSync(cliDir, { recursive: true });
|
|
2907
|
-
fs7.mkdirSync(
|
|
2914
|
+
fs7.mkdirSync(machineSettingsDir, { recursive: true });
|
|
2915
|
+
const machineSettingsPath = path7.join(machineSettingsDir, "settings.json");
|
|
2916
|
+
if (!fs7.existsSync(machineSettingsPath)) {
|
|
2917
|
+
fs7.writeFileSync(
|
|
2918
|
+
machineSettingsPath,
|
|
2919
|
+
JSON.stringify(
|
|
2920
|
+
{
|
|
2921
|
+
"security.workspace.trust.enabled": false,
|
|
2922
|
+
"workbench.startupEditor": "none",
|
|
2923
|
+
"workbench.colorTheme": "Default Dark Modern"
|
|
2924
|
+
},
|
|
2925
|
+
null,
|
|
2926
|
+
2
|
|
2927
|
+
),
|
|
2928
|
+
"utf-8"
|
|
2929
|
+
);
|
|
2930
|
+
}
|
|
2908
2931
|
this.ready = false;
|
|
2909
2932
|
this.statusMessage = "VS Code Web motoru ba\u015Flat\u0131l\u0131yor (ilk a\xE7\u0131l\u0131\u015Fta bile\u015Fenler indirilebilir)...";
|
|
2910
2933
|
const proc = spawn4(
|
|
2911
|
-
|
|
2934
|
+
bin,
|
|
2912
2935
|
[
|
|
2913
2936
|
"serve-web",
|
|
2914
2937
|
"--host",
|
|
@@ -2926,6 +2949,7 @@ var VSCodeServerManager = class {
|
|
|
2926
2949
|
"--disable-telemetry"
|
|
2927
2950
|
],
|
|
2928
2951
|
{
|
|
2952
|
+
detached: true,
|
|
2929
2953
|
stdio: ["ignore", "pipe", "pipe"],
|
|
2930
2954
|
env: {
|
|
2931
2955
|
...process.env,
|
|
@@ -2990,7 +3014,8 @@ var VSCodeServerManager = class {
|
|
|
2990
3014
|
res.status(503).send("VS Code haz\u0131rlan\u0131yor...");
|
|
2991
3015
|
return;
|
|
2992
3016
|
}
|
|
2993
|
-
const
|
|
3017
|
+
const acceptGzip = String(req.headers["accept-encoding"] || "").includes("gzip");
|
|
3018
|
+
const headers = { ...req.headers };
|
|
2994
3019
|
const upstream = http.request(
|
|
2995
3020
|
{
|
|
2996
3021
|
host: "127.0.0.1",
|
|
@@ -3007,6 +3032,23 @@ var VSCodeServerManager = class {
|
|
|
3007
3032
|
/frame-ancestors[^;]*;?/gi,
|
|
3008
3033
|
""
|
|
3009
3034
|
);
|
|
3035
|
+
} else if (Array.isArray(outHeaders["content-security-policy"])) {
|
|
3036
|
+
outHeaders["content-security-policy"] = outHeaders["content-security-policy"].map(
|
|
3037
|
+
(v) => v.replace(/frame-ancestors[^;]*;?/gi, "")
|
|
3038
|
+
);
|
|
3039
|
+
}
|
|
3040
|
+
const ctype = String(outHeaders["content-type"] || "").toLowerCase();
|
|
3041
|
+
const shouldGzip = acceptGzip && req.method !== "HEAD" && !outHeaders["content-encoding"] && /(javascript|css|json|html|svg|wasm|xml|text\/plain)/.test(ctype);
|
|
3042
|
+
if (shouldGzip) {
|
|
3043
|
+
delete outHeaders["content-length"];
|
|
3044
|
+
outHeaders["content-encoding"] = "gzip";
|
|
3045
|
+
res.writeHead(upRes.statusCode || 200, outHeaders);
|
|
3046
|
+
const gz = zlib.createGzip({ level: 1 });
|
|
3047
|
+
gz.on("error", () => res.destroy());
|
|
3048
|
+
upRes.on("error", () => gz.destroy());
|
|
3049
|
+
res.on("close", () => gz.destroy());
|
|
3050
|
+
upRes.pipe(gz).pipe(res);
|
|
3051
|
+
return;
|
|
3010
3052
|
}
|
|
3011
3053
|
res.writeHead(upRes.statusCode || 200, outHeaders);
|
|
3012
3054
|
upRes.pipe(res);
|
|
@@ -3023,11 +3065,7 @@ var VSCodeServerManager = class {
|
|
|
3023
3065
|
for (let i = 0; i < req.rawHeaders.length; i += 2) {
|
|
3024
3066
|
const k = req.rawHeaders[i];
|
|
3025
3067
|
const v = req.rawHeaders[i + 1];
|
|
3026
|
-
|
|
3027
|
-
lines.push(`Host: 127.0.0.1:${this.port}`);
|
|
3028
|
-
} else {
|
|
3029
|
-
lines.push(`${k}: ${v}`);
|
|
3030
|
-
}
|
|
3068
|
+
lines.push(`${k}: ${v}`);
|
|
3031
3069
|
}
|
|
3032
3070
|
lines.push("", "");
|
|
3033
3071
|
upstream.write(lines.join("\r\n"));
|
|
@@ -3041,7 +3079,11 @@ var VSCodeServerManager = class {
|
|
|
3041
3079
|
stop() {
|
|
3042
3080
|
if (this.proc) {
|
|
3043
3081
|
try {
|
|
3044
|
-
this.proc.
|
|
3082
|
+
if (this.proc.pid) {
|
|
3083
|
+
process.kill(-this.proc.pid, "SIGTERM");
|
|
3084
|
+
} else {
|
|
3085
|
+
this.proc.kill("SIGTERM");
|
|
3086
|
+
}
|
|
3045
3087
|
} catch {
|
|
3046
3088
|
}
|
|
3047
3089
|
this.proc = null;
|
|
@@ -3051,7 +3093,7 @@ var VSCodeServerManager = class {
|
|
|
3051
3093
|
};
|
|
3052
3094
|
|
|
3053
3095
|
// server/index.ts
|
|
3054
|
-
var TAMGA_VERSION = "1.1.
|
|
3096
|
+
var TAMGA_VERSION = "1.1.2";
|
|
3055
3097
|
var MIME_MAP = {
|
|
3056
3098
|
html: "text/html; charset=utf-8",
|
|
3057
3099
|
htm: "text/html; charset=utf-8",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamga-vdesktop",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "TamgaVDesktop — Self-hostable Linux Virtual Desktop OS platform with native web shell, real Linux terminal, and seamless native Linux GUI apps (Firefox, VS Code, Antigravity).",
|