
Show HN: Flying Carpet – Ad-hoc wireless, cross-platform, encrypted file sharing - spieglt
https://github.com/spieglt/flyingcarpet
======
ekwogefee
Good. I tried it, and it works.

I've been in this space now for some years, running a similar product
([http://www.feem.io](http://www.feem.io)).

Just one observation.

The windows version of your code uses the HostedNetwork API to create an ad-
hoc wireless network. Microsoft deprecated the Hosted Network API in Windows
10, in favor of the new Wi-Fi Direct APIs. This means that Wi-Fi vendors don't
need to support the old HostedNetwork API, and Dell, Intel and Realtek have
all already ripped out support. Your code won't work on many modern Wi-Fi
cards for Windows. To fix this, you'll need to support the new Windows Wi-Fi
Direct APIs in future versions of your open source project.

Hope this helps.

~~~
spieglt
Thank you so much for trying it! You're my first tester outside of friends and
family, haha.

I wanted to use Wi-Fi Direct but Mac doesn't support it so that wasn't an
option unfortunately. I have a line about the deprecation in the Restrictions
section of the readme, with instructions on how to see if your card supports
hosted networks.

Do you know of any way to use Wi-Fi Direct on Mac? I've been trying to learn
more about how Airdrop works as I think they use a stripped-down version of it
but I haven't gotten very far yet. Thanks for the feedback.

Edit: Feem looks awesome! Will definitely give it a try when I'm around two
laptops again. So it requires a normal WiFi network if neither device supports
WiFi Direct then? And does it require a WiFi network for the devices to
discover each other, prior to setting up the WiFi Direct connection?

~~~
ekwogefee
AirDrop uses a combination of Bluetooth (for discovery) and Wi-Fi for file
transfers. AirDrop's software and hardware is so coupled together that you
couldn't use AirDrop on older Macs and iPads.

Feem doesn't use Bluetooth. It only needs a LAN (wireless or cable). Discovery
is initiated as soon as both devices are in the same Wi-Fi (LAN) network.
Doesn't matter how you obtain your LAN (router, mobile hotspot, Wi-Fi Direct
for devices that support it, ...). This approach helped us support as many
devices as possible.

For questions regarding Feem, you can find my email in my profile.

------
moreira
This is terrific. There have been several situations that I can think of where
being able to just transfer files across computers without the help of a
network would've made my life a lot easier.

The encryption is a nice side-benefit, but the real value is in the zero-
config transmission of files. Something like this ought to be built into every
modern OS, especially considering that most computers have wifi cards these
days.

~~~
spieglt
Thank you! That was my thought exactly: why did no one do this when all
laptops had wireless cards 15 years ago? And I was really motivated to have it
be a standalone binary with no installation so that it can be a convenient,
portable utility. Please let me know if you give it a try or have any other
feedback.

------
provost
I'm not familiar with Go, but was looking through the source code and saw
this:

    
    
      encrypted = secretbox.Seal(nonce[:], chunk, &nonce, &key)
    

Is secretbox [1] a standard Go library?

[1]
[https://godoc.org/golang.org/x/crypto/nacl/secretbox](https://godoc.org/golang.org/x/crypto/nacl/secretbox)

~~~
brigandish
NaCl is the library, secretbox is one of the methods. It's been implemented
into libraries for several languages, I'm currently using the Ruby one to make
an encrypted backup app that suits my needs. It makes using encryption
straightforward.

[http://nacl.cr.yp.to/](http://nacl.cr.yp.to/)

------
ivan_ah
How does this work? Would it be possible to do something similar on Linux?
Android?

~~~
spieglt
It uses a handful of built-in system commands on the respective platforms to
set up the ad hoc network, and then writes the file in encrypted chunks over a
TCP socket. It's totally possible to extend this to Linux, I just haven't
looked into doing so yet. Not sure whether I'll tackle that or a GUI first.

As for mobile, I'd love to do that as well, but I'm not sure how possible it
is. I believe it would have to use Wi-Fi Direct on Android, and I'm not sure
how much control you have over the network stack on iOS. I don't think either
supports ad hoc networking so it would be a pretty different program at that
point. But I don't have much experience with mobile development yet.

------
popey
This is rather neat. Sorry to be that guy, but any plans to support Linux too?

~~~
spieglt
No apology necessary, I'd love to support Linux but haven't looked into how to
configure the ad hoc networking or peer discovery on it yet. I don't think it
should be too hard but I likely won't have time to work on it much for the
next couple months.

------
kwhitefoot
Any chance of a Linux version?

~~~
spieglt
Yes! Please see responses to ivan_ah and popey.

