14 mensajes Página 1 de 1
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.
USAz english soz allz

Patch 1.0.0.3 Aero

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.
ImagenImagenImagenImagen

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 ?
USAz english soz allz

Patch 1.0.0.3 Aero

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

viewtopic.php?f=12&t=272&p=15178
ImagenImagenImagenImagen

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?
USAz english soz allz

Patch 1.0.0.3 Aero

you can use PGP with gnupg using command line
ImagenImagenImagenImagen
:penguin: i find gpg4win this the right thing?
USAz english soz allz

Patch 1.0.0.3 Aero
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...
ImagenImagenImagenImagen
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
USAz english soz allz

Patch 1.0.0.3 Aero
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...
ImagenImagenImagenImagen
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
USAz english soz allz

Patch 1.0.0.3 Aero
bullshit. router will drop ur packets if u send that way
ImagenImagenImagenImagen
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:
USAz english soz allz

Patch 1.0.0.3 Aero
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.
ImagenImagenImagenImagen
14 mensajes Página 1 de 1

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 2 invitados