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

Display local IP #716

Merged
merged 10 commits into from
Mar 17, 2021
Merged

Display local IP #716

merged 10 commits into from
Mar 17, 2021

Conversation

Darkren
Copy link
Contributor

@Darkren Darkren commented Mar 12, 2021

Did you run make format && make check?
Yes
Fixes #389

Works only on Linux and MacOS systems

This PR also contains all the commits from #685 . So if this gets merged, #685 may be closed for good.

Changes:

  • DefaultNetworkInterface, LocalNetworkInterfaceIPs, NetworkInterfaceIPs were moved from vpn to util/netutil;
  • DefaultNetworkInterface was implemented for MacOS;
  • local_ip field was added to the response from `/api/visors/{pk}.

How to test this PR:

  1. Run visor with hypervisor
  2. Open network console in browser
  3. Open visor page
  4. Check response from /api/visors/{pk}. It should contain local_ip field with the corresponding value for you default network interface IP

Copy link
Member

@jdknives jdknives left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well on Mac.

@Senyoret1
Copy link
Contributor

Worked well in my test using Linux. However, I’m not sure if it will work well with #699 and the PR it depends on. Also, quick question: if it works only in Mac and Linux, what is the expected content of the local_ip field when using Windows?

@Darkren
Copy link
Contributor Author

Darkren commented Mar 16, 2021

Worked well in my test using Linux. However, I’m not sure if it will work well with #699 and the PR it depends on. Also, quick question: if it works only in Mac and Linux, what is the expected content of the local_ip field when using Windows?

@Senyoret1 previously it couldn't be built on Windows. but I fixed it, now it will return empty string for Win

@jdknives jdknives merged commit f136915 into skycoin:develop Mar 17, 2021
@jdknives jdknives mentioned this pull request Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants