window for tray icon, new toggles, formatting

This commit is contained in:
FUFSoB committed 2026-04-12 16:35:01 +05:00
1 parent ce0262b3d5
commit c071f4d3a8
15 files changed
+644 -321

No files matched your search

+12 -7
View File
@@ -1,20 +1,25 @@
# Telegram MTProto WebSocket proxy service
{ lib, pkgs, cfg }:
{
lib,
pkgs,
cfg,
}:
let
t = cfg.tgWsProxy;
tgPkg = import ../../pkgs/tg-ws-proxy.nix { inherit pkgs; };
dcArgs = lib.concatMapStrings (id: " --dc-ip=${id}:${t.dcIps.${id}}") (
builtins.attrNames t.dcIps
);
dcArgs = lib.concatMapStrings (id: " --dc-ip=${id}:${t.dcIps.${id}}") (builtins.attrNames t.dcIps);
startScript = pkgs.writeShellScript "proxy-suite-tg-ws-proxy-start" ''
exec ${tgPkg}/bin/tg-ws-proxy \
--port=${toString t.port} \
--host=${t.host} \
${if t.secretFile != null
then "--secret-file=$CREDENTIALS_DIRECTORY/tg_ws_proxy_secret"
else "--secret=${t.secret}"}${dcArgs}
${
if t.secretFile != null then
"--secret-file=$CREDENTIALS_DIRECTORY/tg_ws_proxy_secret"
else
"--secret=${t.secret}"
}${dcArgs}
'';
in
{