sanctuary-zero icon indicating copy to clipboard operation
sanctuary-zero copied to clipboard

Issue 23: Add method to get and display IP address on vebose

Open vinmay opened this issue 3 years ago • 13 comments

https://github.com/t0xic0der/sanctuary-zero/issues/23

vinmay avatar Oct 16 '20 17:10 vinmay

@t0xic0der I can use another way to fetch the IP Address. I didn't understand why the above won't be helpful. Are you saying we want to display both IPv4 and IPv6 on verbose?

vinmay avatar Oct 17 '20 10:10 vinmay

@t0xic0der I can use another way to fetch the IP Address. I didn't understand why the above won't be helpful. Are you saying we want to display both IPv4 and IPv6 on verbose?

No no. I mean that in both the cases (for IPv4 and IPv6) - the address which is obtained by the socket module is 127.0.1.1 which in fact cannot be used by an external entity to connect as this is an internal address. Please use some other way to get valid IPv4 and IPv6 addresses.

gridhead avatar Oct 17 '20 13:10 gridhead

@t0xic0der Ahh got it ! I am looking at this right now.

vinmay avatar Oct 19 '20 10:10 vinmay

@vinmay You better finish doing this before @shivangswain does :rofl:

gridhead avatar Oct 20 '20 02:10 gridhead

@t0xic0der Hey I checked in a solution for the ipV4, could you just check if that is what you are looking for ?

vinmay avatar Oct 21 '20 04:10 vinmay

Hi @vinmay, please rebase the branch of your fork to keep up with the latest changes made to main - and then make those changes. Let me know once you are done with that so that I can get into reviewing it.

gridhead avatar Oct 21 '20 09:10 gridhead

@t0xic0der Done. Another question I had while working on this was, is the intention here to display the public IP address that the system is connected to ?

vinmay avatar Oct 21 '20 09:10 vinmay

@t0xic0der Done. Another question I had while working on this was, is the intention here to display the public IP address that the system is connected to ?

I don't quite follow. The purpose is to simply display the IP address of the system where the service is hosted from, so that folks joining the service would get to know which address to connect to.

gridhead avatar Oct 22 '20 03:10 gridhead

Any updates, @vinmay?

gridhead avatar Oct 29 '20 12:10 gridhead

@t0xic0der I haven't gone back to this yet. If someone else has a better solution in between, please feel free to accept theirs. I will be getting back on this from Monday for sure.

vinmay avatar Oct 30 '20 15:10 vinmay

Sure thing. @shivangswain is working on it. Take your time. :smile:

gridhead avatar Oct 30 '20 15:10 gridhead

@t0xic0der Should I just close this?

vinmay avatar Nov 06 '20 14:11 vinmay

@t0xic0der Done. Another question I had while working on this was, is the intention here to display the public IP address that the system is connected to?

This was exactly the intention of the issue. Currently your implementation displays the IP assigned to the device running the host by the local router or switch and not the public IP address of the server. You can out check my implementation if you want to know how I did it.

shivangswain avatar Nov 06 '20 14:11 shivangswain