Here is my understanding of what is UDP hole-punching and how does UDP Peer-to-Peer connection work
As you may know our devices are behind a NAT process when trying to access the internet. Meaning multiple devices on the same private network (e.g your local wifi) will have the same public IP address while on the internet. So in order for the router to know which packet is destined to which device, there must be a translation table that has records like: (DestinationAddr, DestinationPort, LocalAddr, LocalPort). You can find out more about NAT here
The problem is now clear. If we wanted a Peer-to-Peer connection, clients would have no idea of each others NAT tables hence no idea of where they should send their packets to. In fact there is not even a suitable record in their NATs for this procedure.
That's when a third server (S in picture) comes into play. S should be exposed to both A and B, meaning it should have a public UDP port open for sending/receiving packets and the rest goes as follows:
1. A and B will attempt to send UDP packets to S, hence they would have a record in their router's NAT table for an open UDP port
2. S will aid to exchange A and B's public address and port
3. Both A and B will now attempt to send a UDP packet to each other without using S and in doing so they would add another entry to their NAT tables. Bear in mind if a packet is received without any packet sent first, it will be dropped. Since the NAT entry is not initiated yet but it does not matter since it will be initiated when sending one anyways
4. After all said and done, A,B can freely send packets to each other via UDP
TCP hole punching works about the same but for UDP it's simpler since it's connection-less
As you may know our devices are behind a NAT process when trying to access the internet. Meaning multiple devices on the same private network (e.g your local wifi) will have the same public IP address while on the internet. So in order for the router to know which packet is destined to which device, there must be a translation table that has records like: (DestinationAddr, DestinationPort, LocalAddr, LocalPort). You can find out more about NAT here
The problem is now clear. If we wanted a Peer-to-Peer connection, clients would have no idea of each others NAT tables hence no idea of where they should send their packets to. In fact there is not even a suitable record in their NATs for this procedure.
That's when a third server (S in picture) comes into play. S should be exposed to both A and B, meaning it should have a public UDP port open for sending/receiving packets and the rest goes as follows:
1. A and B will attempt to send UDP packets to S, hence they would have a record in their router's NAT table for an open UDP port
2. S will aid to exchange A and B's public address and port
3. Both A and B will now attempt to send a UDP packet to each other without using S and in doing so they would add another entry to their NAT tables. Bear in mind if a packet is received without any packet sent first, it will be dropped. Since the NAT entry is not initiated yet but it does not matter since it will be initiated when sending one anyways
4. After all said and done, A,B can freely send packets to each other via UDP
TCP hole punching works about the same but for UDP it's simpler since it's connection-less
❤2👌2
This is essentially how WebRTC works under the hood. Congratulations, you now know how to punch a UDP hole just like how you punch a hole in your table while you can't to get it to work.
❤1😁1
ScamMinder | Ai powered scam detector
It is actively updated and actually provides details about the total score of a website
https://scamminder.com/
It is actively updated and actually provides details about the total score of a website
https://scamminder.com/
Some compilers are so strict (like your mom) that we might say
Therefore exists another way of writing software called CDD or Compiler-Driven Development. Much like TDD but instead of your tests giving you the green light, you obey the compiler. It's highly feasible in Rust due to its type system and strict ownership rules.
This methodology can be summarized as:
> Write client code for your module even though it doesn't exist
> Figure out its model/interface
> Compile and face errors
> Errors bad, Life sad, Write code to get rid of errors
> Improve your model and repeat
> Hate yourself for choosing rust
if it compiles, it probably works
Therefore exists another way of writing software called CDD or Compiler-Driven Development. Much like TDD but instead of your tests giving you the green light, you obey the compiler. It's highly feasible in Rust due to its type system and strict ownership rules.
This methodology can be summarized as:
> Write client code for your module even though it doesn't exist
> Figure out its model/interface
> Compile and face errors
> Errors bad, Life sad, Write code to get rid of errors
> Improve your model and repeat
> Hate yourself for choosing rust
😁5
Someone commented this regarding Ai/vibe coders:
- We are finally learning what it feels like to be a manager: you have no understanding of how your product works, no ability to change it yourself and all you can do is start asking dumb questions and hope that someone / something figures it out
- We are finally learning what it feels like to be a manager: you have no understanding of how your product works, no ability to change it yourself and all you can do is start asking dumb questions and hope that someone / something figures it out
🤣3
Accio
Someone commented this regarding Ai/vibe coders: - We are finally learning what it feels like to be a manager: you have no understanding of how your product works, no ability to change it yourself and all you can do is start asking dumb questions and hope…
Primegen view on "vibe coding is the future" video
https://www.youtube.com/watch?v=riyh_CIshTs
https://www.youtube.com/watch?v=riyh_CIshTs
YouTube
Vibe Coding Is The Future
Twitch https://twitch.tv/ThePrimeagen
Discord https://discord.gg/ThePrimeagen
Become Backend Dev: https://boot.dev/prime
(plus i make courses for them)
This is also the best way to support me is to support yourself becoming a better backend engineer. …
Discord https://discord.gg/ThePrimeagen
Become Backend Dev: https://boot.dev/prime
(plus i make courses for them)
This is also the best way to support me is to support yourself becoming a better backend engineer. …
Accio
Penpot | Free and open-source figma-alternative I've self-hosted this and trying it out. https://penpot.app
Update on this: Self hosted version is buggy and I'm often faced with internal errors (maybe wrong setup or my skill issues). Also in general, figma has some small features that penpot lacks. For example resizing a narrow line in penpot is nearly impossible without zooming 100x.
tl;dr: back to figma
tl;dr: back to figma
👍1
Easy-to-understand elaboration of concurrency and parallelism and their differences in rust book:
https://doc.rust-lang.org/stable/book/ch17-00-async-await.html#parallelism-and-concurrency
Rust book is much more than a language book. It describes the existing problems and their existing practices, then offers its own.
https://doc.rust-lang.org/stable/book/ch17-00-async-await.html#parallelism-and-concurrency
Rust book is much more than a language book. It describes the existing problems and their existing practices, then offers its own.
🍓1
Couple of games where you can learn CPU architecture and design your own PC
Turing complete | This one has a learning mode where you build a cpu from start to finish and even design your own assembly language
https://store.steampowered.com/app/1444480/Turing_Complete/
Virtual Circuit Board | More like a free sandbox to fuck around and find out, Currently having a -30% offer (Thanks to @RedemptionInDUB for finding it)
https://store.steampowered.com/app/1885690/Virtual_Circuit_Board/
Turing complete | This one has a learning mode where you build a cpu from start to finish and even design your own assembly language
https://store.steampowered.com/app/1444480/Turing_Complete/
Virtual Circuit Board | More like a free sandbox to fuck around and find out, Currently having a -30% offer (Thanks to @RedemptionInDUB for finding it)
https://store.steampowered.com/app/1885690/Virtual_Circuit_Board/
❤5👍2🔥2
Meta, tracks your phone web browsing actions and history, even in incognito mode, even with vpn connection, and even without the damn cookies! Using Instagram and meta apps on android🤡
This is now called localhost-tracking and here is a nice in-depth article about it
This is now called localhost-tracking and here is a nice in-depth article about it
👍2😁1
This is quite shocking. Here’s a simplified explanation of how it works:
- Instagram runs in the background, keeping a few ports open for incoming data.
- If the website you visit uses Meta Pixel for tracking (which happens about 22% of the time!), it sends a cookie to both Meta’s servers and your Instagram app in the background via that open port.
- Instagram then informs Meta that your account is associated with that cookie.
Just like that—even if you're in incognito mode or using a VPN—Meta can identify which websites you visited and what you did on them.
- Instagram runs in the background, keeping a few ports open for incoming data.
- If the website you visit uses Meta Pixel for tracking (which happens about 22% of the time!), it sends a cookie to both Meta’s servers and your Instagram app in the background via that open port.
- Instagram then informs Meta that your account is associated with that cookie.
Just like that—even if you're in incognito mode or using a VPN—Meta can identify which websites you visited and what you did on them.
🔥2🤯1🫡1
They are looking at the maximum of €32 Billion fine which they can probably afford and continue doing stuff like this in the future. It's so over.
✍2
V2-crawl
This is a simple noscript connecting bunch of my repos to crawl telegram for v2ray URIs, and expose the good ones in a local subnoscription link.
It's meant to be used on a personal computer connected to the same restrictive network you want to break free of
https://github.com/Keivan-sf/v2-crawl/
This is a simple noscript connecting bunch of my repos to crawl telegram for v2ray URIs, and expose the good ones in a local subnoscription link.
It's meant to be used on a personal computer connected to the same restrictive network you want to break free of
https://github.com/Keivan-sf/v2-crawl/
👍6
Accio
V2-crawl This is a simple noscript connecting bunch of my repos to crawl telegram for v2ray URIs, and expose the good ones in a local subnoscription link. It's meant to be used on a personal computer connected to the same restrictive network you want to break…
It only works for linux at this point. I might continue working on this in the future but for now it suits my needs.
If you have any suggestions, I'll be happy to hear them @ke1vans
If you have any suggestions, I'll be happy to hear them @ke1vans
👍4