kyoukaya / hoxy

Intercept, decrypt, and process Girl's Frontline game data
22 stars 4 forks source link

Introduce basic INI Parsing and configuration and simplification #8

Closed spflaumer closed 1 year ago

spflaumer commented 1 year ago

Currently only the HTTPSBlockList, TelemetryBlockList and ExcludeLog Keys work. If no config file is specified default options are used. proxy.Start() configures itself fully.

spflaumer commented 1 year ago

Why are \ preceding all dots in the default blocklist definitions?

kyoukaya commented 1 year ago

Why are \ preceding all dots in the default blocklist definitions?

IIRC it's needed to represent a literal period as its parsed as regex.

I think while your implementation works, ini is a bad fit for most modern config files. I'd used either yaml or json and marshal/unmarshal it to a struct with struct tags.

spflaumer commented 1 year ago

makes sense. i'll rewrite the config to use yaml or toml then (depending on what's easier and more suitable)

spflaumer commented 1 year ago

i feel like toml might be easier overall as it appears to be more straightforward, so i will rewrite the config as toml