Readit News logoReadit News
minhmeoke commented on LocalSend: Open-source, cross-platform file sharing to nearby devices   localsend.org... · Posted by u/alexzeitler
MasterYoda · a year ago
Does anyone knows if it is possible to send folders (includings subfolders) or is just files?

Have been looking for a simple way to share files between pc and android wireless but not via internet, but seems it always is just file/s you could transfer, not folders with everything in them.

If LocalSend is the same and can only transfer selected file/s, have anyone any tips on a alternative app that do the same but also with folders?

minhmeoke · a year ago
If you can install software on the computer and have an Android 11 or newer phone, one way is to use the adb tool from android sdk tools to create a connection over the local wifi network which you can adb push folders over.

# Initial Setup

1. Install Android Platform Tools from: https://developer.android.com/tools/releases/platform-tools#... and verify that you can execute the adb tool.

2. Connect the Android device and the computer to the same Wi-Fi network

3. Also connect the Android device to the computer via USB cable (just for this initial setup)

4. Pair the phone with the computer and enable Wireless debugging as described here: https://developer.android.com/tools/adb#connect-to-a-device-...

# Subsequent usage (does not require USB cable):

5. Toggle the Wireless Debugging quick setting toggle to enable adb connections from your computer to your phone

6. Retrieve the Android device's IP address in Settings → About → Status.

7. On the computer command line type: adb connect ip-address-of-device:5555

8. Push the folder to the Android device: adb push /path/to/folder/to/copy/on/computer /sdcard/path/to/destination/on/android/device

minhmeoke commented on LocalSend: Open-source, cross-platform file sharing to nearby devices   localsend.org... · Posted by u/alexzeitler
brucethemoose2 · a year ago
Is there an equivalent of this with an http front end, so the client doesn't need to install anything?

I have used such apps before, but it seems they have gone unmaintained and don't work anymore.

minhmeoke · a year ago
One option is https://github.com/akovacs/uploadserver - it's basically a nicer version of:

    python -m http.server 8000
You first start one server on a desktop/laptop which has the software, and then any client (Android, iOS, PlayStation, Kindle, etc) with a web browser (no need to install any client software) can upload or download files from the web GUI.

You can download prebuilt binaries for x86-64 Linux, Windows, or Mac OS (sorry, no prebuilt binaries for Apple Silicon, but they could be added if there is sufficient demand) from https://github.com/akovacs/uploadserver/releases/ or compile from source using a nightly rust toolchain if you prefer.

Compared to cloud services or `python -m http.server 8000`, this is extremely fast since the server is written in rust, it is fairly simple (compiled and stripped binary is typically less than 3MB), it sends everything over local LAN, it seems to handle large files (over 4GB) fairly well, and you only need to install the software on one machine.

For additional details, please see: https://news.ycombinator.com/item?id=39665095

minhmeoke commented on LocalSend: Open-source, cross-platform file sharing to nearby devices   localsend.org... · Posted by u/alexzeitler
api · a year ago
It’s 2024. There is still no good generally available way to send files between systems on the same LAN, let alone over the Internet.

These kinds of blind spots exist because not only is there no money in solving them (and open solutions are too hard to use as usual) but in this case there is money in not solving them. A great simple ubiquitous solution would reduce demand for large complicated cloud storage systems that allow cloud data mining of all your files and/or require subscriptions.

minhmeoke · a year ago
A useful utility for sharing (upload and download) files over a local LAN that a friend wrote is https://github.com/akovacs/uploadserver - it's basically a nicer version of:

    python -m http.server 8000
You first start one server on a desktop/laptop which has the software, and then any client (Android, iOS, PlayStation, Kindle, etc) with a web browser (no need to install any client software) can upload or download files from it.

You can download prebuilt binaries for x86-64 Linux, Windows 7 or higher, or Mac OS 10.7 Lion or higher (sorry, no prebuilt binaries for Apple Silicon, but they could be added if there is sufficient demand) from https://github.com/akovacs/uploadserver/releases/ or compile from source using a nightly rust toolchain if you prefer.

Start the file server on a desktop machine:

    chmod +x upload_server
    ./upload_server
Determine your machine's IP address using:

    # Linux
    hostname -I

    # Mac
    ifconfig

    # Windows
    ipconfig

Navigate to the server's ip address port 8000 (indicated by the hostname -I command you ran earlier) in the web browser of your choice on any device (no need to download or install any client applications) and upload files using the web UI or directly via curl:

    curl -X POST --data-binary @file_to_upload.txt http://192.168.1.X:8000/uploaded_file.txt
Then download the file to another machine or mobile device either from the web GUI or via a commandline tool:

    curl http://192.168.1.X:8000/uploads/uploaded_file.txt --output downloaded_file.txt
If you don't have a local network, you can setup an adhoc hotspot on any Android 9+ (Settings > Network & internet > Hotspot & tethering https://support.google.com/android/answer/9059108) or iPhone (Settings > Personal Hotspot), then connect to it using any WiFi-enabled device.

Compared to cloud services or `python -m http.server 8000`, this is extremely fast since the server is written in rust, it is fairly simple (compiled and stripped binary is typically less than 3MB), it sends everything over local LAN, it seems to handle large files (over 4GB) fairly well, and you only need to install the software on one machine.

minhmeoke commented on Inkscape Cloud Architect   github.com/mipmip/inkscap... · Posted by u/mipselaer
jillesvangurp · 2 years ago
Depends on the target audience. Mostly the audience is hand wavy types that just want to point at a beautiful thing in a slide to point out "we have stuff with icons that you might know! Look at how beautiful this is. It almost looks like we know what we are doing!". Exaggerating here but anything that fits on a single slide is completely useless to an expert. Not worth drawing unless the goal is to impress non experts like that. It's a marketing tool in that case. The level of detail required for this is "a power point slide".

In companies/organizations that are large enough you always get a certain amount of project bureaucracy, ass coverage, and other documentation that doesn't technically do anything more than impress easily impressible types. But it's rarely actually useful. I usually just go straight to the code repositories and ignore things like wikis and other crap. Complete waste of time usually. Show me what you really have. I'll figure it out in no time.

Two mistakes people make with these tools:

1. Spending lots of time using them believing that the output is actually useful/valuable to engineers. Your time is more valuable. You should be doing more productive things. Minimize time you spend on drawing pretty pictures. They didn't hire you for your graphical design skills. This is of course subjective and context dependent. Sometimes it's just required to have diagrams. E.g. operations people like having good documentation just as a way to ensure that they can follow strict processes and make good decisions as to what is in their scope and what needs escalating. There's also a certain amount of impressing the customer, senior management, or other stake holders that "we have stuff". The bigger the company, the bigger the need for project bureaucracy like this. But it is bureaucracy and you want to be efficient with it. Quick and easy.

2. Believing that these are design tools. They are not. They are documentation tools. You use them after you build the thing. Before you build the thing, you use something like a white board. Or pen and paper. A napkin. Anything fast and easy that doesn't slow you down. It's transient stuff and when you start building the thing you'll realize half a dozen topics you did not take into account. So, other than as a record of all the design mistakes you are making, such diagrams have no long term value. You document the solution after you found, solved, implemented, and tested all the design problems. Not before.

Friendly reminder that the places where you are least likely to find diagrams:

- Any kind of large open source project. Or any open source project really. Just not a thing. The bigger and more complicated they are, the less likely it is to have diagrams. Reason: they are redundant and absolutely nobody volunteers to sit down and do them. Just ask yourself: "what would Linus Torvalds say when asked to provide diagrams for the linux kernel". I imagine a fair bit of cursing would happen.

- Especially open source projects that are about producing diagram tools. I personally find this highly ironic. People won't eat their own dog food when the dog food is diagramming tools. Diagramming tools are something you build for others to use. Go look for it on Github if you don't believe it. All you will find is toy examples but nothing actually documenting these tools in any level of detail.

- Small startups or other companies that are highly innovative and have a fast pace of change happening all the time. Reason: people have better things to do than mess around with diagrams. The rainy afternoon where you really have nothing more valuable than messing around with boxes and arrows to do never really happen.

Where do you find people messing around with diagrams? Bloated engineering teams in corporate situations. The more boring the company, the more useless types they employ, the more diagrams you will find. People insisting to each other that "somebody" (not them) should do a diagram. I usually just bounce the question when it comes up. "Great idea, when can you have it done?" Usually the implied suggestion is that I should sit down and waste my time doing a diagram for them that they will never even look at for more than a few seconds. It's write only documentation.

minhmeoke · 2 years ago
I would have to disagree. If you have a larger system, then onboarding, design discussions, and communicating changes will be more efficient if you have a consistent language and up-to-date conceptual understanding of the system compared to having to perform code archaeology and reverse-engineer the previous maintainer's intent each time you want to change something.

https://www.unravelled.dev/how-architecture-diagrams-enable-...

https://news.ycombinator.com/item?id=37222855

minhmeoke commented on Inkscape Cloud Architect   github.com/mipmip/inkscap... · Posted by u/mipselaer
pragmatic · 2 years ago
https://d2lang.com/

This lets you produce diagrams with code.

minhmeoke · 2 years ago
Very cool, thank you! Creating diagrams using code rather than using drag-and-drop tools might be a good idea for more complex architectures as described here: https://www.ilograph.com/blog/posts/its-time-to-drop-drag-an...

- Can check the textual description of the diagram into version control and track how it changes over time

- Can easily diff 2 versions of the same diagram

- Adding elements to a large existing diagram using WYSIWYG tools can be tricky (eg: you may have to move or reroute existing elements to make enough space)

Another cool idea is to create multiperspective diagrams with different views for different purposes (eg: code structure, deployment, network architecture, security):

- Clarity. By breaking up diagrams into perspectives, diagram authors can bring much more clarity to a system. Individual concerns can be spread out over many perspectives, allowing each the space it needs without interfering with others.

- Extensibility. Multiperspective diagrams share a model, so creating additional perspectives from an existing diagram is incredibly easy, far easier than starting from scratch each time.

- Maintainability. A corollary to the above, individual perspectives can be modified without affecting the others. Diagrams that are easy to maintain get maintained, while diagrams that aren’t fall out of date quickly. Multiperspective diagrams greatly help in the fight to keep documentation up-to-date.

This is a cool demo: https://app.ilograph.com/demo.ilograph.Stack%2520Overflow%25...

For other textual diagramming tools and ideas, please see this thread: https://news.ycombinator.com/item?id=37222855

Disclaimer: I'm not affiliated with Ilograph, just stumbled onto their blog and I think they have a lot of cool ideas.

minhmeoke commented on Localsend: Open-Source Airdrop Alternative   github.com/localsend/loca... · Posted by u/meatjuice
jauntywundrkind · 2 years ago
> with nearby devices over your local network

Still hoping for some alternatives that can do ad-hoc communication, without any network infrastructure.

Wifi got a bunch of ambient discovery capabilities a bit back that seems exactly targeted to this stuff. Neighbor Awareness Networking, or WiFi Aware for the trademarked industry packaging there-of. It was built into Android 8. There's also even older wifi-p2p/wifi direct (again, spec vs industry branding for the same thing).

I haven't looked in a bit, but I'd love to see a Linux based toolkit around this, that interops with Android, but isn't so handcuffed down by Google.

Google - like Apple - has some ultra proprietary tied-to-your account peer-to-peer stuff. There's Nearby Connections for app devs, such as for AR games. There's Nearby Share for file sharing, which I hear might maybe be getting a Windows implementation but again seems locked down. I want so bad to see some drive forward on the transport layer, & we have so much to go with. Its a solid bet hostapd technically supports all these capabilities (it just does everything under the sun in wifi best I can tell), but we haven't harnessed this source.

minhmeoke · 2 years ago
If you don't have a network connection, you can setup an adhoc hotspot on any Android 9+ (Settings > Network & internet > Hotspot & tethering https://support.google.com/android/answer/9059108) or iPhone (Settings > Personal Hotspot), then connect to it using any WiFi-enabled device.

A useful filesharing utility that a friend wrote is https://github.com/akovacs/uploadserver - it's basically a nicer version of:

    python -m http.server 8000
Download prebuilt binaries for Linux, Windows, Mac OS from https://github.com/akovacs/uploadserver/releases/ or install from source if you prefer

Determine your machine's IP address using:

    # Linux
    hostname -I

    # Mac
    ifconfig

    # Windows
    ipconfig
Start the file server, and then navigate to it using the web browser of your choice on any device connected to the WiFi network (no need for a client application).

    chmod +x upload_server
    ./upload_server
Navigate to the server's ip address (indicated by the hostname -I command you ran earlier) port 8000 in the browser of your choice and upload files using the web UI or directly via curl:

    curl -X POST --data-binary @file_to_upload.txt http://192.168.1.X:8000/uploaded_file.txt
Then download the file to another machine or mobile device either from your web browser or via a commandline tool:

    curl http://192.168.1.X:8000/uploads/uploaded_file.txt --output downloaded_file.txt

minhmeoke commented on Croc: Easily and securely send things from one computer to another   github.com/schollz/croc... · Posted by u/tentacleuno
dheera · 2 years ago
I wish there was an easier way to send things to/from a phone. I use a 1-person slack channel for this because I can't find a simpler way.

Google Drive and Dropbox are both awful mobile clients.

minhmeoke · 2 years ago
The problem with email attachments is that they only support files up to around 25MB, while slack has a 1GB attachment limit, and if you have a slow uplink to the cloud, it could take a while to upload the file.

A friend wrote a faster and more sophisticated version of `python -m http.server 8000` in rust which also supports uploads, you can read about here: https://news.ycombinator.com/item?id=37628347

File transfers are performed over the local network, and therefore should be very fast. If you don't have a network connection, you can just enable a Wifi hotspot on your mobile device and transfer the files over that. There is no need to install any software on the mobile device, you can just use a web browser to browse to a directory that you share over the network.

minhmeoke commented on Croc: Easily and securely send things from one computer to another   github.com/schollz/croc... · Posted by u/tentacleuno
Gabrys1 · 2 years ago
Used to be "put it on a USB stick". Now no-one carries those so email/google drive it is :-)

When sharing files between devices I own (including my mobile phones) I attach them to a draft email to myself, then get them from the drafts on the other device.

minhmeoke · 2 years ago
The problem with email attachments is that it only supports files up to around 25MB, and if you have a slow uplink to the cloud, it could take a while.

A friend wrote a faster and more sophisticated version of `python -m http.server 8000` in rust which also supports uploads, you can read about here: https://news.ycombinator.com/item?id=37628347 File transfers are over the local network, and therefore should be very fast.

minhmeoke commented on Croc: Easily and securely send things from one computer to another   github.com/schollz/croc... · Posted by u/tentacleuno
Zetobal · 2 years ago
I like croc, wormhole, snapdrop and whatever else there is I just don't get that there is no universal convenient standard for transferring files from one device to another over a wired/wireless connection. Mindboggling that most people use cloud hosting or email to transfer a file from one device to another when they are just 30cm from each other.
minhmeoke · 2 years ago
Just start the server using:

    python -m http.server 8000
to share a directory over a local network. Then you can point a web browser on another device to port 8000 of the server's IP address to download files. However, this can be slow for larger files.

A friend wrote a faster and more sophisticated version of `python -m http.server 8000` in rust which also supports uploads, you can read about here: https://news.ycombinator.com/item?id=37628347

minhmeoke commented on Croc: Easily and securely send things from one computer to another   github.com/schollz/croc... · Posted by u/tentacleuno
jcynix · 2 years ago
I agree that a secure way to transfer files between systems is a must. If two systems are at the same location, a small USB card reader (nowadays easily OTG capable) and an SD card allow me to transfer data.

For systems connected only by a network: maybe I don't see the advantages of these tools (which I have to install first on any client) as all systems I use already provide ssh and rsync to do secure file transfers. Even my Android devices are capable of using ssh/sshd and rsync via the Termux app, so to transfer files between them and a Linux or Mac laptop is easy.

OK, one user has to be proficient in enabling ssh/sshd if needed, but to install software such as the one discussed here, that's no difference.

minhmeoke · 2 years ago
It would be even better if you didn't have to install any client software at all on the downloading devices, exchange ssh keys, or pass around a password to an account on your system in order to transfer files around your local network.

A useful utility that a friend wrote is https://github.com/akovacs/uploadserver - it's basically a nicer version of:

    python -m http.server 8000
Download prebuilt binaries for Linux, Windows, Mac OS from https://github.com/akovacs/uploadserver/releases/ or install from source if you prefer [1]

Start the file server, and then navigate to it using the web browser of your choice on any device (no need for a client application).

    chmod +x upload_server
    ./upload_server
Navigate to the server's ip address port 8000 in the browser of your choice and upload files using the web UI or directly via curl:

    curl -X POST --data-binary @file_to_upload.txt http://192.168.1.X:8000/uploaded_file.txt
Then download the file to another machine or mobile device either from your web browser or via a commandline tool:

    curl http://192.168.1.X:8000/uploads/uploaded_file.txt --output downloaded_file.txt

[1] Steps for installing from source code:

    # install rust toolchain
    sudo apt install rustc git
    curl https://sh.rustup.rs -sSf | sh
    rustup install nightly
    rustup default nightly
    git clone https://github.com/akovacs/uploadserver
    cd uploadserver
    cargo run --release

u/minhmeoke

KarmaCake day176August 16, 2011View Original