
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
github.com/datahop/p2p-connection-wifidirect
This library implements a Device-to-Device (D2D) connectivity solution for Android devices used by the DataHop Network platform. DataHop is a new platform aimed at exploring the potential of a user-operated, smartphone-centric content distribution model for user applications in contrast with the traditional client-server model, that is used by the majority of mobile data transfers today. In particular, we propose that some nodes, either fetching the content via Internet from the content provider (e.g., BBC, CNN), or via sharing user-generated content, could directly update and share content with other nodes in the vicinity in a D2D manner without requiring Internet connectivity. We leverage on sophisticated information-aware and application-centric connectivity techniques to distribute content between mobile devices in densely-populated urban environments or rural areas where Internet connectivity is poor.
WiFi Direct provides all the features required to provide smart connectivity between users and transfer content without infrastructure participation. However current Android WiFi Direct Android implementation still has one drawback: it requires user participation to accept every connection. In order to require any user participation allowing DataHop to run in the background, seamlessly to users, this library uses a hybrid mode according to which source devices create a WiFi Direct network using the previously described WiFi Direct Autonomous Mode and destination devices connect to it as a normal WiFi connection (legacy connection).
This library implements the native library for Android of the WiFi Direct specification to exchange application content updates. This library is compatible with Go and the IPFS-lite library created in https://github.com/datahop/ipfs-lite.
The library can be built manually using the following command:
$ ./gradlew wifidirect:assembleRelease
and copy the generated .aar library into the app/libs
folder of your app.
Note: It requires Datahop Ipfs-lite aar in the libs folder to compile.
To add the library in your Android project first add the libs folder in your repositories list of the project build.gradle
file,
allprojects {
repositories {
....
flatDir {
dirs 'libs'
}
}
}
and then add the library as a depencency of your project in the app build.gradle
file.
dependencies {
....
implementation(name: 'wifidirect-release', ext: 'aar')
}
The library can be also automatically imported via gradle: TBC
The library is basically implementing two functionalities, the WifiDirectHotspot
that will create the Wifi-Direct group and will accept incoming connections from other users, and the WifiLink
, that will connect to other users that previously created a Wifi-Direct group. The two can be created and used following the next instructions:
//Both instances must be created
WifiDirectHotSpot hotspot = WifiDirectHotSpot.getInstance(getApplicationContext());
WifiLink connection = WifiLink.getInstance(getApplicationContext());
//A notifier should be passed into the instance. These notifiers can be implemented in Go and must implement WifiConnection and WifiHotspot interfaces defined in github.com/datahop/mobile
hotspot.setNotifier(hsnotifier);
connection.setNotifier(cnnotifier);
WifiDirectHotspot
and WifiDirectHotspot
can be direclty handled from Go passing it to the Go app like the following
Datahop.init(getApplicationContext().getCacheDir() + "/" + root, this, bleDiscoveryDriver, bleAdvertisingDriver, (WifiHotspot)hotspot,(WifiConnection)connection);
Start and stop hotspot
hop.hotspot.Start()
hop.hotspot.Stop()
Wifi link connect and disconnect
hop.wifiCon.Connect(network,pass,address)
hop.wifiCon.Disconnect()
https://github.com/datahop/datahop-android-demo
Please read and follow the steps in CONTRIBUTING.md
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This software is part of the NGI Pointer project "Incentivised Content Dissemination at the Network Edge" that has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 871528
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.