-
Notifications
You must be signed in to change notification settings - Fork 238
Re-examine internal/external IP for serverlist #2643
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
Re-examine internal/external IP for serverlist #2643
Conversation
|
@pljones What is the internal/external IP issue that you are addressing? Since I am often supporting uses that trip over localIP/ExternalIP/NAT issues, I am interested in following the full range of issues. THX |
|
Think of a LAN behind an external router. (I'll not get into the router configuration for ports.) Say the Directory is 10.0.1.23 Say the external address of the router is 86.212.104.22 When an internal client wants the server IP, it wants 10.0.1.24 When an external client wants the server IP, it wants 86.212.104.22 Now say a server not on the LAN registers with an IP address of 37.141.86.185 When an internal (to the directory) client wants the server IP, it wants 37.141.86.185 When an external (to the directory) client wants the server IP, it wants ... what? Well... 37.141.86.185 if it's not internal to that server but it wants the server LAN address if it is. I'm not certain what it used to do but I think mine's clearer. |
7ceaa4c to
e7ac4a2
Compare
|
@pljones If the person operating the servers is the only one using a client on the LAN, that person is technically savvy and they can choose whatever they like. In my case, I want a solution for guest on my LAN. In this case, I want a solution were the guest (being less technically savvy) has the same user experience on my LAN as when connected to the external network. For this goal, I put routing table entries so that the router routes the external IP address to the matching local address. In your example, an internal client would request 86.212.104.22 and the router will route the messages to 10.0.1.24. Now we get to the inconsistency of your example. Unfortunately this requires a discussion about routing tables and port mapping. Are you on a path for a different solution? |
|
@gene96817 I'm not changing the intended current behaviour, just simplifying the code, as far as I'm aware. If you want to start a discussion on the topic, the discussions area is where you should do it, not during code review. |
|
@pljones Thanks for your work. It just wasn't clear to me what you were trying to fix. |
e7ac4a2 to
9b0b7eb
Compare
9b0b7eb to
7517f7b
Compare
hoffie
left a comment
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.
Looks sane to me.
| --port sets the port the server listens to locally | ||
| --serverbindip sets the IP the server listens to locally | ||
| --serverpublicip sets the public IP where server and directory are on the same LAN |
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.
| --serverpublicip sets the public IP where server and directory are on the same LAN | |
| --serverpublicip sets the public IP when server and directory are on the same LAN |
?
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.
Short for "in the situation where" but I guess "when" works... I'll think about it :)
softins
left a comment
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 think this is ok. I've studied it for a while, and compiled it, but I don't currently have time to run any test cases.
|
I think the Changelog entry should be made a bit clearer (what would an interested user want to read? What has changed? What is being handled?) |
|
Hopefully nothing has changed. It's to make the code clearer. So it's aimed purely at someone reading the code. Really only smoeone looking at the diff would be interested. |
|
Then the changelog should also say "clarify" and "Code" Refactoring: Clarify handling of requests for the server list in code Or similar |
Short description of changes
I'm hoping this change at least clarifies what's meant to happen with the more complicated client/server/directory trios, i.e. where one or other - or both - of the client and server are local to the directory itself.
CHANGELOG: Refactoring: Handling of requests for the server list.
Context: Fixes an issue?
Not that I can remember.
Does this change need documentation? What needs to be documented and how?
Should be noticeable in most situations and I don't think we document at this level of detail.
Status of this Pull Request
My directories run with it (at seem to get used). It's not fixed anything or broken anything as far as I can tell.
What is missing until this pull request can be merged?
Someone else reading it and understanding it...
Checklist