MCPcopy Create free account

hub / github.com/compassvpn/agent / functions

Functions45 in github.com/compassvpn/agent

↓ 11 callersFunction_prom_label_escape
Escape a value for a Prometheus exposition-format label value. Label values must escape backslash, double-quote, and newline; otherwise an un
xray-config/run.py:14
↓ 7 callersFunctionexec_command
Standardized subprocess execution wrapper.
shared_lib/system.py:26
↓ 6 callersFunction_river_escape
Escape a value for safe inclusion inside a River double-quoted string. Without this, a stray quote/newline/brace in an interpolated value could
metric-forwarder/common.py:56
↓ 5 callersFunctionis_debug
Single source of truth for the DEBUG flag. Checked here, the lowest-level module, so every other module can share one definition (env var fir
shared_lib/logger.py:8
↓ 4 callersMethod_interruptible_sleep
Sleep for `seconds`, returns True if shutdown requested.
xray-config/run.py:140
↓ 4 callersFunctionload_env
Reads key-value pairs from an env file, optionally including os.environ.
shared_lib/config.py:8
↓ 3 callersFunctionget_identifier
Retrieves the system identifier from environment variables or config file. Note: Stays in config.py to prevent circular imports with logger a
shared_lib/config.py:92
↓ 3 callersFunctionget_public_ip
Fetches the public IP and optionally country info from multiple providers.
shared_lib/network.py:8
↓ 2 callersMethodrun
(self)
xray-config/run.py:280
↓ 1 callersFunction_cert_not_after
Return a PEM cert's notAfter (UTC), or None if it can't be determined.
xray-config/config.py:126
↓ 1 callersMethod_create_cf_records
Internal method to manage Cloudflare DNS records.
xray-config/config.py:198
↓ 1 callersFunction_generate_wg_keys
Generates a WireGuard private and public key pair using the wg utility.
shared_lib/xray.py:59
↓ 1 callersMethod_get_domain
Internal method to retrieve domain from Cloudflare API.
xray-config/config.py:169
↓ 1 callersFunction_make_replica
(inbound_def: Dict[str, Any], replica_index: int, new_port: int)
xray-config/config.py:50
↓ 1 callersFunction_nginx_location_block
(path: str, xray_port: int, template: str)
xray-config/config.py:83
↓ 1 callersFunction_resolve_instance_ip
()
metric-forwarder/common.py:16
↓ 1 callersMethod_setup_routes
(self)
xray-config/run.py:33
↓ 1 callersFunctioncsv_to_dict
Converts a CSV file to a dictionary, skipping headers and malformed lines.
shared_lib/system.py:67
↓ 1 callersFunctiongenerate_config
()
metric-forwarder/common.py:72
↓ 1 callersFunctiongenerate_vmess_link
Generates a vmess:// link from a configuration dictionary.
shared_lib/xray.py:143
↓ 1 callersMethodget_config_links
Return formatted config links for active inbounds.
xray-config/config.py:726
↓ 1 callersFunctionget_machine_id
Retrieves the machine ID from the host system.
shared_lib/system.py:8
↓ 1 callersMethodinitialize
Perform all initialization logic. Only executes once.
xray-config/config.py:267
↓ 1 callersFunctionparse_config_link
Parses Xray config links (vmess, vless). Standardized to return 'id' as the primary identifier (consistent across protocols).
shared_lib/xray.py:11
↓ 1 callersFunctionregister_warp
Registers a new Warp account with Cloudflare and returns the configuration.
shared_lib/xray.py:79
↓ 1 callersMethodreload_certs
Bump cert serial so the config watcher detects a change and SIGHUPs xray to reload cert files.
xray-config/config.py:713
↓ 1 callersFunctionstart
()
metric-forwarder/alloy.py:7
↓ 1 callersMethodupdate_metrics
(self, configs: Dict[str, List[str]])
xray-config/run.py:78
Method__init__
Initialize instance attributes to hold shared variables.
xray-config/config.py:145
Method__init__
(self)
xray-config/run.py:25
Method_has_valid_tls
(inbound_def: Dict[str, Any])
xray-config/config.py:456
Methodbackground_job
(self)
xray-config/run.py:144
Methodcert_management_job
(self)
xray-config/run.py:223
Methodcreate_dns_record
(name: str, proxied: bool)
xray-config/config.py:224
Methoddns_record_already_exist
(record_name: str)
xray-config/config.py:202
Methodexport_certs
()
xray-config/run.py:50
Methodget_nginx_locations
()
xray-config/run.py:69
Methodget_warps
()
xray-config/run.py:57
Methodget_wg_configs
()
xray-config/run.py:63
Methodget_xray_config
()
xray-config/run.py:35
Methodmetrics
()
xray-config/run.py:75
Methodrun_acme
(cmd_args: str)
xray-config/config.py:338
Methodsubstitute_vars
Recursively substitute variables in strings within a nested data structure.
xray-config/config.py:392
Methodvalid_configs_route
()
xray-config/run.py:46
Functionwrite_env
Writes configuration data to an env file, preserving schema order if provided.
shared_lib/config.py:53