Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default port not applying on MacOS Catalina #1

Closed
sapphirecat opened this issue Jun 16, 2022 · 1 comment
Closed

Default port not applying on MacOS Catalina #1

sapphirecat opened this issue Jun 16, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sapphirecat
Copy link
Owner

A "minimal" config failed to work for me this morning:

[servers.dev]
address = "192.168.56.2"

[[rules]]
# ...

It produced this enigmatic error message:

dial tcp 192.168.56.2:0: connect: can't assign requested address

Note that the port is zero, rather than 80 or 443. Adding the http_port and https_port configurations to the config file made it work correctly.

@sapphirecat sapphirecat added the bug Something isn't working label Jun 16, 2022
@sapphirecat sapphirecat self-assigned this Jun 16, 2022
@sapphirecat
Copy link
Owner Author

sapphirecat commented Aug 15, 2022

Likely cause: pelletier/go-toml/v2 dropped support for default struct tags. The ports (80 and 443) are set via the default. ETA: We can set the defaults of the top-level struct, but we can't set defaults on interior structs (like the servers) as we unmarshal. We will have to recurse through the results, and fill in defaults for all zero values where that is actually invalid. Such as, but not limited to, HTTP/S port numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant