Starner / traceroute-for-android

traceroute for android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

traceroute-for-android Download

Easy way to use traceroute on Android.

Description

Traceroute tracks the route packets taken from an IP network on their way to a given host. It utilizes the IP protocol's time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to the host.

Rendering Image

images/1.png

Adding to project

dependencies {
    implementation 'com.wandroid:traceroute:<latest-version>'
}

Simple usage

synchronous way

val traceResult = TraceRoute.traceRoute("www.google.com")

asynchronous way

TraceRoute.setCallback {
    success { Log.d("tag", "\ntraceroute finish") }
    update { text -> Log.d("tag", text) }
    failed { code, reason -> Log.d("tag", """\ntraceroute failed.code:$code, reason:$reason""") }
}
TraceRoute.traceRoute("www.google.com", true)

Proguard

-keepclassmembers com.wandroid.traceroute.TraceRoute {
    void clearResult();
    void appendResult(***);
    int execute(***);
}

get executable file from traceroute-android-executable

About

traceroute for android

License:Apache License 2.0


Languages

Language:C 76.7%Language:Roff 9.9%Language:Shell 7.0%Language:Kotlin 4.3%Language:Makefile 1.7%Language:Java 0.6%