-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Allow configuring multiple listen addresses for each port #372
Conversation
Codecov Report
@@ Coverage Diff @@
## development #372 +/- ##
===============================================
- Coverage 96.17% 95.82% -0.35%
===============================================
Files 30 30
Lines 2251 2278 +27
===============================================
+ Hits 2165 2183 +18
- Misses 56 63 +7
- Partials 30 32 +2
Continue to review full report at Codecov.
|
acc4026
to
f7defb1
Compare
f7defb1
to
09bd426
Compare
| httpPort | int (1 - 65535) | no | | HTTP listener port and optional bind ip address . If > 0, will be used for prometheus metrics, pprof, REST API, DoH ...If you wish to specify a specific IP, you can do so such as 192.168.0.1:4000. Example: 4000, :4000, 127.0.0.1:4000 | | ||
| httpsPort | int (1 - 65535) | no | | HTTPS listener port and optional bind ip address . If > 0, will be used for prometheus metrics, pprof, REST API, DoH... If you wish to specify a specific IP, you can do so such as 192.168.0.1:443 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the part about > 0
because as far as I can tell, 0 isn't treated specially. Maybe that's a bug, in which case I could add the docs back and fix the code.
|
||
if len(httpListeners) != 0 || len(httpsListeners) != 0 { | ||
metrics.Start(router, cfg.Prometheus) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested metrics as I don't have the setup for it yet, so please be mindful of this part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it -> works
|
||
lastIdx := len(split) - 1 | ||
|
||
apiHost = strings.Join(split[:lastIdx], ":") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't completely related, but I added this behavior as I noticed the discrepancy while fixing the code to work with a list.
I can remove commit 79dcf57 if you prefer.
@@ -15,7 +15,7 @@ import ( | |||
"github.com/sirupsen/logrus" | |||
) | |||
|
|||
// ClientNamesResolver tries to determine client name by asking responsible DNS server vie rDNS (reverse lookup) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks for you work! It looks good for me, works as expected! 👍 |
I use this to bind to localhost and my LAN interface, but not the WAN one.