Skip to content

Claude/gracious lewin#80

Open
MaximPyatin wants to merge 40 commits intoGozargah:masterfrom
MaximPyatin:claude/gracious-lewin
Open

Claude/gracious lewin#80
MaximPyatin wants to merge 40 commits intoGozargah:masterfrom
MaximPyatin:claude/gracious-lewin

Conversation

@MaximPyatin
Copy link
Copy Markdown

No description provided.

MaximPyatin and others added 30 commits February 28, 2026 07:29
Updated build workflow to trigger on branches 'dev' and 'test'. Switched to using docker/build-push-action@v5 and modified image tags.
Updated Docker actions to use version 2 and 5.
…ir, writes override, starts services)

Made-with: Cursor
…n not available on all systems)

Made-with: Cursor
…duce timeout: no recent network activity

Made-with: Cursor
…ria2; always restart hysteria2 after up -d

Made-with: Cursor
- Fix shell injection in ask() via eval (m4)
- Fix bash precedence bug: HTTP 200 check now correctly prints ok msg (m5)
- Abort with err() if node SSL certs still missing after 15s wait (m6)
- Change default TRAFFIC_LISTEN to 0.0.0.0:9999 so main panel can
  collect traffic stats from nodes (required by B2 fix in main repo)

Made-with: Cursor
…IENT_CERT and REST protocol

Made-with: Cursor
MaximPyatin and others added 10 commits March 28, 2026 02:02
Add the Telemt config writer, REST sync endpoints, sidecar files, and setup script needed to run MTProto on one selected Marzban node.

Made-with: Cursor
Apply a local telemt patch so tg_connect actually controls upstream Telegram DC connection attempts, and raise setup defaults to reduce premature node-to-Telegram handshake failures.

Made-with: Cursor
- MTPROTO_NODE_SETUP: ee steps, panel/node env, verification
- .env.example: ee and TLS domain notes
- setup-mtproto-node.sh: remind users to reissue tg:// links for ee

Made-with: Cursor
- node_metrics: psutil CPU, hysteria traffic API (bracketed IPv6 listen), 2-5s sampler
- rest_service: GET /metrics (mTLS); NODE_METRICS_INTERVAL in config
- requirements: psutil; .env.example note

Made-with: Cursor
…/marzban-node/.env; warn if secret missing

Made-with: Cursor
Critical bugs fixed:

1. setup-hysteria-node.sh: ENV_FILE was writing HYSTERIA2_ENABLED=true and
   HYSTERIA2_TRAFFIC_SECRET to ${NODE_COMPOSE_DIR}/.env, but docker-compose
   loads /var/lib/marzban-node/.env (env_file: directive). The container
   never saw HYSTERIA2_ENABLED, so node_metrics.py never polled Hysteria
   traffic API → always 0 connections / 0 bandwidth.
   Fix: ENV_FILE now correctly points to ${NODE_DATA_DIR}/.env.

2. Marzban/config.py: record_hysteria_usage.py imported HYSTERIA2_TRAFFIC_SECRET,
   HYSTERIA2_TRAFFIC_LISTEN, HYSTERIA2_NODE_TRAFFIC_PORT which were missing from
   the panel config excerpt → ImportError at panel startup.
   Fix: added the three missing variables with defaults.

3. deploy-marzban-node.sh: node exits on startup (exit 0) when ssl_client_cert.pem
   is missing (main.py hard-exits for REST mode). Script now detects the missing
   cert, shows step-by-step instructions, supports PANEL_CERT_URL env var for
   auto-download, and offers interactive paste. Also checks Hysteria2 config
   after start and shows actionable warnings.

4. node_metrics.py: when Marzban panel calls /traffic?clear=true it resets
   counters, causing a negative delta that was clamped to 0. Bandwidth then
   remained 0 until the next sample cycle. Fix: on negative delta reset
   _last_total_bytes baseline so the very next interval is accurate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant