Giter VIP home page Giter VIP logo

deno-local-ip's People

Contributors

joakimunge avatar korki43 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rmw-lib

deno-local-ip's Issues

Does not take into account other IPs a machine has.

I have the following setup in my local machine:

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:d3ff:fef3:bb65  prefixlen 64  scopeid 0x20<link>
        ether 02:42:d3:f3:bb:65  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3  bytes 306 (306.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1460
        inet 10.148.0.5  netmask 255.255.255.255  broadcast 0.0.0.0
        inet6 fe80::4001:aff:fe94:5  prefixlen 64  scopeid 0x20<link>
        ether 42:01:0a:94:00:05  txqueuelen 1000  (Ethernet)
        RX packets 2897452  bytes 1906694558 (1.9 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2811602  bytes 983938685 (983.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 129025  bytes 12076299 (12.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 129025  bytes 12076299 (12.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Apparently, this library picked up docker0 as the IP and reported it to my remote system which resulted in it being unreachable.

Support for Windows

This module uses the command ifconfig to fetch the users ip.

Maybe support for windows could be implemented using the similar ipconfig shell command?

Got undefined getNetworkAddr

i got undefined using the latest version

import { getNetworkAddr } from 'https://deno.land/x/local_ip/mod.ts';
const netAddr = await getNetworkAddr(); // undefined

throw on Error

I think, for use as a module it should throw the errrors, rather than logging them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.