diff --git a/README.md b/README.md index d219674..bb60577 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,8 @@ The command line program supports loading configurations from both JSON files an | Disable SOCKS5 UDP support | socks5_disable_udp | -socks5-disable-udp | | HTTP listen address | http_addr | -http-addr | | HTTP connection timeout in seconds | http_timeout | -http-timeout | +| HTTP basic auth username | http_user | -http-user | +| HTTP basic auth password | http_password | -http-password | | Access control list | acl | -acl | | Server address | server | -server | | Authentication username | username | -username | @@ -162,3 +164,5 @@ By default, the program outputs DEBUG level, text format logs via stdout. To change the logging level, set `LOGGING_LEVEL` environment variable, which supports `panic`, `fatal`, `error`, `warn`, `info`, ` debug`, `trace` To print JSON instead, set `LOGGING_FORMATTER` to `json` + +To change the logging timestamp format, set `LOGGING_TIMESTAMP_FORMAT` \ No newline at end of file diff --git a/README.zh.md b/README.zh.md index d360ba5..23a36d5 100644 --- a/README.zh.md +++ b/README.zh.md @@ -88,6 +88,8 @@ Hysteria 是专门针对恶劣网络环境(常见于在中国访问海外服 | 禁用 SOCKS5 UDP 支持 | socks5_disable_udp | -socks5-disable-udp | | HTTP 监听地址 | http_addr | -http-addr | | HTTP 超时时间(秒) | http_timeout | -http-timeout | +| HTTP 验证用户名 | http_user | -http-user | +| HTTP 验证密码 | http_password | -http-password | | ACL 规则文件 | acl | -acl | | 服务端地址 | server | -server | | 验证用户名 | username | -username | @@ -159,4 +161,6 @@ shady_hacker smokeweed420 如果需要修改日志级别可以使用 `LOGGING_LEVEL` 环境变量,支持 `panic`, `fatal`, `error`, `warn`, `info`, `debug`, `trace` -如果需要输出 JSON 可以把 `LOGGING_FORMATTER` 设置为 `json` \ No newline at end of file +如果需要输出 JSON 可以把 `LOGGING_FORMATTER` 设置为 `json` + +如果需要修改日志时间戳格式可以使用 `LOGGING_TIMESTAMP_FORMAT` \ No newline at end of file diff --git a/cmd/proxy_client.go b/cmd/proxy_client.go index 604cd63..6753a31 100644 --- a/cmd/proxy_client.go +++ b/cmd/proxy_client.go @@ -174,7 +174,10 @@ func proxyClient(args []string) { } decodeBytes, err := base64.StdEncoding.DecodeString(authStr[1]) if err != nil { - logrus.WithField("error", err).Fatal("Failed to decode base64 auth string") + logrus.WithFields(logrus.Fields{ + "error": err, + "cred": authStr[1], + }).Debug("Failed to decode base64 auth string") return req, resp } userAndPassword := strings.Split(string(decodeBytes), ":")