Skip to content

full tunnel usage estimated #375

Closed
Closed

Description

@mojtabaamirkhani267

in version 1.8.0
full tunnel no cert
when using more than one deployment ID and app is sending requests round robin to all of them. each request increases the "call today" by one and total available calls are 20k.
if requests are divided by number of deployment IDs or active scripts determined by their health or 20k is multiplied by deployment IDs estimate would be more accurate

Activity

  1. therealaleph commented on Apr 28, 2026

    @therealaleph
    Owner

    @mojtabaamirkhani267 — you're correct, the displayed counter under-reports the actual effective quota when round-robin is in play. Walking through the math:

    Current behaviour (v1.8.0):

    today_calls = total successful Apps Script UrlFetchApp.fetch() calls this client made today (any deployment). The "20k" reference number in the UI is just FREE_QUOTA_PER_DAY — a per-Google-account constant.

    So with N deployments across N distinct Google accounts:

    • Each account has its own 20k/day quota (Google-side, separate buckets)
    • Round-robin spreads today_calls across all N accounts
    • True effective ceiling: N × 20k calls/day total, N × 30 concurrent
    • The UI's "X / 20k" comparison is misleading: it's showing total calls against one-account's quota

    You're right that the displayed (X / 20k) % is wrong when N > 1. It should be (X / (N × 20k)) % — or more accurately, since deployments may not be evenly used (auto-blacklist diverts traffic from sick ones), per-deployment counters with their own pct bars.

    Two-stage fix:

    Stage 1 (v1.8.x point release, ~50 LOC):

    Show effective quota as N × 20k where N = active (non-blacklisted) deployment count:

    Usage today (estimated)
      3,247 / 120,000  (2.7%)   ← 6 deployments × 20k
    

    This is a one-line UI fix + a constant lookup. Trivially correct for evenly-distributed traffic.

    Stage 2 (v1.9.x or v1.10.x):

    Per-deployment counters tracked individually. UI gets a small table:

    Deployment  calls   bytes   used %
    abc...123   687     420 KB  3.4%
    def...456   712     435 KB  3.6%
    ghi...789   503     310 KB  2.5%
    ... (3 more)
    

    Per-deployment health/quota visibility was Surenabedimiran's request from #313 — "show which deployment is being used." This rolls into the same UI batch.

    Both stages also need backend work: today_calls/today_bytes need to become per-deployment HashMaps, not just global atomics. Modest refactor in domain_fronter.rs + tunnel_client.rs (the v1.8.0 record_today plumbing extends naturally).

    Tracking as v1.8.x for stage 1, v1.9.x for stage 2. Adding to the same Android UI batch as block_quic/youtube_via_relay/listen_host toggles since it's UI-visible.

    For the immediate term: mentally multiply the displayed today_calls by 1 (it's an underestimate of how much capacity you have left, not an overestimate). Your 6 accounts × 6-min-execution × 30-concurrent = 180 simultaneous flows is the real ceiling, and you'd need ~60k+ calls/day to threaten that.


    [reply via Anthropic Claude | reviewed by @therealaleph]

  2. therealaleph commented on May 15, 2026

    @therealaleph
    Owner

    Closing this for now because there has not been a follow-up from the original reporter for more than 7 days.

    If this is still happening on the latest release, please comment here or reopen with the current version, mode, relevant config shape, and fresh logs.


    Answered via LLM, Supervised @therealaleph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions