पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

GitHub रिपॉज़िटरीivirtex/lan_scanner

lan_scanner

लोकल नेटवर्क (LAN) में नेटवर्क डिवाइस की खोज करने की अनुमति देने वाला Dart / Flutter पैकेज, बहु-थ्रेडेड ICMP पिंग के माध्यम से।

lan_scanner प्रोजेक्ट कवर
स्टार
27
फ़ोर्क
4
अंतिम पुश (UTC)
5 अग॰ 2023
प्रोजेक्ट स्थिति
आर्काइव

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

lan_scanner

pub.dev badge GitHub build status

Dart / Flutter package that allows discovering network devices in local network (LAN) via multi-threaded ICMP pings.

Note: This library is intended to be used on Class C networks.

pub.dev page | API reference

Getting Started

Add the package to your pubspec.yaml:

lan_scanner: ^4.0.0

Import the library:

import 'package:lan_scanner/lan_scanner.dart';

Create an instance of the class and call quickIcmpScanAsync() on it:

final scanner = LanScanner();

final List<Host> hosts = scanner.quickIcmpScanAsync('192.168.0');

There is also stream-based icmpScan() method available, which provides progress callback, but is much slower and resource hungry than other methods.

If you don't know what subnet to provide, you can use network_info_plus to get your local IP and then ipToCSubnet() function, which will conviently strip the last octet of the IP address:

// 192.168.0.1
var wifiIP = await NetworkInfo().getWifiIP()

// 192.168.0
var subnet = ipToCSubnet(wifiIP);

iOS compatibility

Due to the issue with Flutter platform channels (#119207), iOS platform is currently supported only when using the quickIcmpScanSync() method and requires additional steps:

Add dart_ping_ios to your pubspec.yaml:

dart_ping_ios: ^4.0.0

Call register() method before running your app:

void main() {
  DartPingIOS.register();

  runApp(const App());
}

Configuration

Warning:
In order to use this package, you may need to do additional configuration on some platforms.

Android:
Add the android.permission.INTERNET to your AndroidManifest.xml file:

<uses-permission android:name="android.permission.INTERNET" />

MacOS:
Add following key to DebugProfile.entitlements and Release.entitlements files:

<key>com.apple.security.network.client</key>
<true/>

Features, bugs and contributions

Feel free to contribute to this project.

Please file feature requests and bugs at the issue tracker.
If you fixed a bug or implemented a feature by yourself, feel free to send a pull request.

Sponsoring

I am working on my packages in my free time.

If this package is helping you, please consider buying me a coffee, so I can keep updating and maintaining this package.

Hubert Jóźwiak GitHub avatar
GitHub लेखक

Hubert Jóźwiak ↗

@intelPoland
भाषाएँDartC++CMakeRubySwiftCKotlinObjective-C

श्रेणियाँ

उपयोग की गई निर्भरताएँ

निर्भरता सूची 4 आइटम

अपने प्रोजेक्ट के लिए रिपॉज़िटरी कैसे चुनें?

उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।

  1. नाम, लेखक या विवरण से खोजें और तकनीकी विषय से परिणाम सीमित करें।
  2. स्टार, फ़ोर्क और हाल के पुश की तुलना करें। स्टार रुचि दर्शाते हैं, गुणवत्ता की गारंटी नहीं।
  3. उपयोग से पहले GitHub पर README, लाइसेंस और Issues जाँचें।

स्रोत और रखरखाव

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗