Skip to main content

Module config

Module config 

Source
Expand description

config.toml: user settings. Every key is optional. The library only parses text (Config::parse) or takes a struct; reading the file (and the hydra key it points to) is the CLI’s job.

# Placing real orders stays impossible until the user sets this to true
# themselves. grabcli never writes this key.
allow_ordering = false

# Default payment method for quotes and orders (Grab's paymentTypeID).
payment_type_id = "123456789"

# Chrome DevTools Protocol endpoint of a logged-in browser, used by
# `grab auth import` and as hydra/cookie refresh fallback.
cdp = "http://127.0.0.1:9222"

# Refresh hydra / cookies automatically when they expire (default true).
auto_refresh = true

# How to mint the hydra device JWT: "auto" (native if a key is present,
# else CDP), "native" or "cdp".
hydra_mode = "auto"

# Phone number `grab auth login` uses when --phone is not given
# (international form). Only ever printed masked.
phone = "+63XXXXXXXXXX"

# Local cache for read-only browse data (see cache/mod.rs). TTLs in seconds.
[cache]
enabled = true
image_max_mb = 500
index_max_age_days = 30
[cache.ttl]
list = 600
menu = 1800
details = 21600
categories = 86400

Structs§

Config

Enums§

HydraMode

Constants§

DEFAULT_CDP