Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aula-id/mini-gateway-rs
/ functions
Functions
455 in github.com/aula-id/mini-gateway-rs
⨍
Functions
455
◇
Types & classes
126
↓ 2 callers
Function
get_gateway_nodes_by_proxy_id
Retrieves all gateway nodes associated with a specific proxy This function fetches all gateway node records that reference the specified proxy ID. It
router-api/src/api/settings/gwnode_queries.rs:270
↓ 2 callers
Method
get_log_with_timeout
(&self, timeout_ms: u64)
router-api/src/module/memory_log/core.rs:467
↓ 2 callers
Function
get_pending
Get all pending entries for sync
router-api/src/module/ai_security/blocklist_store.rs:75
↓ 2 callers
Method
get_shard_index
Inline for potentially faster access
router-core/src/app/proxy_fast.rs:72
↓ 2 callers
Method
get_shard_index
Inline for potentially faster access
router-core/src/app/gateway_fast.rs:141
↓ 2 callers
Function
get_thread_id
Retrieves or creates a thread-specific identifier. This function manages thread-local ID assignment and caching. On first call from a thread, it assi
router-core/src/system/writer/rawid.rs:579
↓ 2 callers
Function
has_duplicate_listen_address
Checks if there are multiple proxies using the same listen address This function counts how many proxies are configured to listen on a given address.
router-api/src/api/settings/proxy_queries.rs:524
↓ 2 callers
Method
infer
Runs inference on the model with the given input features # Arguments `features` - Input feature vector as f32 values # Returns The model's output
router-api/src/module/ai_security/models.rs:82
↓ 2 callers
Function
init
()
router-core/src/system/prottp/mod.rs:4
↓ 2 callers
Function
init
()
router-api/src/config.rs:58
↓ 2 callers
Method
insert
Inserts a value into the cache, potentially evicting the least recently used item.
router-core/src/app/gateway_fast.rs:163
↓ 2 callers
Function
is_active
Fast O(1) check whether the blocklist is active. Single atomic load (~1ns). Used by the hot path in `gateway_fast.rs` to skip the heavier `is_blocked
router-core/src/system/prottp/app/blocklist.rs:89
↓ 2 callers
Function
is_ai_enabled
()
router-api/src/module/ai_security/state.rs:25
↓ 2 callers
Function
is_regex_pattern
Helper function to determine if a pattern string contains regex special characters. This function checks if a string has regex special metacharacters
router-core/src/app/gateway_fast.rs:543
↓ 2 callers
Function
listen
()
router-api/src/module/memory_log/logging/proxy.rs:7
↓ 2 callers
Function
load_logs
( start: DateTime<Utc>, end: DateTime<Utc>, )
router-api/src/module/temporary_log.rs:1420
↓ 2 callers
Function
log_cleanup
()
router-core/src/system/memory_log/mod.rs:985
↓ 2 callers
Function
memory_fence_acquire
()
router-core/src/system/memory_log/mod.rs:73
↓ 2 callers
Function
memory_fence_release
()
router-api/src/module/memory_log/core.rs:34
↓ 2 callers
Method
open
Open existing shared memory
router-api/src/module/memory_log/core.rs:146
↓ 2 callers
Method
populate_rules
Populates or refreshes the routing rules from the configuration source. This is the main function responsible for loading and processing rules.
router-core/src/app/gateway_fast.rs:265
↓ 2 callers
Function
process_batch
Extract batch processing to a separate function
router-api/src/module/memory_log/logging/gateway.rs:106
↓ 2 callers
Function
process_batch
Extract batch processing to a separate function
router-api/src/module/memory_log/logging/proxy.rs:103
↓ 2 callers
Method
process_existing_certificate
Process existing certificate and save to database
router-api/src/module/certificate_automation.rs:883
↓ 2 callers
Method
renew_due_certificates
Generate certificates for all domains with tls_autron=true that need renewal This function scans all proxy domains and renews certificates that are:
router-api/src/module/certificate_automation.rs:604
↓ 2 callers
Method
rotate_segment
(&mut self, rotation_time: DateTime<Utc>)
router-api/src/module/temporary_log.rs:429
↓ 2 callers
Function
save_gateway
Saves a gateway configuration to the database This function inserts a new gateway record or updates an existing one if a gateway with the same ID alr
router-api/src/api/settings/gateway_queries.rs:311
↓ 2 callers
Function
save_gateway_node
Saves a gateway node configuration to the database This function inserts a new gateway node record or updates an existing one if a gateway node with
router-api/src/api/settings/gwnode_queries.rs:353
↓ 2 callers
Function
spawn_isolation_with_sender
Spawn Isolation thread and register sender
router-api/src/module/ai_security/mod.rs:75
↓ 2 callers
Function
spawn_xgboost_with_sender
Spawn XGBoost thread and register sender
router-api/src/module/ai_security/mod.rs:63
↓ 2 callers
Method
start
Start the database pooling thread
router-api/src/module/database_log.rs:231
↓ 2 callers
Function
switcher
(marker: &str, level: log::Level, message: &str)
router-core/src/system/memory_log/sender.rs:3
↓ 2 callers
Method
to_feature_vector
Converts the log into a feature vector for model inference
router-api/src/module/ai_security/thread_xgboost.rs:54
↓ 2 callers
Function
update_inference_stats
Updates inference statistics for an AI model
router-api/src/api/ai_security/ai_model_queries.rs:139
↓ 2 callers
Method
update_rules_and_config_id
Atomically updates the REDIRECT_RULES and SAVED_CONFIG_ID.
router-core/src/app/gateway_fast.rs:430
↓ 2 callers
Function
upload_config
(base_url: &str, token: &str, config_path: &PathBuf)
router-cli/src/main.rs:304
↓ 2 callers
Function
upsert_ai_model
Inserts or updates an AI model in the database
router-api/src/api/ai_security/ai_model_queries.rs:104
↓ 2 callers
Method
validate_certificate_domain
Validate that certificate matches the expected domain name
router-api/src/module/certificate_automation.rs:806
↓ 1 callers
Method
add_cert
( &mut self, domain: String, cert: &str, key: &str, )
router-core/src/system/server.rs:70
↓ 1 callers
Function
append_config
Helper function to append a value to the global config
router-api/src/config.rs:36
↓ 1 callers
Method
assign_thread_id
Assigns a new unique thread ID from the global counter. This method provides thread-local identifiers that are unique within the current process inst
router-core/src/system/writer/rawid.rs:503
↓ 1 callers
Function
auto_renewal_daemon
Main auto-renewal daemon loop
router-api/src/module/auto_renewal/spawner.rs:106
↓ 1 callers
Method
broadcast_stats
Broadcast current stats to all clients
router-api/src/api/statistics/unified_stream.rs:93
↓ 1 callers
Method
call
(&self, req: ServiceRequest)
router-api/src/api/users/helper/auth_middleware.rs:72
↓ 1 callers
Method
check_and_reload_config_if_needed
Checks if the configuration should be reloaded based on time interval.
router-core/src/app/proxy_fast.rs:535
↓ 1 callers
Method
check_and_reload_config_if_needed
Checks if the configuration should be reloaded based on time interval and ID change.
router-core/src/app/gateway_fast.rs:493
↓ 1 callers
Function
check_and_renew_expiring_certificates
Check database for expiring certificates and renew them
router-api/src/module/auto_renewal/spawner.rs:147
↓ 1 callers
Method
check_and_reset_if_corrupted
Add more robust corruption detection
router-core/src/system/memory_log/mod.rs:445
↓ 1 callers
Method
check_certificate_expiry
(&self, cert_path: &str)
router-api/src/module/certbot_runner.rs:449
↓ 1 callers
Method
check_segment_rotation
(&mut self)
router-api/src/module/temporary_log.rs:414
↓ 1 callers
Function
cleanup
Cleanup expired blocklist entries. Reads from mini_config (canonical persistent store), filters out expired entries, rebuilds the in-memory cache, an
router-core/src/system/prottp/app/blocklist.rs:131
↓ 1 callers
Method
clear
Clears all entries from all cache shards.
router-core/src/app/gateway_fast.rs:180
↓ 1 callers
Function
clear_pending
Clear pending entries after successful sync
router-api/src/module/ai_security/blocklist_store.rs:82
↓ 1 callers
Method
create
Creates new broadcaster and spawns broadcast loop
router-api/src/api/statistics/unified_stream.rs:32
↓ 1 callers
Method
create_certificate_interactive
Create certificate interactively (requires TTY)
router-api/src/module/certbot_runner.rs:400
↓ 1 callers
Function
delete_all_gateway_nodes
Deletes all gateway node configurations from the database This function removes all gateway node records from the database. It should be used with ca
router-api/src/api/settings/gwnode_queries.rs:504
↓ 1 callers
Function
delete_all_gateways
Deletes all gateway configurations from the database This function removes all gateway records from the database. It should be used with caution as i
router-api/src/api/settings/gateway_queries.rs:384
↓ 1 callers
Function
delete_all_proxies
Deletes all proxy configurations from the database This function removes all proxy records from the database. It should be used with caution as it wi
router-api/src/api/settings/proxy_queries.rs:434
↓ 1 callers
Function
delete_all_proxy_domains
Deletes all proxy domain configurations from the database This function removes all proxy domain records from the database. It should be used with ca
router-api/src/api/settings/proxydomain_queries.rs:396
↓ 1 callers
Function
delete_gateway_node_by_id
Deletes a gateway node configuration from the database by its ID This function removes a gateway node record from the database based on its ID. It re
router-api/src/api/settings/gwnode_queries.rs:419
↓ 1 callers
Function
delete_proxy_domains_by_proxy_id
Deletes all proxy domains associated with a specific proxy This function removes all proxy domain records from the database that are associated with
router-api/src/api/settings/proxydomain_queries.rs:375
↓ 1 callers
Method
dequeue_with_timeout
Dequeue with timeout - for controlled consumption
router-api/src/module/memory_log/core.rs:337
↓ 1 callers
Function
disable_ai
Disable AI inference
router-api/src/module/ai_security/state.rs:36
↓ 1 callers
Function
download_config
(base_url: &str, token: &str, output_path: &PathBuf)
router-cli/src/main.rs:365
↓ 1 callers
Method
duplex
(&self, mut server_session: Stream, mut client_session: Stream)
router-core/src/app/proxy_fast.rs:613
↓ 1 callers
Method
enabled
Determines if a log record with the given metadata should be logged. This method checks if the record's level is at least as severe as the logger's c
router-core/src/system/writer/logger.rs:34
↓ 1 callers
Method
encode_base58
Encodes a 128-bit integer directly to Base58 without intermediate hash functions. This method provides efficient encoding of large integers to a huma
router-core/src/system/writer/rawid.rs:424
↓ 1 callers
Method
enqueue
Enhanced enqueue with entry size verification and more robust corruption handling
router-core/src/system/memory_log/mod.rs:476
↓ 1 callers
Method
ensure_certificate_and_save_internal
Internal method to generate certificate without checking tls_mode recursion This method performs the actual certificate generation logic
router-api/src/module/certificate_automation.rs:418
↓ 1 callers
Function
extract_first_certificate
(pem_chain: &str)
router-core/src/system/prottp/app/gateway_node.rs:5
↓ 1 callers
Function
extract_first_certificate_with_logging
Alternative approach with certificate counting and better logging
router-core/src/system/prottp/app/proxy_node.rs:6
↓ 1 callers
Method
find_cert_for_hostname
Find certificate for a hostname and cache the result
router-core/src/system/server.rs:98
↓ 1 callers
Method
find_matching_cert
Search for matching certificate (exact or wildcard)
router-core/src/system/server.rs:141
↓ 1 callers
Function
gateway
(client: web::Data<Arc<Mutex<HttpC>>>)
router-api/src/api/sync/proxy_node.rs:86
↓ 1 callers
Function
gateway_logger
()
router-core/src/system/memory_log/mod.rs:913
↓ 1 callers
Function
generate_certificate_staging
Convenience function to generate a certificate using default staging configuration
router-api/src/module/certificate_automation.rs:963
↓ 1 callers
Function
generate_gateway_id
Generates a new unique identifier for a gateway This function creates a UUID v4 (random) string that can be used as the ID for a new gateway. UUIDs a
router-api/src/api/settings/gateway_queries.rs:408
↓ 1 callers
Function
generate_gateway_node_id
Generates a new unique identifier for a gateway node This function creates a UUID v4 (random) string that can be used as the ID for a new gateway nod
router-api/src/api/settings/gwnode_queries.rs:446
↓ 1 callers
Function
generate_proxy_domain_id
()
router-api/src/api/settings/proxy_queries.rs:559
↓ 1 callers
Method
generate_raw
Generates a raw 128-bit ID with maximum entropy and collision resistance. This is the core ID generation method that combines multiple entropy source
router-core/src/system/writer/rawid.rs:347
↓ 1 callers
Function
generate_token
Generates a JWT token for a user Creates a JWT token containing the user's ID, username, and role, signed with the provided configuration's secret ke
router-api/src/api/users/helper/auth_token.rs:166
↓ 1 callers
Method
get_adjusted_timestamp
Gets an adjusted timestamp that handles clock drift and backwards jumps. This is a critical method for maintaining the monotonic ordering guarantee o
router-core/src/system/writer/rawid.rs:289
↓ 1 callers
Function
get_all_gateway_nodes
Retrieves all gateway node configurations from the database This function fetches all gateway node records from the database and converts them into `
router-api/src/api/settings/gwnode_queries.rs:117
↓ 1 callers
Function
get_all_gateway_nodes
sync all path table infomation ```sql CREATE TABLE gateway_nodes ( id TEXT PRIMARY KEY, proxy_id TEXT NOT NULL, domain_id TEXT, title TEXT NOT NULL,
router-api/src/api/sync/gateway_node_queries.rs:69
↓ 1 callers
Function
get_all_gateway_paths
sync all path table infomation ```sql CREATE TABLE gateway_nodes ( id TEXT PRIMARY KEY, proxy_id TEXT NOT NULL, domain_id TEXT, title TEXT NOT NULL,
router-api/src/api/sync/gateway_node_queries.rs:238
↓ 1 callers
Function
get_all_gateways
Retrieves all gateway configurations from the database, ordered by priority This function fetches all gateway records from the database, orders them
router-api/src/api/settings/gateway_queries.rs:111
↓ 1 callers
Function
get_all_proxy_nodes
table infomation ```sql CREATE TABLE proxy_domains ( id TEXT PRIMARY KEY, proxy_id TEXT NOT NULL, tls BOOLEAN NOT NULL DEFAULT 0, tls_pem TEXT, tls_k
router-api/src/api/sync/proxy_node_queries.rs:48
↓ 1 callers
Method
get_appropriate_manager_for_domain
Get appropriate certificate manager based on domain's tls_mode and email
router-api/src/module/certificate_automation.rs:867
↓ 1 callers
Function
get_current_stats
Get current statistics for last 15 second window
router-api/src/api/statistics/unified_stream.rs:155
↓ 1 callers
Method
get_domains_due_for_renewal
Get domains that are due for renewal Returns a list of domains that need certificate renewal
router-api/src/module/certificate_automation.rs:737
↓ 1 callers
Function
get_gateway_by_id
Retrieves a specific gateway configuration by its ID This function fetches a single gateway record from the database based on the provided ID. It aut
router-api/src/api/settings/gateway_queries.rs:172
↓ 1 callers
Function
get_gwrs_services
Get list of gwrs-* services
router-core/src/detect.rs:88
↓ 1 callers
Method
get_rules
(&self)
router-core/src/app/gateway_fast.rs:468
↓ 1 callers
Method
get_timestamp
Gets the current timestamp in milliseconds since the custom epoch. This method provides the time component for ID generation. It uses the system mono
router-core/src/system/writer/rawid.rs:253
↓ 1 callers
Function
handle_connection
(stream: TcpStream, handler: std::sync::Arc<F>)
router-core/src/system/prottp/core.rs:55
↓ 1 callers
Function
init_ai_security
Initialize AI security - call at startup Checks DB for existing models and spawns threads if found
router-api/src/module/ai_security/mod.rs:23
↓ 1 callers
Function
init_config
(location: &Path)
router-cli/src/main.rs:192
↓ 1 callers
Function
init_database
Initializes the users database table and creates a default admin user if needed This function: 1. Creates the users table if it doesn't exist 2. Chec
router-api/src/api/users/mod.rs:103
↓ 1 callers
Method
init_database
Initialize the database, creating tables if they don't exist
router-api/src/module/database_log.rs:82
↓ 1 callers
Function
init_isolation_sender
Initialize Isolation sender
router-api/src/module/ai_security/state.rs:50
← previous
next →
101–200 of 455, ranked by callers