[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: logo.png (26 KB, 550x550)
26 KB
26 KB PNG
Over the past month or two, I've been working full-time on a P2P filesharing system call FriendNet, aimed at small- to medium-sized groups.

FriendNet is self-hostable, open source file sharing for friends, like a mini-Soulseek. Unlike Soulseek and other P2P networks, port forwarding is optional!
<You can host a private room for your friends or group to share folders on their computers, create profiles, and search files.
>For those familiar with BitTorrent, hosting your own FriendNet server can be compared to owning a private tracker.

Website: friendnet.org

I just completed the very first version last night, but more features like a resumable download manager (like soulseek has) and simple private messages are forthcoming.

The server and client are written in Go with no libc dependency, meaning that the executables are incredibly portable and will run on just about anything.

The client uses a web UI, which while not ideal for some, is done for pragmatic reasons. Using a web UI prevents the need for more external linking dependencies and makes it possible to run the client headless on a server and remote control it. All client and server interfaces are based on gRPC, making them easy to automate with scripts.

Let me know what you guys think.
>>
this looks surprisingly good but i dont have anyone to test it with

is it basically just bittorrent under the hood?
>>
>>108342401
It uses a custom protocol based on protobuf and QUIC. You can read the protocol spec in the git repo, I've tried to document it as thoroughly as I can.

Conceptually, the system is very similar to Soulseek or Direct Connect.
>>
>for friends
gay
>>
>no port-forwarding needed
How did you do it?
>>
>>108342463
If a p2p connection cannot be established (which is the case if neither party has an open port), it falls back to proxying via the server. That's part of why the design is based around private groups, it mitigates the risk and cost of the proxying model.
>>
>>108342418
>>sees something for friends
>>has no friends
>>triggered
>ha! this is so gay!
>>
File: IMG_2017.jpg (15 KB, 480x360)
15 KB
15 KB JPG
>tfw thought it was like SoulSeek but for finding friends
>>
>>108342490
that's just the nicotine+ main chat bro. I met some crazy people that way
>>
>>108342481
>(You) have an opinion
>I have one too
>>
File: search.png (1.09 MB, 3004x1936)
1.09 MB
1.09 MB PNG
>>108342335
I forgot to include a screenshot
>>
>>108342503
tfw mine is right while yours is wrong.
>>
File: 4ewifoeni.jpg (63 KB, 1080x340)
63 KB
63 KB JPG
>>108342508
ok you win, YAY FRIENDS !:^)
>>
This is fucking cool.
>>
Are you hosting the code anywhere or taking contributions? I have zero use case for this but I’d like to (vibe code) a CLI interface
>>
someone post a server
>>
>>108342335
whats the difference between this and DC++?
i already got 9000 peers there to chat and share files
>>
>>108342625
The GitHub link is on the website. If you don't use GitHub, you can email me patches. My contact is on the GitHub profile.

>>108342746
The main difference is that FriendNet can fall back to proxying through the server if peers cannot establish a direct connection. That was the common hitch with most of the programs I tried to use; they all required at least one of the parties with an open port. I never had access to a home ISP that let me port forward, and doing it through VPNs was always a huge hassle.
>>
more like FedNet
>>
>>108342335
>posts filesharing system
>doesn't post a server to connect to
>>
>>108342783
I partnered with the CIA just to spy on schizophrenics, but nobody else

>>108342789
If you've got a group online that would enjoy the software, you should set up a server for it.

Making a public server currently isn't something that can be done easily, since accounts have to be made by the server admin manually. That's by design, to minimize risks for server admins.

From the readme:

> The intention is not to replace public networks like Soulseek, but to provide an easy-to-use p2p-style file sharing system for small groups of people without the hassle that normally comes with such systems.
>>
>>108342335
>The server and client are written in Go
Based and White
>>
>>108342803
potential feature idea, being able to download without an account
>>
>>108342335
looks promising. I will be trying it out on my home server.
>>
>>108342335
For a second I thought the title was Fidonet and got excited
>>
>>108342862
>potential feature idea, being able to download without an account
Interesting idea. I thought about having a mode where the server could optionally list and index files over plain HTTP, but I like your idea of optional anonymous access with a normal client better

>>108342971
Let me know if you have any feedback. My email is on my GitHub and I read all issues that people open.
>>
File: 1584201664514.jpg (101 KB, 513x499)
101 KB
101 KB JPG
>>108342803
>I partnered with the CIA just to spy on schizophrenics, but nobody else
I also do that.
>>
>>108342335
very cool, OP
I’ve been looking into hosting something like this as a permanent solution for sending large files to friends with shitty internet connections. Might try to host this
>>
>>108342473
why not just use STUN ?
>>
>>108342335
smells like slop, not touching that security nightmare
>>
Is it completely free/libre?
>>
>>108342746
This is first time i hear about DC++ amd im 27, soon 28
it appears to be actually used

funny i found about it in some FriendNet thread

why is software like this not mentioned anywhere
>>
I would love to invest time into getting a docker container set up for this and hosting the first public instance, but I always remember 15 years ago when I watched some poor sap's entire server get leaked and erased when he just wanted to share his music collection to /g/ through an FTP server. Dude seemed legit friendly and you people fucked him hard.
>>
>>108345238
most people haven't used it in decades
>>
>>108345368
not /g/ 15 years ago's fault that the guy had bad security
>>
>>108342782
>allows vibecoded contributions
dropped
>>
>>108342335
Because it's for private butt buddies it won't succeed. If friends want to share files they could just use simple scp or even ftp.
>>
Hey you're the copy party dev right?
>>
>>108346160
they wouldn't even do that, they'd just stick it up on a filesharing site
>>
>>108342335
Will this be a /g/ approved tool, just like catbox?
>>
>>108345368
Feel free. The Docker setup guide is in the docs. If you make one, I'll join it.
>>
>>108342335
virus
>>
>>108346199
No, but I really admire the work of that developer.

>>108346330
It's not a public tool like catbox, but I hope /g/ will make use of it and enjoy it.
>>
>>108345095
Sorry, forgot to reply to this earlier.

STUN is a separate component and I don't like having to run a bunch of different services just to run a server. The protocol itself includes proxying capabilities for simplicity's sake. Everything runs on one binary on one port.

>>108345214
Yes, AGPL-3.0. No cuck licenses.
>>
>>108347294
>Yes, AGPL-3.0. No cuck licenses.
holy based
>>
>>108347294
add +nigger to that please.
>>
>>108342803
>I partnered with the CIA just to spy on schizophrenics
Who hasn't?
>>
Looks cool anon. Will check it out.
>>
>>108347209
you can read the code retard
>>
>>108347441
that proves nothing mongrel
>>
>>108347441
I don't think he can actually.
>>
>>108342335
Sounds good. The only issue is that people on here have no friends. I'd post your project to other websites.
>>
>>108347465
>there are other websites to share open source software
such as?
>>
>>108347465
Ah well, someone somewhere will know a group of people who will use it. It's funny that the first reply on this thread was someone saying he didn't have friends, and that's been a common theme throughout.
>>
Hey OP, do you plan on making ARM64 Docker image for a Pi? It would be cool to have it running quick on a spare ARM computer.
>>
>>108348365
I don't have an ARM64 Linux machine to do that on, but there is an ARM64 of the server without Docker. I'm not too familiar with doing cross-architecture Docker builds.
>>
>>108348480
Alright, I'll follow your local install tutorial then.
If you ever think it'll be worth your time, I can recommend you my Gitea workflow, though I'm a novice when it comes to CI/CD. https://pastebin.com/fjRMAesv
If you use CLI it boils down to using Docker buildx with linux/amd64,linux/arm64 passed to --platform.
>>
>>108348618
Good to know. Right now I do it manually with a Makefile script, so I'll go integrate it into that later.
>>
File: downloadmanager.go.png (98 KB, 1274x700)
98 KB
98 KB PNG
One of the more annoying parts to build, but the download manager should be done in about a week or two.

Does anyone know how Soulseek (and Nicotine+ in particular) handles resuming downloads when the file on the peer has been changed or removed? I never encountered this while using Soulseek, but I'm sure it can happen, and I'm not sure what the best way to handle that is.
>>
>>108348870
Nictoine+ is opensource, just go check the code
>>
>>108349100
I didn't read Nicotine+'s actual client code, but I did read over its Soulseek protocol documentation, and it doesn't seem like there's anything to detect a change in the file other than the size changing, so I think I'm just going to fail the download if the size changed. No point in doing something complex for such a niche situation.
>>
>>108345368
Docker is for techlet faggots
>>
Well it's good to see /g/ making something cool.
>>108349502
I'd say it falls into the valley of being too hard for normies whilst not the ideal solution for technical people.
>>
>>108349536
Docker makes sense for software that depends on libc, since you often can't just download a binary and run it without running into compatibility issues. Docker solves that. It also solves the pain of having software that requires a million different globally-installed .so files. All the problems it solves are related to dynamic linking dependencies.

In the case of this software, no libc and no dynlibs = no need for Docker. That's a big reason why I tried very hard to avoid using any C dependencies. People complain about the sizes of statically compiled binaries, but the alternative more often than not is shipping an entire distro like Alpine or Ubuntu to run it.
>>
>>108342335
You mentioned that it falls back to proxying if direct connection is not established, does that mean the program is also doing some sort of hole punching? Otherwise how will two peers connect with each other?
Also how does that proxying work,
Also continuing on my first question, if are doing some sort of hole punching doesn't that mean that server also already kind of work as a stun server?
also i have heard some full cone NAT automatically disconnect after a while if data is coming from the ip that is not the one you connected to, have you done something to handle a case like this?
in situations like this for example playing lan games without port forwarding i have found an amazing software called headscale its a self hosted server for tailscale it also has nat traversal and optional relay server, that works great for me, i created a simple ui to let everyone create user and generate token to easily play with each other.
>>
>>108349585
I miss when Windows was good and I could just make one installer that works on every grandma's XP laptop and tell Linux users to eat my shorts.

That being said I personally disagree that using libc makes Docker a good idea. To me it's much easier to just run cmake --build than deal with Docker containers. I guess dependencies on shared libraries is an issue but it's snow big deal if they're kept to a minimum and are common enough that the user likely has it installed via their distro's package manager already.
Where I do see the advantage of Docker is they can run on startup automatically instead of needing to make systemd services or whatever init system the user has.
>>
in repo i just saw upnp directory, does that mean the no portforwarding thing just means its just using upnp to do the deed? Aw man i was excited that maybe some other magic was happening, with cgnat and poor handling by isps here upnp is useless for me :( back when upnp actually worked before cgnat days actual portforwarding was also easy
the big problem for me is isps downright don't even allow any fixed open ports nor with upnp or anything
>>
>>108349814
>does that mean the program is also doing some sort of hole punching? Otherwise how will two peers connect with each other?
I do not do hole punching, although I should add that to it. It uses UPnP and optional manual port configuration to facilitate direct connections. Clients advertise which IPs they are possibly reachable on (and can ask for their public IPs), and the server stores those and makes them available to clients that want to know how to reach clients. The server can also verify if those methods work by trying them.

>Also how does that proxying work
The protocol uses QUIC for connections, but protocol messages are sent in a request-response manner using a new bidirectional stream for each message, very similar to HTTP/3. Since messages are tied to a bidi stream, clients can open a bidi stream to the server, send a proxy request message, then the server will connect to the client on the other side using its existing QUIC connection. The server then just proxies all traffic in that bidi.

You can read the "Proxy Streams" section in the protocol directory on GitHub if you want to know the technical details.

>also i have heard some full cone NAT automatically disconnect after a while if data is coming from the ip that is not the one you connected to, have you done something to handle a case like this?
Since I don't do NAT hole punching, I haven't done any of that. But if/when I do, QUIC should make dropped connections that switch IP-port seamless if done right.

>i have found an amazing software called headscale
I've used Headscale, it's pretty great. I've use it before as a VPN for my computer while I'm away and for a virtual LAN for gaming as well.

---

In general, I did not go with a typical NAT hole punching thing initially because I wanted something very reliable at the core. As another connectivity method, I definitely should add it though.
>>
>>108349897
>Where I do see the advantage of Docker is they can run on startup automatically instead of needing to make systemd services or whatever init system the user has.
I run a personal FriendNet server with Docker for this reason. I hate dealing with systemd services, Docker makes each server for me the same regardless of which distro it runs under.

Anyway, I'm done talking about Docker now lol. If someone wants to use Docker, they can. If they don't want to, the software works perfectly fine without it.
>>
>>108349920
It tries to use UPnP, but it falls back to proxying if that doesn't work.

So, in short, this software is built for you!

I always had a shitty ISP that didn't let me open ports either, so I wanted to make something that would get around that.
>>
>>108349958
Unfortunately no, my shitty isp actually does not,
i remember i used to use a program called upnp portmapper to forward ports for games it worked great when hosting old lan games on specific ports which didn't have upnp, on my current isp same program no longer works although that program correctly creates port mapping entries in router and i can actually inspect them in router config page but no one can actually reach me.
I did lot of reading on it, but apparently in a CGNAT environment making devices reachable globally require special handling on isp side, one protocol which i have heard isps in big countries actually use is called port control protocol which is specially designed for this, but so far nothing like this for us.
>>
>>108350106
When I had AT&T, they let me create the port mappings in my router, but the same as you, I couldn't actually be reached from the outside.

These days, I use a VPN that doesn't include port forwarding capabilities, so I can't use UPnP at all.

All these reasons are why it falls back to proxying. I want people under these horrible CGNAT ISPs to be able to participate.
>>
>>108350144
>I want people under these horrible CGNAT ISPs to be able to participate.
Wasn't ipv6 supposed to fix that? Maybe it's just a matter of time
>>
>>108350159
i've heard of literally nobody ever who actually uses ipv6
>>
>>108350159
>Wasn't ipv6 supposed to fix that?
Supposed to, but ISPs are slow and lazy. If you look at Google's IPv6 adoption charts, only about 50% of the world supports IPv6 at all, let alone properly. Some ISPs only give a single /128 instead of a /64 like they're supposed to. Some ISPs break while doing it. Many don't offer it at all.
>>
>>108350144
Yeah i get you, when i was first hit with cgnat it killed me, i finally learned about this network shit enough to host my own game servers and we switched to a new cheaper and faster isp in town which quickly killed all others in town and it was using cgnat, i did so much research just to get what i had achieved already
thsts how i found out about port control protocol, unfortunately lost all hope and closed my school counter strike server,
but tailscale/headscale is doing pretty good for me, i have a hidden server running on one of our work test digital ocean droplets to play lan games once in a while.
>>
plans for when glowniggers come to your door and immediately demand a backdoor into your software or they're going to load your PC up with CP and bust you on it? 4chan used to have a canary
>>
>>108350159
They purposefully block it because the real reason they block all of these ports is that they really, really don't want you hosting things if you're just a regular home user. This is their answer to torrenting.
>>
>>108350188
There is a game called xonotic (its foss) which actually does have servers running over ipv6 game has support for it, in server browser you can also see if a server is using ipv4 or ipv6, i should try hosting an ipv6 server for it to test
>>
>>108350246
This is why I2P should take off, and other things that let you fucking torrent and do things on your own connection. I'll try to add I2P support once I figure out how to send UDP with it.
>>
>>108350377
Oh yeah, for this reason, I have explicit Yggdrasil support for peers. If you have Yggdrasil on your computer, it can do direct connections through that. If you don't know what that is, look it up, it's awesome.
>>
well I guess I'm spending a good portion of tomorrow trying to figure out how to compile make manually since I don't want to download docker or chocolatey
>>
>>108351473

https://friendnet.org/docs/server/setup/compiling/

The prerequisite for Make can be ignored if you run the "server" script in the Makefile manually.

I didn't really expect people to be running the server on Windows, so I didn't write a guide for it, sorry.
>>
>>108342335
Cool stuff OP. I wish we just had proper connectivity and not the NAT and firewall nightmare we currently have. It proxying the file requests seems like it would be the case in 99% of transfers, so you'd need a server with good bandwidth policies I guess.
>>
you should update how you describe it on the website, most people don't know what a private tracker is. Just say what it does: "share files within small groups"
>>
>>108351527
>Cool stuff OP. I wish we just had proper connectivity and not the NAT and firewall nightmare we currently have. It proxying the file requests seems like it would be the case in 99% of transfers, so you'd need a server with good bandwidth policies I guess.

Thanks. And yeah, I wish it wasn't the case either. Whatever, it is what it is. In any case, yes, you would probably need a server with good bandwidth.

>>108351592
>you should update how you describe it on the website, most people don't know what a private tracker is. Just say what it does: "share files within small groups"
The sentence right before the bittorrent analogy does explain what it does in plain speech, so I don't think it'd make sense to remove the bittorrent thing.
>>
>>108342335
So retroshare with less bloat



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.