Finally someone who can keep my attention by giving us the meat and potatoes of a subject. I enjoy these short version videos due to my attention span and how he can explain things in a way that's easy to digest. Super glad I found this channel.
A correction about how well supported this is. Depending on your network’s NAT port mapping implementation, it might be impossible for certain peers to establish a connection. However, you didn’t touch on the subject of NAT so I guess it is out of scope for this video.
Thank you so much for sharing! I think it would be beneficial to know how to dockerised a peer to peer newtwork for local development. I'm currently trying to figure this out myself and it's not the most straight forward. I keep getting addresses already in use errors
Is there much of a prereq required to learn Python? I understand it’s the “east” language to pick up, however I’ve already begun learning JavaScript and react for front end web dev, my reason for this is that I heard for the “better” Python jobs you really need a strong math background, which I do not have… however Python looks so nice I’m almost certain I’ll start learning it after I get a job with JavaScript as I’d like to eventually move into a back end position.
For basic python, I just jumped right in to learning it. Of course it wasn’t easy, but now I’m fluent and pretty much all self-taught. If you have a basic understanding of computers and how programming works I’m sure you’ll be fine. Math is important, but you won’t need complex math until you tackle difficult problems for upper-end projects.
Appreciate it :) I’m very confident with my basic JavaScript so far and am just starting react, will be adding Python to my resume once I land a job using JavaScript and feel comfortable enough to branch out
@ This is happening because a socket is bound to the source-port variable "sport" on line 36 of the script, and then immediately the script tries to bind another socket to that same port on line 45 inside the listen() function when it calls it via Threading on lines 51/52, which is what causes this error. Two sockets cannot bind to the same port at the same time. You can fix this by adding a 'sock.close()' to line 40. P.S. I would also recommend wrapping all blocking calls like sock.recv() in try..except..finally blocks so you can catch KeyboardInterrupts and properly terminate the socket with sock.close(), otherwise you may have dangling background processes using those ports which will also cause this error until they timeout.
Hi, good tutorial, but... it will not work when clients are behind firewall. You use static port 50002 to listen on and to send to. Behind firewall port number will change to random givet by router.
Yes. A fun story: my neighbour once called to tell me Internet is not working. We were on the same LAN and Skype figured it can connect directly without Internet. I've seen other tools do it as well.
first i wanted to ask if this is really p2p by definition because of the server involved - then i watched your other video :D nice explanation even for total noobies like me :)
For little money you can use digital ocean to spin up a few vms, which I believe he is using in this video. Spin up 3 linux vms all with public vms in different geographical locations.
I am having trouble making this work on 4G internet. Is it even possible? I would think so, because torrent is working just fine. Any idea on why it's not working?
How secure is the UDP connection type? If one was to make an application to carry sensitive data, would UDP connections be safe?... and/or what type of sensitive doc/chat would you consider safe? (If we remove, from this scenario, the potential security risk of the front end application components and just focusing on the UDP part)
It is not safe at all, the only security barrier is the server, if it is random or can encrypt the first connection, but is very thin as a barrier. A man in the middle attack or a spyware that monitors all traffic can easily intercept all data exchanged
Also UDP data transmission can be unreliable and doesnt do any error checking (there is more but google tcp vs udp). Can you think of the impact this may have on encrypted messages?
Hi bro can you punish another scammer using your skills like you did in the other video that you posted before? I can provide you with an email that I got from a scammer asking me to pay in order for them to return a package, which is not true, to my address. They ask for credit card details.
fantastic bite sized and actually useful tutorials, love it man. keep these up!
lol this reminds me back in the xp days when we would send custom error boxes to computers in the computer lab
Learning python rn and u posted this, perfect timing.
really great stuff, inspired me to take a look at stuff, tons of other connections you can make with socket library in python3.
Could you make a video on what methods there are to find peers (Bittorrent DHT, Gnutella etc)
Finally someone who can keep my attention by giving us the meat and potatoes of a subject. I enjoy these short version videos due to my attention span and how he can explain things in a way that's easy to digest. Super glad I found this channel.
A correction about how well supported this is. Depending on your network’s NAT port mapping implementation, it might be impossible for certain peers to establish a connection. However, you didn’t touch on the subject of NAT so I guess it is out of scope for this video.
please explication because i am having some serious problemms with that
it works with my local ip but not my public ip
Thank you so much for sharing!
I think it would be beneficial to know how to dockerised a peer to peer newtwork for local development. I'm currently trying to figure this out myself and it's not the most straight forward. I keep getting addresses already in use errors
Now I know more about udp. Thank you for a short and to the point video!
Does this only work with virtual machines? or can it also be used with vpns and another laptop?
Imagine going to school and actually learning this stuff, instead of reading about it
Is there much of a prereq required to learn Python? I understand it’s the “east” language to pick up, however I’ve already begun learning JavaScript and react for front end web dev, my reason for this is that I heard for the “better” Python jobs you really need a strong math background, which I do not have… however Python looks so nice I’m almost certain I’ll start learning it after I get a job with JavaScript as I’d like to eventually move into a back end position.
For basic python, I just jumped right in to learning it. Of course it wasn’t easy, but now I’m fluent and pretty much all self-taught. If you have a basic understanding of computers and how programming works I’m sure you’ll be fine. Math is important, but you won’t need complex math until you tackle difficult problems for upper-end projects.
Appreciate it :) I’m very confident with my basic JavaScript so far and am just starting react, will be adding Python to my resume once I land a job using JavaScript and feel comfortable enough to branch out
epic tutorials, concise, to the point, love it.
Why don't you use the cleaner f-strings with print() and sock.sendto()?
fstrings also have better performance concatenating several strings
I have a question sir, is required port forwarding or it work over the internet pls tell me..
I tried this code on github serveral times, I always get an error says adress already in use, how can I fix this???
same problem, could you solve this?
@@nagasaipavanswaroopainapur6539 Alguma solução? address already in use :(
Any solution?
@ This is happening because a socket is bound to the source-port variable "sport" on line 36 of the script, and then immediately the script tries to bind another socket to that same port on line 45 inside the listen() function when it calls it via Threading on lines 51/52, which is what causes this error.
Two sockets cannot bind to the same port at the same time.
You can fix this by adding a 'sock.close()' to line 40.
P.S. I would also recommend wrapping all blocking calls like sock.recv() in try..except..finally blocks so you can catch KeyboardInterrupts and properly terminate the socket with sock.close(), otherwise you may have dangling background processes using those ports which will also cause this error until they timeout.
Exactly what I was looking for! Thanks!
Hi, good tutorial, but... it will not work when clients are behind firewall. You use static port 50002 to listen on and to send to. Behind firewall port number will change to random givet by router.
Will it work with dynamic ips of clients as here I assume you have static ips for your vm
Peer discovery is way better with what UDP provides.
Very cool! Is it possible to create a UDP connection like this between two devices over the same LAN?
Depends how smart your router is, but usually yes.
@@EngineerMan does this work on windows too !?
Yes. A fun story: my neighbour once called to tell me Internet is not working. We were on the same LAN and Skype figured it can connect directly without Internet. I've seen other tools do it as well.
first i wanted to ask if this is really p2p by definition because of the server involved - then i watched your other video :D nice explanation even for total noobies like me :)
If you implement a rendezvous server that forwards traffic between clients, that doesn't quite fit the term "peer to peer".
It's used to tell each of the clients the IP address and socket of the other client. After that I believe it doesn't do anything else
Will it be possible to communicate Peer-To-Peer over the internet using Microcontrollers like ESP32 ?
what if router assign different ports than 50001 and 50002. In my case this is happening and I am unable to recevie messages
I would like to see an update using encryption
YESSS this is what I needed
If i want to talk with computers on different networks, is it possible and if it is where would the server run?
awesome! what would happen if both sent messages at the exact same time?
the listeners are threaded they would work fine .
thks for this nice video, is there a source code for the rendezvous server ?
What code editor do you use?
Awesome I was waiting for this!
that's awesome bro, by the way , I wanna know how can I apply file transferring in Python too, I am looking forward to this tutorial
what about tcp implementation?
Does it work on different networks?
Can you create a simple example for portless communication between NodeJS and React?
You could use the BroadcastChannel from the web api, theres a npm package that integrates it into node.
Why did you write Client and Server? I thought a Peer To Peer connection doesn't have a server.
server just gives the clients their peers details
@@dominykas5195 ok, thx
Is the rendezvous server a public server? Are there any free public servers available for testing?
For little money you can use digital ocean to spin up a few vms, which I believe he is using in this video. Spin up 3 linux vms all with public vms in different geographical locations.
@@Richard-xu7kz Many thanks for the suggestion, cheers.
I also checking up with Heroku.
the rendezvous server is public(port forwarded) to accept the udp messages of the 2 clients .
how about peer-to-peer connection,able to get access to the other pc using python?
Super awesome!
Brilliant!
I am having trouble making this work on 4G internet. Is it even possible? I would think so, because torrent is working just fine. Any idea on why it's not working?
How secure is the UDP connection type?
If one was to make an application to carry sensitive data, would UDP connections be safe?... and/or what type of sensitive doc/chat would you consider safe?
(If we remove, from this scenario, the potential security risk of the front end application components and just focusing on the UDP part)
It is not safe at all, the only security barrier is the server, if it is random or can encrypt the first connection, but is very thin as a barrier.
A man in the middle attack or a spyware that monitors all traffic can easily intercept all data exchanged
Also UDP data transmission can be unreliable and doesnt do any error checking (there is more but google tcp vs udp). Can you think of the impact this may have on encrypted messages?
UDP on its own isn’t secure, the same goes for TCP. You can use HTTP(S)3 which uses UDP to provide secure connections.
i was waiting for this
thanks
could you write the scripts from scratch? this is a bit hard to follow
Nice.
Thank u
Next level of content men!
Looking for peer to peer connection between two clients only
Sir you are the best 🙏
Hey, how do you edit multiple lines of code at once?
Drink 5 liters of beer 🍻
why does it work with my private ip and not mu public ip !!!!!!!! HELP i m going nuts
Imagine being the 1 guy that disliked the video
Can this be blocked?
This code will not work peer behind NAT.
Woah, first view! Love the content!
Nice work :)
@@EngineerMan any plans to make some RabbitMQ content?
I would tell you a joke. But you might not get it.
Hi bro can you punish another scammer using your skills like you did in the other video that you posted before? I can provide you with an email that I got from a scammer asking me to pay in order for them to return a package, which is not true, to my address. They ask for credit card details.