Is is possible

This english section.
Hey there, is there a DLL that AMS can call or maybe a lua script that can be used to do P2P, you see so many things use P2P these days and if we could use P2P it could open up the range of apps we can do in AMS or any lua app.

I don't need away to manage the IP, this would be managed by a server if it was user based or via each person to pass on the IP to there 2ed person.

I hear sockets might work but I never been able to get them to work right in AMS and the Sockets Plugin is not free and never been provided by other means :)

Any ideas fokes?

I have :google: --ed this to hell now and coming up blank.

i have experimented with p2p previuosly, the experience was painful.

You should take care about port forwarding on each client, or at least manage your application to use UPNP, that automaticly changes the router but most of them don't have this feature...

You can use socket.bind to create a receiver and socket.send to send data, and you would need a tracker, where you can list all connected clients you have.

Tracker sould have the public key of each client, and the client should have the private key, so messages for some user will be crypted with public key by sender and decrypted with private key by receiver, so you will have secure data.

Ive made some lan chats and tools for some bussiness, lan applications have the same structure but didnt use a tracker since you can pool the network and dont mind the port forwarding or upnp.

I was thinking single user based user to user chat sort of thing and I was thinking it been cryted also I was thinking a basic client that logs in to a server and pulls a contact list of sorts then it opens up a DialogEX in the multithread dll or in its own exe for the contact between the two, the basic client would be the receiver pushing it to the client sender I could do this with xml or just send it via command line, I understand the basics just don't understand where to do from here.

Whats the basic setup I will need I see.

AMS
MultiThread or another exe to handle some tasks
LuaSockets
Loads of time,

I not sure how to do the public and private key thing in AMS do you think your able to make a little sample on this ?

in this forum there are great examples using luasocket with coroutine by webultra that is a very faggot guy.

lanes and coroutine acts as my multithread object but i think it works better and its the official way of lua to handle second states, you sould spend some time with lanes and coroutine to understand how its work, but the examples are on this forum

http://amsspecialist.com/viewtopic.php? ... 72&p=15178

I mean the private and public keys for messages and data I really have no idea how to do that and reason I don't want to go with lens and coroutine is I don't want to include shit load of files but I will give them a read over maybe they can be converted in to one big file or something.

I will give his example a look over but like I said how would I handle the private and public key in ams?

you can use PGP with gnupg using command line
:penguin: i find gpg4win this the right thing?
i dont rly see the point on doing 2-way encryption on a p2p system.

in p2p your system you send packets directly against the target system, so, data wont never flow to lobby server or another systems, so unless ure concerned about crypting data against man-in-the-middle attacks is pointless to crypt this data. even a simple ciphering do the trick to mitagate data loss on those kind of attacks.

p2p flow is this way:

-generating pgp private and public key
-setup socket for nat punch hole
-client opens persistent connection against lobby server, also sends pgp public key
-lobby server send to all clients a notification that we just connected, also sends our network info (ip,port) and pgp pubkey.
-lobby server also notify us the list of connected systems, network data and pgp pubkeys. we store them.
...
-send packet to client2 with data crypted with public key, client2 will recieve the packet and decrypt with its own privkey.
...
lobby server also sends disconnection notifications and broadcast messages needed...
That is kind of what I am trying to do, but maybe leaving the lobby out and do a ping test to the client the end client would give them a key what would be a mash up of IP port and public Key so no server is needed, I also looking in to a server option.

I had the socket demo but was unable to get the server to listen and send something was playing up, I will return to this for sure but I thnk I might be over my heard I see a idea but not sure if I am able to do it lol
in p2p u always need a connection trought a server, this server will share the network address u have currently opened on this server to another connected systems, that will use THAT network address in order to directly send u data. So having a server is required (fe announce servers on torrent trackers) because if not anyone cant open direct connection to your system throught your router unless u configure a port mapping on your router that let the NAT reach your LAN system.

P2P server will stablish persistent connection with u and share your opened LAN-NAT addr that other systems can use to send u data directly. that avoids the need to upload/download big chunks of data to the server with cosequent traffic and badwith save in server system, thats all. ure always needing a server unless ure working on LAN and you can do a broadcast discovery, or using some kind of vpn tunneling that makes ur nat work as a lan...
I did say the users can pass there own IP's as part of a key what would hid there IP Port and HandShake, this is possible without a man in the middle server, a directory server is useful but not needed to get things working
bullshit. router will drop ur packets if u send that way
Pabloko escribió:bullshit. router will drop ur packets if u send that way
A server sends the information the same bloody way Pabloko I might not be able to program it but I know how things fucking work, don't just think because you program things better then most that you know everything, the name p2p gives it a way in the fucking first place USER a to USER b the means to handle to connection to A and B will away's be there same no matter how the end users get the addresses, I have used tools before what do this very same thing, there are tools out there that still do the very same thing.

Yes UPNP would need to be enabled or if your using a port NOT open by the router then the end user must open the port but this is not a big thing, you know what, if there not smart enough to open a port they shouldn't be trying to hiding traffic via p2p anyway.

You might wow the kiddy scripters here on what you know, but you only get my respect for been able to program something better then I can, but I bloody know what I am talking about and I know how the tech works. next time tell someone that dose not know about the tech and ran the tech before, here I know and ran it, I just don't know how to make it.

I am not going to say HEY I know everything as I don't know how to find floors in software like your able to or able to program DLL's, but don't you ever think that I have not done my research before posting here.

:content-1414023392:
lmao check urself before u shrekt urself dude. First of all, idk why u talk about who is better programmer and who is a script kiddo, i didnt do any mention to that, anyways its pretty clear wich one we are ;)

upnp isnt rly a good thing, its very device dependant and sensitive to client configs i may only suggest to use udp hole punching with p2p that seems to be more reliable process than upnp stuff, also a bit more secure, anyways u still need a server to stream connection/disconnections and ip migrations.

the workflow is as this:

Imagen

The fact of rely on opened socket of server to stream data will give you a hint of the real need of server... This way is way more effective than upnp with 92% success rates, so its very portable if u keep low the MTU... upnp for example in most spanish providers is capped from routers, its activated but does not work, u will need a custom firmware to make it work on some models... so no, i dont even mind upnp as an aption, and anyway u still need a server. so, pointless.
Each client would be it's own server, and you don't need a central server at all, and i don't see why you keep saying this false matter, it might help better but it's not needed, part from the basic hops to connect to a user to user but theres servers are the internet backbone and everyone no matter how we connect to something are used.

But if you saying p2p is not possible without a central server your very wrong, I have already been able to do it, the users do have to manually exchange there details to connect to each other but this is a pure server/client to server/client no central server collecting or exchange server in the middle.

You might be confusing yourself in what I am trying to do and if so then the hole of this convo was pointless but if you have got the concept and your throwing the idea out just because it might be harder to get it to always be connectable then your ideals are little floored.

But learning how to punch hole is a good thing but still researching this.
patch escribió:
24 Oct 2017 13:36
Each client would be it's own server, and you don't need a central server at all, and i don't see why you keep saying this false matter, it might help better but it's not needed, part from the basic hops to connect to a user to user but theres servers are the internet backbone and everyone no matter how we connect to something are used.

But if you saying p2p is not possible without a central server your very wrong, I have already been able to do it, the users do have to manually exchange there details to connect to each other but this is a pure server/client to server/client no central server collecting or exchange server in the middle.

You might be confusing yourself in what I am trying to do and if so then the hole of this convo was pointless but if you have got the concept and your throwing the idea out just because it might be harder to get it to always be connectable then your ideals are little floored.

But learning how to punch hole is a good thing but still researching this.
Technically you can go witout coordinator server, this will have side effects on clients, like needing nat exit and the need of quorum/split brain system with all peculiarities those systems needs (very complicated)

Imagen

Theres plenty of p2p setups, each one has pros and cons, you may check your project requeriments in that case.

In most common cases you will end up using a centraliced server, nat puchtrought will require it for example, what you do, is open a socket to a centraliced server on your node, then this node nat has a piped connection on some random port that you send to other nodes so they can pipe data directly on the others node already opened connection to central host, so you can traverse the nat. Its not fully needed, but in real world you will have to use it (again depending your projects requirements, but in most cases)
Problem with that is you have to reply on that central server or connection to still be still alive long after you create it, Direct P2P does have it's problems and many of them I agree there lol?

I don't know, I am thinking of walking away from any idea like this, I got things like sockets and raknet thanks to your lua dll port to work as chat clients and one clinet also slaving as the server, but what's the point anymore.
"direct p2p" i bet you only tested that crap on lan with netmask discovery xd... real world needs real and reliable protocols
No my server is not on the same lan as my main system and that is where I tested it, but if the ports are not open on both systems firewalls and router then yes this would create problems, but I have NO option if I was to make it but to have it direct connection, there is no other way my pocket would let me other wise and trying to get public people host nods as we seen with tor create loop holes for law enforces