Rayfish, Peer-to-peer mesh VPN with no server to trust
rayfish.xyz
rayfish.xyz
But that would take understanding network fundamentals, architecture, etc. Who needs any of that cruft any longer?
So agree not serverless, but also does not NEED a coordination server (unless you class DNS as a coordination server which is debatable).
[1] https://docs.iroh.computer/concepts/address-lookup#endpoint-...
Yes, we did use claude, somewhat. We do give a lot of credit to iroh. Check the description of the repo.
As per the AI stuff, rayfish is a very old idea. I had a lot of sketches on how a p2p mesh VPN should look like. So it started off as "hey claude, can you do this?" and of course because I use it I have to do a lot of things manually myself.
But of course, without iroh this project would have not been possible!
If your users are savvy enough to be running random scripts they shouldn't need a script to do this and if they're not savvy enough to understand how to do that then the last thing they should be doing on earth is running a random terminal command off a website.
The correct way is to have M of N signatures on specific package manager pinned versions. And you trust the auditors to look at each new version, of a well-known package.
We should start a project and get it funded, to do just that. The money can go to LLM tokens for audits, at least, and hosting the multisigs and the package managers.
Anyone want to partner on this? See my profile on HN and email me.
Curl piped into a shell command provides no means to verify that the download is uncorrupted and unmodified before running it. For example, whenever I download software manually I check the downloaded file against the verified checksums to ensure that I have an unmodified version. Ideally I check this with gpg --verify on the signed checksum file (against the source's public key). This is a standard procedure for many organizations [1]. If you just download something and immediately run it without this step, you could potentially run a hacked version of the installation script.
SSL/TLS/HTTPS is more about encrypting the traffic and ensuring that there was no tampering with the file between you and the server. The steps that I describe are more about ensuring that there was no tampering between you and the original source. Those are two separate problems. If you just rely on HTTPS, somebody can replace the file on the server with a modified version, and you would not know.
It is also possible to have a signed file that you can use to check the authenticity of a downloaded file directly without having to use checksums. Rust [1] does it that way for its other installation methods.
[1] https://forge.rust-lang.org/infra/other-installation-methods...
But this is new software from someone no one trusts yet. Verifying the binary was not maliciously replaced by someone else doesn’t matter.
What we need here is a reproducible build made and published by an independent third-party.
Having a binary also allows for antivirus software to be ran on it before deciding to run the binary itself or not.
I am not sure if curl | sh bypass sandboxing by default, but definitely is the case when compared to flatpak or just regular packaging
An evil person could present a normal install script for other browsers and randomly present a malicious one for curl clients.
At least with the downloaded file, that is the thing you get.
By comparison, a curl|bash not only skips over my ability to do any of that but it also introduces two new potential paths to exploitation if a malicious user has control over the web server. There's the classic "hidden text that doesn't appear visually but will be in the copy/paste version" and the more complicated "server detection of manual download vs. curl|bash to deliver different content".
A curl|bash saves the "friction" of a `chmod +x` command and maybe an unzip/untar in exchange for introducing multiple different ways for malicious actions to be hidden.
Depending on third party packaging (distribution-validated install) is much higher friction.
What we are really missing is an explicit progression from new software to maintained packages across distribution. As it is, each distro expects each package to have a maintainer, and very few people actually want to do that across several distros just to release their software. Generally, the expectation is to instead just wait around for people to make and maintain those packages by virtue of their own interest in your software, but it takes a while, and discoverability isn't automatic.
Would you feel safer if they offered a .deb? Do you unpack and inspect every .deb you install?
A .deb file has many advantages over curl piped into a shell. You can check the contents before installation, you can potentially verify the authenticity of the .deb file, and dpkg makes it possible to uninstall the package later since it keeps track of what it installed in an organized manner.
I won't say that I would feel safer with a .deb file. That depends on the source, what the package does, and other factors. Security is about tradeoffs. I personally find the tradeoffs associated with a .deb file better than the tradeoffs of curl piped into a shell, but I myself do not install .deb files in the first place since I get almost everything that I need from package repositories.
Although really something like this you unproven you should compile it.
Now thanks to claude code etc it's been normalized that everyones doing it and normies who shouldn't be doing it are getting used to doing it.
It's completely insane our desktop OSes are holding highly private data like banking details with zero meaningful support for sand-boxing.
This whole problem would be a non-issue if we got proper auditing and management tools. If we could properly inspect our system's resources and see what sandbox has access to what and when and how and at what time, etc. I could draw a line around a "file" or "directory" and proclaim it to be off-limits to everything but "banking app" or whatever.
All the signature verification in the world won't protect my sensitive data from being raw-dogged by this Verified(TM) binary blob. I understand it solves a different problem, but to me all this "proper package management" is theater if the other side of the equation is not being handled with the same amount of attention.
Not defending the practice, I don’t like it. But the intent is to make it easier.
Commit history shows the project is a couple weeks old and the commit velocity only seems possible with heavy LLM involvement. Not unexpected but worth noting.
The repo's CLAUDE.md is huge which conflicts with published best practices around agent instructions and makes me wonder how much experience the author has using LLMs.
All that said, I'd like to use something like this for my personal devices since my personal and work Tailscale networks still can't run at the same time. But there aren't enough trust signals for me for this project yet.
That said, it is not my main focus, although I use the product of course. Contributions are always welcome.
I saw this: "As long as one node in the VPN allows incoming connections on a public IP address (even if it is a dynamic IP address), tinc will be able to do NAT traversal, allowing direct communication between peers."
And wondered if tailscale was doing a bit more magic than tinc is here?
Yes, tailscale, rayfish, zerotier and all use an existing network of relays to do nat traversal. Tinc doesn't provide that, but allows you to be completely independent if you get (or already have) a $5 VPS.
Interesting to see this built on Iroh.
However you could self host one of these on a public server you own. Then you're independent.
Saw Iroh post on HN. Just wonder how it differ from Nostr, Scuttlebutt or Yggdrasil or DHT etc? Many from Nostr claim that they are successor of scuttlebutt, but many devs from Scuttlebutt highly dispute that.
Be good to get a comparison between these protocols for devs who want to use them.
There's also "dynamic DNS", which is basically just caching one side of that server/relay/TUN/STUN handshake, and relying on DNS for global discovery.
For Iroh vs Scuttlebutt / DHT, I'll break that into two parts:
1) Iroh uses DHT for host discovery: https://docs.iroh.computer/about/faq#how-is-iroh-different-f... , and Iroh is more about "use that DHT to get a usually-direct connection globally and then you can do whatever you want", while Scuttlebutt is strictly "... and use that connection to exchange append-only logs via gossip, to implement the Scuttlebutt protocol". (Iroh does have some first-party protocols you can use, but it's lower level in general)
2) Scuttlebutt isn't DHT-based, it's "connect to a known IP to get its data and discover connections" -> "connect to them and repeat..." -> "connect further..." -> etc, plus limited-hop feed replication by default. There isn't a global lookup to connect to any member or retrieve any data, it's all friend-of-a-friend connections and you can (and do) lose connection to someone if they get a new IP address and there's no F-o-a-F(-o-a-F(...)) replication route from them that reaches you (rare in practice since they likely re-connected to people they follow, which eventually trickles data through the mesh similarly to before). This is also part of the reason that it works instantly when you're on the same network as someone - it's less "it can work locally if you don't have internet access" and more "local is just a discovery method, the internet isn't special at all because it's all just direct connections".
And as far as I understand Nostr, it's conceptually similar to Scuttlebutt, but with direct support for centralizing for performance (relays) and some degree of mutability / forgetfulness / etc. Scuttlebutt is a bit extreme about its logs being immutable and the only way to exchange data, and it's part of the reason it can have rather major perf issues (like needing to pull gigabytes of data before you can discover a feed's display name). (I say this as a fan of Scuttlebutt in principle, but not in practice - there are lots of practical issues with existing implementations that could be solved, but haven't, and it's a large part of why the ecosystem split into other protocols)
It may also be worth pointing out that DHTs also need stable hosts to serve as initial bootstrappers, and apps that use them tend to hard-code a web URL where they can get a small list of those nodes. They just use them to discover other nodes, and save them for next time so the bootstrappers aren't constantly needed.
Iroh doesn't use DHT as its main discovery mechanism. It uses DNS/pkarr and relays as the primary method. DHT is a separate feature if folks like to do that, we don't have it on by default and don't have it on the public relays.
The whole idea is p2p but trying to be realistic about what network environments actually look like.
Iroh is definitely near the top of my "play with it some time" list, that pragmatism is very important for building normal things that normal people will be using :)
Thanks for clarifying that. So does that mean Iroh still require a DNS server or domain name even though it doesn't rely on IP address?
I thought dial by key means the other party just need to be on internet and has the right key/pubic identifier then they can reached.
Where does the message resides if the other end is NOT online?
Not that I have anything against the software or company to be clear, just that I wish one of these p2p vpns would be _totally_ actually independent of any coordination server or central entity!
Presumably you could disable it and the VPN would continue to work, just not on CGNATs.
Anyway. Rayfish is p2p no central coordination needed. Other's do need some central coordinator. The main disadvantage one might find is that it uses iroh which is built on top of QUIC. Tailscale and others use wireguard, which is nice and compatible with legacy VPNs. Also they have a kernel driver which we dont. It's all userspace. I didn't want to reinvent the wheel.
Those days, rather that actual "vpn overlay", I use Tailscale myself mostly for the Tailscale Funnel - a somewhat stable, yet free arbitrary DNS and free reverse proxy termination of incoming data for anonymous users.
Postgres also has TLS + oauth2 support
> rather that actual "vpn overlay", I use Tailscale myself
I actually already had tailscale in mind when talking about "vpn overlays" :D
1. foss, p2p-only, no server or intermediate nodes to trust (rayfish)
2. foss, brokered if necessary with all nodes self-hosted (openziti, nebula, some wireguard variants)
3. non-foss, mix of p2p and brokered, host some of the nodes yourself (openvpn, myriad of wireguard variants/wrappers like tailscale, headscale, netbird, netmaker)
why is #3 so much more popular?
Sigh..
I like the project though. It looks very similar to something I vibed up recently, must be in the air
"Membership is a question they ask a server" is a bogus sentence. "membership" is not a "question". It's syntactically valid semantic nonsense.
"Membership is dictated by a server" is one of several human sentences saying what that one is trying to.
https://github.com/rayfish/rayfish/commit/c49816e6dfba19e91a...
If you dont like it dont use it
Also that sentence structure is very claudelike.
The core idea: every node has a keypair, and its identity on the network is that public key. From the key we derive a stable IPv4 in 100.64.0.0/10 and a stable IPv6 in 200::/7, similar in spirit to yggdrasil. Those addresses are yours for as long as you hold the key, and they don't change when you move networks or your physical IP changes. You still reach peers by IP or by a name.ray DNS name, the difference is that the address comes from the identity rather than from where you happen to be.
"No server to trust" is the part we care about most. There is no central control plane that brokers your traffic or holds the keys to your network. Peers find each other and connect directly over iroh's QUIC stack, with NAT traversal, hole punching, and relay fallback handled underneath. Relays, when used, only forward encrypted packets and never see your keys or decide who is in your network. Membership and trust live with the peers, not with us.
How it works in practice:
- Networks are closed by default. You join with a one-time invite, a reusable key for fleets of servers, or live approval from a member already inside. The room id is only for discovery, it is never an admission credential. - Any member can be granted the network key and act as a coordinator, so admitting new peers keeps working even if the original creator is offline. - There is a per-device firewall, directional and scoped by port and protocol, plus Magic DNS so you can reach nodes at name.ray (or just name, no need for the .ray suffix). - A "ray connect" flow links two people directly with no shared room, like a friend request between keys. - No ACLs. Networks are logical partitions. Firewall is per-host. You can combine both to have custom ACLs.
It is a single binary with a daemon and a CLI. `ray up`, then `ray create` or `ray join <invite>`, and you have a private network.
Honest limitations: it is early. The mesh protocol is gated at the transport layer, so we break compatibility between releases when we need to. There has been no third-party security audit yet. Mobile is not there. It runs on Linux and macOS today.
Code: https://github.com/rayfish/rayfish
Happy to get into the addressing scheme, the iroh transport, the admission and coordinator model, or anything else.
With only 22 bits of entropy in your v4 addresses, you'll get accidental collisions with only ~2000 users.
The collision_index is incremented when a collision happens on a network. Let's say you join network A, B, C. But when you join C, another peer has the same IP. The coordinator (which is a role anybody can have in the network) will not accept you in the network unless you change your IP. Which means you need to increase your collision index. Now that process is repeated N times until you don't collide with any other peer.
(I really hope "private key" was a typo of "public key"?)
NO. You will ONLY have to rotate your IP if you join a network in which there is a collision. 1 in 4 million chance. If that happens, it's ok. Ideally you are using magicDNS and don't have to worry about IPs or just use the IPv6.
To not care who you are would mean not only having to review the current code as is, but to review every update that follows as possibly written by a hostile party. Ie, the time invested would be several times of that invested in something written by a more trusted party.
In terms of the credentials; again, it is not a product like Bitcoin. I am not a researcher from some university. I don't even have a computer science degree. So I don't oblige to "credentials".
I am an entrepreneur, I had some ideas. One of those ideas is rayfish. I like to give back to groups or people. I live in a country where I pay no taxes so I can donate part of that to cat shelters from my homecountry and in this case I open-sourced rayfish because I think it is a good product many people like me will enjoy.
Does that reply to your concerns?
Trust at two levels: who are you? What HFT firm do you run? How do we know you are actually this HFT leader? What are you doing in the HFT firm that lends credibility to build a project like this? I.e. if you lead the sales team, and have no software dev background, it doesn't increase trust in this project. If you built all the software for the HFT firm, that matters.
Since it's security related, we want there to be signals in the project that we can trust it to not start sending all our data to some bad actor state or org.
Then there is trust at the code level... Does it work? Will it continue to work?
You built it in two weeks because, for the last four years, you were busy with other things. If you get busy again, will the project lag for the next four years?
You don't owe us any of these answers. It's OSS, engage at whatever level you want. But, understand that when you publish your efforts to a place like HN, we are going to find and mention the things that make us uncomfortable.
That said, it's a good sign that people are pushing back. It is a cool project and fits a real need. So if you can increase the trust signals in the project, I think you will get more users... If you really want them. More users means more critique. :)
I hope you do make an effort to increase the trust signals and keep working on the project because I'd like to use it.
But anyways, first of all; you can see we run a trading company called Infinite Field (https://github.com/infinitefield) and we trade on a decentralized venue called Hyperliquid. You can check the leaderboard there, we are in the top 15 or so. We are doing more than just trading there, we also run a validator with 0 revenue on our side. We charge no fees. Although maintenance cost is high (20k/month). We also built an SDK for users building in Hyperliquid because the official one was not good enough (https://github.com/infinitefield/hypersdk). No other market maker is going to do that. Mostly. Also, I built and released our in-house websocket library (https://github.com/infinitefield/yawc) because I consider it to be better than tokio-websockets or tungstenite. Why is it better? It supports compression (which no other does) and WASM (that one was pre-LLMs so code is mine alone hehe).
> You built it in two weeks because, for the last four years, you were busy with other things. If you get busy again, will the project lag for the next four years?
I am always busy. But I want to deliver a minimum set of features that will work without me. You can see the open issues and PRs. All of the work is being made transparently on Github. I also use the product myself and I hope I can use it internally at my company too. If you want to reach out to me you can do it over email or telegram (ask for it) and I am 24/7 online. When I say the idea was sitting idle for 4 years; it basically means I was a guy from a town in Spain and I had to do something to get out of there. Although I contributed a lot to opensource when I was younger (check https://github.com/dgrr) it didn't pay the bills! So it took me 4 years to reach a level in which I feel comfortable dedicating some time to opensource stuff like hypersdk, yawc or now rayfish (actually more than 4 years, but rayfish was there for that amount of time).
I am very transparent. I'll open up my X account so you can engage more directly with me if you want.
> Happy to get into the addressing scheme
I truly loathe how all of the HN spambots promoting shovelware include a stupid call-to-action for feedback/discussion.
No reply to various questions an hour later. I guess they're not really watching.
im also afraid of exploits disseminating from a mesh network it would be impossible to stop
great work