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

Add support for Android. And an Android app example. #14

Merged
merged 5 commits into from Jun 13, 2018
Merged

Add support for Android. And an Android app example. #14

merged 5 commits into from Jun 13, 2018

Conversation

switch-st
Copy link
Contributor

This pull request include the support code for Android, and an Android app example. People can develop their own apps by calling the code in the android directory.

Code tree

├── edge_android.c      =>      start/stop edge functions
├── edge_android.h
├── edge_jni.c               =>      jni functions
├── Hin2n                      =>      The app example. The last stable version of hin2n(v0.5.2).
├── tuntap_android.c     =>      Read and write tun virtual network card. Simulate layer 2 and ARP protocol.
├── tun2tap                    =>      Configuration of libuip.
│   ├── tun2tap_appdef.h
│   ├── tun2tap.c
│   ├── tun2tap.h
│   └── uip-conf.h
└── uip                           =>      A very small implementation of the TCP/IP stack.
      ├── README
      ├── uip-1.0-changelog.txt
      ├── apps
      ├── lib
      ├── uip                      =>      libuip code
      ├── unix

Technical principle

  • VPNService

Hin2n is based on Android's native VPNService. It builds a tun virtual network card through VPNService and communicates with supernode and edges.

  • tun2tap

Android only supports tun virtual network card, only support network layer, and n2n requires tap virtual network card, which needs data link layer support. So we simulated the data link layer and ARP protocol.

  • n2n protocol

Hin2n supports the n2n protocol by using the native method of jni to reuse the code of the original n2n project as far as possible.

@lucaderi lucaderi merged commit 18cd80e into ntop:master Jun 13, 2018
@lucaderi
Copy link
Member

Thank you

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.

None yet

2 participants