Skip to content

feat: add proxy_url config and auto-rotate logs at 10 MiB#94

Merged
blaspat merged 3 commits into
mainfrom
feat/proxy-docs
Jun 25, 2026
Merged

feat: add proxy_url config and auto-rotate logs at 10 MiB#94
blaspat merged 3 commits into
mainfrom
feat/proxy-docs

Conversation

@blaspat

@blaspat blaspat commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Changes

Proxy support — in config.toml:

  • No more needed
  • Supports Basic auth in URL: http://user:pass@proxy:8080
  • Falls back to env vars when empty
  • checks the URL

Log rotation — both daemon.log and audit.log auto-rotate:

  • 10 MiB per file, keeps 5 rotated copies
  • audit.log was 50 MiB, now 10 MiB
  • daemon.log was unbounded, now rotates via new RotatingFile writer
  • Max ~60 MiB per log type

Files

  • internal/config/config.go — add ProxyURL field
  • internal/wire/client.go — wire proxy into gorilla/websocket dialer
  • internal/logger/rotating.go — new RotatingFile io.WriteCloser
  • internal/audit/audit.go — change DefaultMaxBytes to 10 MiB
  • cmd/hermes-node/main.go — wire proxy in dialer, add daemon log rotation, validate proxy_url
  • README.md — document proxy_url

blaspat added 3 commits June 24, 2026 16:13
Document that hermes-node respects HTTPS_PROXY/HTTP_PROXY env vars
via gorilla/websocket's DefaultDialer — no config changes needed.
Includes FAQ entry on Basic auth and NTLM workaround.

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>
Adds a proxy_url field to [node] in config.toml so operators can
configure an HTTP(S) proxy without relying on environment variables.

- config.go: add ProxyURL field to NodeConfig
- client.go: add ProxyURL to DialOptions, wire into gorilla/websocket
  dialer via http.ProxyURL
- main.go: pass cfg.Node.ProxyURL in dialer options
- main.go (validate): validate proxy_url when set
- README.md: document proxy_url alongside existing env-var approach

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>
- audit.log: changed DefaultMaxBytes from 50 MiB to 10 MiB
- daemon.log: added RotatingFile writer in internal/logger that
  rotates when the file exceeds 10 MiB, keeps 5 rotated copies
- runRun: when running as inner daemon (HERMES_NODE_INNER set),
  replaces os.Stdout/os.Stderr with a rotating file writer so
  daemon.log auto-rotates without unbounded disk growth

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>
@blaspat blaspat merged commit 98660e2 into main Jun 25, 2026
14 checks passed
@blaspat blaspat deleted the feat/proxy-docs branch June 25, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant