Commit Graph

9 Commits

Author SHA1 Message Date
fatedier
774478d071 pkg/config: improve error messages with line number details for config parsing (#5194)
When frpc verify encounters config errors, the error messages now include
line/column information to help users locate problems:

- TOML syntax errors: report line and column from the TOML parser
  (e.g., "toml: line 4, column 11: expected character ]")
- Type mismatch errors: report the field name and approximate line number
  (e.g., "line 3: field \"proxies\": cannot unmarshal string into ...")
- File format detection: use file extension to determine format, preventing
  silent fallthrough from TOML to YAML parser which produced confusing errors

Previously, a TOML file with syntax errors would silently fall through to the
YAML parser, which would misinterpret the content and produce unhelpful errors
like "json: cannot unmarshal string into Go value of type v1.ClientConfig".

https://claude.ai/code/session_017HWLfcXS3U2hLoy4dsg8Nv

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-04 19:27:30 +08:00
fatedier
fbeb6ca43a refactor: restructure API packages into client/http and server/http with typed proxy/visitor models (#5193) 2026-03-04 17:38:43 +08:00
fatedier
01997deb98 add persistent proxy/visitor store with CRUD API and web UI (#5188) 2026-03-02 01:09:59 +08:00
fatedier
8eb525a648 feat: support YAML merge in strict configuration mode (#4809) 2025-06-25 11:40:23 +08:00
hansmi
b8d3ace113 Use text/template instead of html/template for config pre-processing (#4656) 2025-02-07 11:33:11 +08:00
fatedier
38f297a395 Improve the strict configuration validation (#3809) 2023-11-28 18:43:33 +08:00
fatedier
526e809bd5 update for strict config (#3779) 2023-11-16 21:03:36 +08:00
Aarni Koskela
e8deb65c4b Strict configuration parsing (#3773)
* Test configuration loading more precisely

* Add strict configuration parsing
2023-11-16 15:42:49 +08:00
fatedier
3ae1a4f45a update confugration examples and README (#3650) 2023-10-10 16:48:13 +08:00