Skip to content

generate_context_fingerprint() has no way to set timezone or locale #559

@rubenvereecken

Description

@rubenvereecken

generate_context_fingerprint() and launch_options() don't coordinate on timezone and locale. Geoip resolves these in launch_options(), but the init script is already baked by generate_context_fingerprint() before geoip runs. There's no way to pass pre-resolved timezone/locale to the fingerprint generator.

This matters for profile-persistence workflows: resolve geoip once for a proxy IP, pin the timezone/locale, reuse across sessions without re-resolving. Currently there's no clean API for this — timezone only enters the fingerprint if the preset includes it (most don't), and locale has no path in at all.

Proposed fix

  1. Add timezone and locale params to generate_context_fingerprint() — injected into config before init_script generation
  2. In launch_options(), use setdefault for geoip timezone/locale keys so pre-set values aren't overwritten

This is somewhat opinionated — it fits workflows where one IP maps to one-or-more profiles, and a profile is never used with a different IP. Opt-in: callers who don't pass these params get current behaviour.

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