Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / UDPs? Tunnels? I'm stumped... Argh!

Author
Message
MicroMan
21
Years of Service
User Offline
Joined: 19th Aug 2003
Location: Stockholm, Sweden
Posted: 10th Dec 2003 05:36
Sorry, I just need to vent, and this is a good place to vent.

I'm trying to write a chat client with enough whiz-bang to knock out MSN and AOL. I've decided to make it UDP based, because UDP packets are such great little things. TCP packets are like lumbering elephants in comparison.

By using UDP I can make it serverless, or so I thought. And - in theory - my solution works. You have one client that sends out little pings by UDP to any other client that listens. This is called UDP broadcast.

BUT the networks doesn't like UDP broadcasts, and my little packets get burnt up in the various firewalls (not to mention the routers) on the net. So, if I have one client in one network and another client in another network, they can't reach each other even if they are busy bees sending out pings...

Then there is the concept of tunneling. THat means that you hook up one client in one network with another client in another network, and they seed each others pings through their respective networks. This is what I want to do.

BUT how can the one client contact the other without knowing the IP number in advance? Argh! So, I'm stumped. My plan for world dominion, or at least dominion of MSN and AOL, has to go back to the drawing board. Months of work down the drain.

Gah!

-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 10th Dec 2003 06:02
That's a toughy. Sorry, I have no idea. And that's why I would use a central server to manage the IP's, however, it's not ideal for obvious reasons (costs, etc).

Anyway, if you ever do get it working then I'd definately take it over MSN and AIM. Hope you can find a solution.


"Computers are useless they can only give you answers."
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 10th Dec 2003 07:47
with all do respect, if you are going to do tunneling I'd suggest abandon udp and use tcp or http tunneling, and secondly, if you are going to do this type of program i'd suggest you abandon DBP (if that is what you are using to make it with). I don't know what you mean by TCP packets are lumbering elephants (maybe you can explain), but the program you are talking about is easily written in other languages like C++, C#, VB6, VB.NET and others I am sure. Not trying to burst your bubble, just wondering what you are up to?

-RUST-

VB.NET makes me all goose-pimply!
MicroMan
21
Years of Service
User Offline
Joined: 19th Aug 2003
Location: Stockholm, Sweden
Posted: 10th Dec 2003 08:25 Edited at: 10th Dec 2003 08:34
[Edited]

Heh, can't a guy just vent some?

I'm not writing it in DBP. I'm writing it in Delphi, and apart from this little problem, it's done. I've got clients running on both my machines. Except I can't get the packets beyond my own LAN, or any lan. It's the last hurdle. And I'm just annoyed I can't find a way to overcome it. At least not yet.

As for the TCP. It's just that a serverless system needs a good packet management system beyond what's in the sockets, and I've decided (whether that's true or not) that TCP is just too cumbersome and won't allow as a client to handle as many packets as a UDP based system does.

If the client is to be net-aware without relying on a server, then the client has to handle the server functions itself, and keep a track of what clients it can talk to. Possibly that means handling thousands of packets each second. With TCP you have to establish a connection with each client that sends you a keep-alive packet, while with UDP you just push out the packet and hope for the best. For performance reasons, I just think UDP does this better. When you actually want to TALK to someone, or send a message or a file to someone, you of course use TCP. But for network awareness, UDP is better. Or so I thought.

Just let me groan a bit, and I'll probably figure it out.

-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 10th Dec 2003 09:13
ok ok, the last thing I want to do is hinder a man's groaning (that doesn't sound good-but you know what I mean) Anyway, I guess all i can say is: cool beans, good luck, and let us know how it turns out.

-RUST-

VB.NET makes me all goose-pimply!
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Dec 2003 11:16
What I do with my router is :

I know what a certain port number a certain program uses, ergo, I also know what home machine will be availiable when I'm work. Thus, I tell the router that anything on this port goes to a certain machine. So the router DNS lookup looks like :

Example TCP 9999 -> 100.100.100.100 9999

Then, everything on the port number goes to the correct machine. I use TCP, you should change that to, say, UDP.


Mirrors are more fun than television. Well, that was fun, in a not-so-fun sort of way...
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 10th Dec 2003 12:36
Yes, but I think his problem is he doesn't know the IP of the machine so he can't tell it to go somewhere that he doesn't know.


"Computers are useless they can only give you answers."
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Dec 2003 12:42
Quite true... In which case my idea isn't much use...


Mirrors are more fun than television. Well, that was fun, in a not-so-fun sort of way...
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 10th Dec 2003 20:40 Edited at: 10th Dec 2003 20:40
hence the need for the server portion. I wrote a tcp chat in vb.net a couple months ago, and was offering it up to this community, if tgc would host the server portion but to no avail. I also wanted to include the apollo api but I never heard anything back - anyway, the server handles incoming connections and the sends out the messages to all the connected clients - the client need only know the ip of the server. The server maintains the addresses of the clients, which are hidden from the clients - pretty simple really. I would never attempt this with udp (in .net) there are alot of thread-blocking issues with udp in .net

-RUST-

VB.NET makes me all goose-pimply!
MicroMan
21
Years of Service
User Offline
Joined: 19th Aug 2003
Location: Stockholm, Sweden
Posted: 11th Dec 2003 02:30 Edited at: 11th Dec 2003 02:32
I'm considering this. Anyone that has any detailed knowled about networks?

What I've done is basically this.



The RemotePort address is the broadcast address for the entire network, that is the internet. In theory, if you use that address the packets would be targeted at the whole internet.

I'm considering this however, and would like a hint if I could sidestep the UDP-broadcast block in the routers and firewalls by enumerating some part of the IP-address above. Something like.



This is not the code as it appears in my program, but just an illustration I use here.

-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 11th Dec 2003 03:52
I don't think trying to send data to every computer connected to the internet isn't going to work. If routers allowed it wouldn't take many programs like yours to clog the system.

dbpro : p166mmx @ 233 : 256mb : sb 128pci : sis onboard
MicroMan
21
Years of Service
User Offline
Joined: 19th Aug 2003
Location: Stockholm, Sweden
Posted: 11th Dec 2003 04:38 Edited at: 11th Dec 2003 04:39
Actually, I got the idea from the Kademlia-client hybrid of eMule, the peer-to-peer program. It is a development from the Overnet network. That's a serverless UDP based network.

I wish I knew Java/C++ because then I could study the Kademlia documentation to see how they did it, but right now it's greek to me.

-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Dec 2003 09:42
Broadcast will only work on your local network. *Everyone* out there filters out broadcasts - they have to, otherwise the net would be swamped with broadcast packets.

The p2p programs *all* use client/server mechanisms. You have a set of nodes (can't call them servers ) that you connect to, and when you place an enquiry, that enquiry is passed to all other clients connected to that node. They then talk directly to you to tell you what they have.

Plug-ins ... get 'em while they're hot, they're lovely
http://www.matrix1.demon.co.uk
MicroMan
21
Years of Service
User Offline
Joined: 19th Aug 2003
Location: Stockholm, Sweden
Posted: 11th Dec 2003 10:29 Edited at: 11th Dec 2003 10:44
Yeah, but the client are servers, as far as I've understood it from the Pastry documentation, and those parts of the Kademlia that I do get. If you've used the gnutella network's 'leafing', you know how it works.

Overnet does not use servers, but uses the 'leafing', except in their own kademlia variety. There's a complicated adressing strategy for it.

Quote: "
A Pastry system is a self-organizing overlay network of nodes, where each node routes
client requests and interacts with local instances of one or more applications. Any computer
that is connected to the Internet and runs the Pastry node software can act as a
Pastry node, subject only to application-specific security policies.
"


This is quite fascinating. I'm in way over my head, and will have to simplify my original plans, but still... I will solve this.

Edit:

I should add that this Pastry/Kademlia/thingie is something I've just found after I started to whine above. So, it's all still unchartered territory for me. But so far, it might just do what I want to do...

-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----

Login to post a reply

Server time is: 2024-09-20 22:40:19
Your offset time is: 2024-09-20 22:40:19