feat: add proxy_url config and auto-rotate logs at 10 MiB#94
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Proxy support — in config.toml:
http://user:pass@proxy:8080Log rotation — both daemon.log and audit.log auto-rotate:
RotatingFilewriterFiles
internal/config/config.go— add ProxyURL fieldinternal/wire/client.go— wire proxy into gorilla/websocket dialerinternal/logger/rotating.go— new RotatingFile io.WriteCloserinternal/audit/audit.go— change DefaultMaxBytes to 10 MiBcmd/hermes-node/main.go— wire proxy in dialer, add daemon log rotation, validate proxy_urlREADME.md— document proxy_url