Git Product home page Git Product logo

cli's Introduction

NearShare Cli

This repo contains a cross-platform command-line application that can be used to share files and urls between devices using the Windows 10+ built-in sharing functionality (Aka Project Rome).

Tip

Download the Android App!

Warning

Currently only sending via Tcp (Local Network) is supported!

Building

This project consists of a .NET 8 console application.
You can use the dotnet cli to build and run the app:

dotnet run

cli's People

Contributors

shortdevelopment avatar

Stargazers

Sammy Guergachi avatar SavvyJC avatar Misaka_L avatar  avatar illdephyn3d avatar  avatar Parham Mohammadi avatar Daniel Campbell avatar  avatar Moheshwar Amarnath Biswas avatar Julian Hasreiter avatar Grandiras avatar Media Explorer avatar

Watchers

 avatar

Forkers

nonomal jasonc761

cli's Issues

Windows `Udp` Discovery on `NearShare` send

Issue

Although supported by the RemoteSystemWatcher, the Windows Nearby-Sharing implementation does not send PresenceRequest messages via Udp to discover devices on the local network.
Only scanning for Ble-Beacons guarantees spacial-proximity but excludes devices that cannot advertise Ble-Beacons with custom ManufacturingData like MacOs from receiving (See #1 (comment)).

Context

The scanning for devices happens in Windows.Internal.ShellCommon.ShareExperience.dll

void lambda_39d726f72da8464f6b354668a4acec0b_() {
   RemoteSystemDiscoveryTypeFilter filter1;
   if (Feature<SEBTTest>::IsEnabled) {
      filter1 = new(RemoteSystemDiscoveryType.SpatiallyProximal); // Ble scanning
   } else {
      filter1 = new(RemoteSystemDiscoveryType.Proximal); // Includes everything (i.e. Udp) except Cloud
   }
   ...
}

Windows hits the first path (RemoteSystemDiscoveryType.SpatiallyProximal) by default.

Solution 1

We could create a seperate app using ...

  • the RemoteSystemWatcher with RemoteSystemDiscoveryType.Proximal and the internal ShareSenderBroker from cdprt.dll to invoke the nearshare transfer.
  • our custom implementation ignoring the built-in implementation.

Solution 2

We could try to disable the feature SEBTTEST (might be 0x29DDC94) via mach2.

Caution

This might break something and I did not had success in doing so!

Solution 3

Hope that Microsoft implements a switch to allow discovery of non-spatially-proximal devices on the whole network.


@sidevesh

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.