MCPcopy Create free account

hub / github.com/ZingerLittleBee/ServerBee / functions

Functions6,739 in github.com/ZingerLittleBee/ServerBee

↓ 6 callersFunctioncompute_prediction
Returns None if days_elapsed < 3 or no traffic_limit set.
crates/server/src/service/traffic.rs:690
↓ 6 callersFunctioncreateWidgetRuntime
(rt: RuntimeInput)
packages/widget-sdk/src/runtime-context.ts:59
↓ 6 callersFunctiondemo_server_id
(spec: &DemoServerSpec)
crates/server/src/dev_demo.rs:971
↓ 6 callersMethoddisconnect
()
apps/web/src/components/server/network-square-grid.test.tsx:27
↓ 6 callersFunctiondrain_first_connect_pushes
Drain any frames the server pushes right after the SystemInfo handshake. Returns once the inbound stream is quiet for `quiet_ms`.
crates/server/tests/ws_agent_dispatch2.rs:71
↓ 6 callersFunctionemit_upgrade_progress
( tx: &mpsc::Sender<AgentMessage>, job_id: Option<String>, version: &str, stage: UpgradeStage,
crates/agent/src/reporter.rs:3979
↓ 6 callersFunctionenroll_pending_server
Helper: enroll a pending server so it becomes online (has_token=true, no outstanding enrollment). Returns the agent token returned by register.
crates/server/tests/agent_registration_integration.rs:660
↓ 6 callersFunctionextract_manifest
(source: &str)
crates/server/src/service/widget_module/extractor.rs:55
↓ 6 callersFunctionflush_reports
Persist one batch of cached agent reports and update traffic accounting. This is the per-tick body of [`run`], extracted so it can be unit-tested. It
crates/server/src/task/record_writer.rs:50
↓ 6 callersFunctionformatCostRate
( amount: number, currency: string | null | undefined, unit: string, options?: CostFormatOptions )
apps/web/src/lib/cost.ts:32
↓ 6 callersFunctiongetCommandByKey
(key: string)
scripts/make-menu.ts:475
↓ 6 callersFunctiongetLatencyStatus
({ latencyMs, failed = false }: LatencyStatusInput)
apps/web/src/lib/network-latency-constants.ts:25
↓ 6 callersFunctiongetNetworkProbeTypeLabel
(t: Translate, probeType: string)
apps/web/src/lib/network-i18n.ts:70
↓ 6 callersMethodget_effective_capabilities
Effective capabilities == the agent's reported capabilities. Kept as a named accessor so call sites read intent clearly even though there is no longer
crates/server/src/service/agent_manager.rs:552
↓ 6 callersFunctionget_events
( State(state): State<Arc<AppState>>, ConnectInfo(addr): ConnectInfo<std::net::SocketAddr>, Extens
crates/server/src/router/api/docker.rs:368
↓ 6 callersMethodgrants_path
(&self)
crates/agent/src/config.rs:73
↓ 6 callersMethodhandle
Single entry point dispatched from the agent reporter loop.
crates/agent/src/firewall/manager.rs:40
↓ 6 callersMethodhandle_start_stats
(&mut self, interval_secs: u32)
crates/agent/src/docker/mod.rs:217
↓ 6 callersMethodhandle_sync
(&self, entries: Vec<BlockEntry>)
crates/agent/src/firewall/manager.rs:81
↓ 6 callersFunctionheaders_with
(name: &'static str, value: &str)
crates/server/src/middleware/auth.rs:177
↓ 6 callersFunctionhttp_client
()
crates/server/tests/docker_integration.rs:90
↓ 6 callersFunctioninsert_server_with_expiry
Helper: insert a server with a specific `expired_at` value.
crates/server/src/service/alert.rs:3250
↓ 6 callersFunctioninsert_test_server
( db: &DatabaseConnection, id: &str, name: &str, price: Option<f64>, b
crates/server/src/service/cost.rs:817
↓ 6 callersFunctionis_ignorable_push
First-connect pushes that a default agent must tolerate and ignore. These (ping/network/IP-quality sync + firewall blocklist messages) are unrelated t
crates/server/tests/agent_ws_dispatch.rs:66
↓ 6 callersFunctionis_private
(ip: &IpAddr)
crates/server/src/service/geoip.rs:180
↓ 6 callersFunctionlist_devices
( State(state): State<Arc<AppState>>, Extension(current_user): Extension<CurrentUser>, )
crates/server/src/router/api/mobile.rs:269
↓ 6 callersMethodload
Load (or start empty). Corrupt / unknown-version / missing → empty (fail-safe: no temporary grants).
crates/agent/src/capability_grants/store.rs:39
↓ 6 callersMethodlookup
Lookup an IP address and return a display string like "AS15169 Google LLC". Returns None for private/loopback IPs or unknown IPs.
crates/server/src/service/asn.rs:63
↓ 6 callersFunctionmakeEntry
(overrides: Partial<UptimeDailyEntry> = {})
apps/web/src/components/uptime/uptime-timeline.test.tsx:35
↓ 6 callersFunctionmakeJob
(overrides: Partial<UpgradeJob> = {})
apps/web/src/hooks/use-upgrade-job.test.ts:9
↓ 6 callersFunctionmakeServer
(overrides: Partial<ServerResponse> = {})
apps/web/src/components/server/recover-agent-dialog.test.tsx:113
↓ 6 callersFunctionmake_connect_info
(ip: &str)
crates/server/src/router/utils.rs:71
↓ 6 callersFunctionmake_payload
(source_ip: &str)
crates/server/src/service/firewall.rs:626
↓ 6 callersFunctionmake_rule
(id: &str)
crates/server/src/service/firewall.rs:648
↓ 6 callersFunctionmake_tracker
()
crates/server/src/service/upgrade_tracker.rs:293
↓ 6 callersFunctionmap_volume
Pure mapping from a bollard `Volume` model to our `DockerVolume` DTO. Extracted so the transformation can be unit-tested without a live daemon.
crates/agent/src/docker/volumes.rs:7
↓ 6 callersMethodmark_in_progress
(&self, transfer_id: &str)
crates/server/src/service/file_transfer.rs:171
↓ 6 callersFunctionmockFetchResponse
(body: unknown, options: { status?: number } = {})
apps/web/src/hooks/use-dashboard.test.tsx:57
↓ 6 callersFunctionnormalize_release_tag
(tag: &str)
crates/server/src/service/upgrade_release.rs:174
↓ 6 callersMethodnote_agent_external_ip
Record/update/clear an agent's last reported external IP. Called from the agent WS handler on `SystemInfo` and `IpChanged`.
crates/server/src/service/firewall.rs:148
↓ 6 callersMethodonMessage
(handler: MessageHandler)
apps/web/src/lib/ws-client.ts:88
↓ 6 callersFunctionoutcome
(status: u16, body: &str, final_url: &str, redirects: Vec<&str>)
crates/agent/src/ip_quality/detectors/amazon_prime.rs:85
↓ 6 callersFunctionoutcome
(status: u16, body: &str, final_url: &str, redirects: Vec<&str>)
crates/agent/src/ip_quality/detectors/youtube_premium.rs:76
↓ 6 callersFunctionparseConfig
(configJson: string)
apps/web/src/lib/widget-helpers.ts:140
↓ 6 callersFunctionparseRequest
(service: UnlockService | null | undefined)
apps/web/src/components/ip-quality/custom-service-dialog-utils.ts:24
↓ 6 callersFunctionparse_host_port
(target: &str)
crates/agent/src/network_prober.rs:278
↓ 6 callersFunctionparse_ipapi_is_response
(v: JsonValue)
crates/server/src/service/ip_risk.rs:49
↓ 6 callersFunctionprobe_tcp_addrs
Connect to one of `addrs` (already SSRF-validated) and report reachability. Split out so tests can exercise the connect logic directly against a valid
crates/agent/src/probe_utils.rs:132
↓ 6 callersMethodpush_add_to_covered_agents
Push a `BlocklistAdd` to every covered, online, capability-allowed agent whose negotiated protocol is high enough to understand firewall messages.
crates/server/src/service/firewall.rs:214
↓ 6 callersFunctionrecord
(time: string, cpu: number)
apps/web/src/hooks/use-metric-series.test.ts:7
↓ 6 callersMethodrecord_blocked
Increment the blocked counter for an IP so it shows up in the next emitted PortScan evidence. Called from the firewall log stream.
crates/agent/src/security/scan_detector.rs:137
↓ 6 callersFunctionregister_agent
(client: &Client, base_url: &str)
crates/server/tests/docker_integration.rs:165
↓ 6 callersFunctionrequire_docker
Guard: checks both capability bit (CAP_DOCKER) and runtime feature ("docker").
crates/server/src/router/api/docker.rs:138
↓ 6 callersFunctionresetRuntime
()
packages/widget-sdk/src/runtime-context.ts:76
↓ 6 callersFunctionresolve_servers
( db: &DatabaseConnection, cover_type: &str, server_ids_json: &Option<String>, )
crates/server/src/service/alert.rs:975
↓ 6 callersFunctionrule_covers_server
Check if a rule's cover_type/server_ids covers a specific server (pure, no DB).
crates/server/src/service/alert.rs:941
↓ 6 callersFunctionrun_multi_probe
Run `count` probe attempts for the given target and aggregate results. - ICMP: uses `probe_icmp_batch` (single `ping -c N` invocation). - TCP/HTTP: r
crates/agent/src/network_prober.rs:162
↓ 6 callersFunctionrun_tick
Performs the work of a single `run` iteration: sweep timed-out upgrade jobs and drop expired terminal history. Extracted so it can be unit-tested dete
crates/server/src/task/upgrade_timeout.rs:23
↓ 6 callersFunctionsnapOnRelease
(item: LayoutItem, strategy: SizingStrategy, _ctx: SnapContext)
apps/web/src/components/dashboard/sizing-strategies/index.ts:54
↓ 6 callersFunctionspawn_body_server
Spawn a one-shot HTTP/1.1 server on 127.0.0.1 that replies to a single request with a body of `body_len` bytes (all `b'x'`). Returns the bound address
crates/agent/src/ip_quality/http.rs:170
↓ 6 callersFunctionssh_login_payload
(ip: &str, user: &str, first_seen: bool)
crates/server/src/service/security.rs:446
↓ 6 callersFunctionssrf_blocked
Build a [`ProbeResult`] representing a target that the SSRF guard refused to probe. Keeps the guard's message so the operator sees why it was blocked.
crates/agent/src/probe_utils.rs:8
↓ 6 callersFunctionstart_test_server
()
crates/server/tests/docker_integration.rs:18
↓ 6 callersFunctiontoRealtimeDataPoint
(metrics: ServerMetrics)
apps/web/src/hooks/use-realtime-metrics.ts:47
↓ 6 callersFunctiontrace_outcome
(status: u16, body: &str)
crates/agent/src/ip_quality/detectors/chatgpt.rs:144
↓ 6 callersFunctionupdate_target
( State(state): State<Arc<AppState>>, Path(id): Path<String>, Json(input): Json<UpdateNetworkProbe
crates/server/src/router/api/network_probe.rs:126
↓ 6 callersFunctionuseMetricSeries
({ records, server, metric }: Params)
apps/web/src/hooks/use-metric-series.ts:73
↓ 6 callersFunctionusePublicStatusConfig
()
apps/web/src/hooks/use-public-status.ts:5
↓ 6 callersFunctionvalidate_cover_type
(cover_type: &str)
crates/server/src/service/alert.rs:965
↓ 6 callersFunctionvalidation_message
(result: Result<server::Model, AppError>)
crates/server/src/service/server.rs:416
↓ 6 callersFunctionwrite_result
( db: &DatabaseConnection, task_id: &str, run_id: &str, server_id: &str, attempt: i32,
crates/server/src/task/task_scheduler.rs:361
↓ 5 callersFunctionagent_recv_until_types
Read forwarded agent frames until the set of `expected` `type`s has all been observed (deduped) or `budget` elapses. Ignorable first-connect pushes ar
crates/server/tests/ws_docker_browser.rs:211
↓ 5 callersFunctionaggregate_once
Performs the work of a single aggregator tick: roll up raw records into hourly summaries, hourly network probe summaries, daily traffic, and daily upt
crates/server/src/task/aggregator.rs:28
↓ 5 callersFunctionbootstrapLoader
(opts: BootstrapOptions = {})
apps/web/src/widgets-runtime/loader.ts:24
↓ 5 callersFunctionbring_up_agent
Register + connect a mock agent, consume the welcome frame, complete the SystemInfo handshake with the given capability bitmask, and drain the first-c
crates/server/tests/router_admin_extra.rs:52
↓ 5 callersFunctionbuildEmailPayload
(from: string, toAddresses: string[])
apps/web/src/routes/_authed/settings/notification-payloads.ts:1
↓ 5 callersFunctionbuildStatusPageUpdatePayload
(state: ConfigFormState)
apps/web/src/routes/_authed/settings/status-page-config-utils.ts:50
↓ 5 callersFunctionbuildTimelineGeometry
({ count, gap, width }: TimelineGeometryInput)
apps/web/src/components/uptime/uptime-timeline-geometry.ts:32
↓ 5 callersFunctionbuild_correlation_id
Build correlation ID: {task_id}:{run_id}:{server_id}:{attempt}
crates/server/src/task/task_scheduler.rs:20
↓ 5 callersFunctionclamp_public_metrics_from
Clamp the public metrics range before it reaches the DB. Rejects an inverted range and caps the span so an unauthenticated caller cannot force an ove
crates/server/src/service/public_status.rs:266
↓ 5 callersFunctionclassifyCapability
(host: CapabilityHost, bit: number)
apps/web/src/lib/capabilities.ts:115
↓ 5 callersFunctioncleanup_disconnected_docker_state
Clean up Docker viewer tracking, features, and broadcast availability change. Docker caches (containers, stats, info) and log sessions are intentiona
crates/server/src/service/agent_manager.rs:769
↓ 5 callersMethodclose
()
apps/web/src/lib/ws-client.ts:108
↓ 5 callersFunctioncreateActionsHelper
(actions: ActionDefinition[])
packages/widget-sdk/src/actions/index.ts:22
↓ 5 callersFunctioncreateContext
({ req }: { req: Request })
packages/api/src/context.ts:3
↓ 5 callersFunctioncreateWrapper
()
apps/web/src/hooks/use-api.test.tsx:7
↓ 5 callersFunctioncreate_api_key
Create an admin API key and return the raw `serverbee_...` value.
crates/server/tests/ws_docker_browser.rs:60
↓ 5 callersFunctiondelete_user
( State(state): State<Arc<AppState>>, Extension(actor): Extension<CurrentUser>, ConnectInfo(addr):
crates/server/src/router/api/user.rs:173
↓ 5 callersFunctionderive_urls
由 release base + 版本号推导 (binary_url, checksums_url)。 base 必须 https://。version 不带前导 v。
crates/agent/src/upgrade.rs:33
↓ 5 callersFunctiondocker_audit_reason
(error: &AppError)
crates/server/src/router/api/docker.rs:82
↓ 5 callersFunctiondrain_initial_noise
Drain any first-connect noise the agent has already queued, so a later assertion about a freshly-pushed command is not confused by it.
crates/server/tests/router_probes_extra.rs:62
↓ 5 callersFunctionensure_resources
High-level operations the manager calls. Implemented as free functions taking `&dyn NftExecutor` so tests can swap.
crates/agent/src/firewall/nft.rs:111
↓ 5 callersFunctionentry
(overrides: Partial<TrafficOverviewItem>)
apps/web/src/lib/traffic.test.ts:8
↓ 5 callersFunctionevaluate_tick
Performs the per-tick work of the alert evaluator: evaluate all enabled alert rules once and log any error. Extracted from the `run` loop so it can be
crates/server/src/task/alert_evaluator.rs:30
↓ 5 callersFunctionexecute_command
( task_id: &str, command: &str, timeout: Option<u32>, )
crates/agent/src/reporter.rs:1285
↓ 5 callersFunctionfingerprint_from_machine_id
(machine_id: &str)
crates/agent/src/fingerprint.rs:17
↓ 5 callersMethodfinish_upload
Finalize an upload: rename .sb-part to the target path.
crates/agent/src/file_manager.rs:516
↓ 5 callersFunctionfixed_now
Fixed reference instant so timeout/retention cutoffs are deterministic.
crates/server/src/task/upgrade_timeout.rs:44
↓ 5 callersFunctionformatLatency
(ms: number | null | undefined)
apps/web/src/lib/network-types.ts:65
↓ 5 callersFunctionformatMs
(value: number | null | undefined, digits = 1)
apps/web/src/routes/_authed/network/$serverId.tsx:164
← previousnext →401–500 of 6,739, ranked by callers