You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add a switch to control whether to prefer to register public address or site local address - #3834
fix the issue: #3802
improve the existing changes: #3520
Brief changelog
add a switch dubbo.prefer.public.address.
change the strategy to achieve IP address.
steps to achieve IP:
judge the switch dubbo.prefer.public.address
search from hosts mapping using InetAddress.getLocalHost()
search from the network cards using NetworkInterface.getNetworkInterfaces()
if the address achieved in 2 & 3 not match the dubbo.prefer.public.address, downgrade to the reverse property of dubbo.prefer.public.address. In words, if no public address found, downgrade to site-local address; if no site-local address found, downgrade to public address;
if no address found, using loopback address 127.0.0.1.
I notice that the file style of NetUtils changes from CRLF to LF. This causes a miss-comparison between new and reversions. Which one of CRLF and LF prefers in Dubbo? or maybe it does not take any difference.
I notice that the file style of NetUtils changes from CRLF to LF. This causes a miss-comparison between new and reversions. Which one of CRLF and LF prefers in Dubbo? or maybe it does not take any difference.
make sure you set autocrlf = false in your gitconfig to avoid it.
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
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.
What is the purpose of the change
fix the issue: #3802
improve the existing changes: #3520
Brief changelog
dubbo.prefer.public.address.steps to achieve IP:
dubbo.prefer.public.addressInetAddress.getLocalHost()NetworkInterface.getNetworkInterfaces()dubbo.prefer.public.address, downgrade to the reverse property ofdubbo.prefer.public.address. In words, if no public address found, downgrade to site-local address; if no site-local address found, downgrade to public address;