Problem connecting to adch

General adchpp discussion

Moderator: Moderators

Locked
Pothead
Posts: 223
Joined: 2005-01-15 06:55

Problem connecting to adch

Post by Pothead » 2006-11-12 12:50

Having trouble connecting to the adchpp. Other people can get in fine, but when i connect i have to either use localhost or my lanip addy.
When using my external i get
[17:46:46] *** No connection could be made because the target machine actively refused it.

When using localhost
[17:45:01] *** Connecting to adc://127.0.0.1:2780...
[17:45:01] *** Connected
[17:45:01] <ADCH> Your ip is 127.0.0.1
[17:45:01] *** An existing connection was forcibly closed by the remote host.

Lanip (192.168.0.1) gives something very similar to that. Any ideas ?

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2006-11-12 16:10

Could it just be that your router doesn't loop connection attempts if you try your external IP? You should be able to see it with wireshark, so you can test my hypothesis.

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-11-13 14:05

Nice, didn't know ethereal had been updated. :)
However i not really sure what to look for ? I figured my router didn't support loop back a while ago, when connecting to my nmdc hubs.
But i could connect to them using localhost, whereas adchpp disconnects me when i try using that. :cry:

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2006-11-14 20:21

Oh my, sorry, I had this problem myself, but I didn't recognize it from your initial description (which should have been enough). Since you're NATed, you've probably force an IP in DC++. This IP won't match what adch++ sees you connecting with, so it disconnects you. Maybe one of the lua gurus can script around this behavior - it's why NMDC hubs have exceptions to the IP checking.

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-11-15 04:45

hehe, okay, or alternatively since you, I and probably others suffer from this, i could submit a patch to adchpp ?.
(Just have a skip allowed ip's, to skip this check, in the config file ?, or just get it to ignore Localhost, and the standard LAN ip ranges)

Quattro
Posts: 166
Joined: 2006-01-11 09:23

Post by Quattro » 2006-11-16 10:56

DCH++ had a plugin to correct this behaviour...
maybe that could be ported to adch++? just like all the others (if appropriate) should be ^^
You can send a message around the world in 1/7 of a second; yet it may take several years to move a simple idea through a 1/4 inch of human skull.

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-11-16 12:44

Simple patch to sort it. :)

Code: Select all

Index: adchpp/trunk/adchpp/ClientManager.cpp
===================================================================
--- adchpp/trunk/adchpp/ClientManager.cpp	(revision 86)
+++ adchpp/trunk/adchpp/ClientManager.cpp	(working copy)
@@ -288,7 +288,7 @@
 	for(StringIter j = cmd.getParameters().begin(); j != cmd.getParameters().end(); ++j) {
 		if(j->compare(0, 2, "I4") == 0) {
 			dcdebug("%s verifying ip\n", AdcCommand::fromSID(c.getSID()).c_str());
-			if(j->size() == 2) {
+			if(j->size() == 2 || (c.getIp() == "127.0.0.1")) {
 				// Clearing is ok
 			} else if(j->compare(2, j->size()-2, "0.0.0.0") == 0) {
 				c.setField("I4", c.getIp());

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2006-11-19 15:08

Good patch for your problem. There will be others behind a NAT running adchpp on a different machine, so eventually the hub needs to be take that into account.

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-11-19 19:20

That's why i initially suggested adding some settings for it. Decided against doing it that way for now, since i figured querying the xml everytime an IP wanted checking might decrease performance. :)
Obviously that patch can be modded to permit specified lan ip's easy enough for other people, but i figure that'll do me for now, until a nicer way turns up.
Suggestions are welcome, and i'll have a go at doing some. :)

imb
Posts: 99
Joined: 2004-06-15 17:48
Location: England

Post by imb » 2006-12-01 13:55

I guess I need this patch because I can't join my own hub:

[18:49:49] *** Connecting to adc://127.0.0.1:2780...
[18:49:49] *** Connected
[18:49:50] Your ip is 127.0.0.1
[18:49:50] *** An existing connection was forcibly closed by the remote host.

How can a retard like me get in his own hub?

BTW cheers very much Pothead, other people are able to join, so I assume it's working well.
"Every Englishman must have a hobby. Some like to collect the stamp, some like to make the jam, but the most fun is to a kill a little animal with a shotgun or rip them up with wild dog."


imb
Posts: 99
Joined: 2004-06-15 17:48
Location: England

Post by imb » 2006-12-01 14:59

Thanks mate, you are very kind, it's working. I guess most of this will require plugins, but is there a way to register for the hublist, and to add Ops, and to create an MOTD, and to set min share/max hubs?
"Every Englishman must have a hobby. Some like to collect the stamp, some like to make the jam, but the most fun is to a kill a little animal with a shotgun or rip them up with wild dog."

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-12-01 21:41

You can register on the adc hublist website. :)
How i sorted Op accounts out was using the !regme command, then manually editing the users.txt file. Probably a better way in access.lua. :)
I sure there is some way to set MOTD, not cannot think of it at the moment.
No idea about min share / max hubs, again worth looking through the adchpp.xml and access.lua files. :)

imb
Posts: 99
Joined: 2004-06-15 17:48
Location: England

Post by imb » 2006-12-01 22:10

I tried at http://www.adchublist.org/?p=addhub using hubaddress:portnumber and adc://hubaddress:portnumber

and got:

The hub in address <hub> didn't answer. Maybe there is no hub or the hub is full. Check the address and try again.
Error 110: Connection timed out

Sod it. Anyway, cheers for your other help once again :)
"Every Englishman must have a hobby. Some like to collect the stamp, some like to make the jam, but the most fun is to a kill a little animal with a shotgun or rip them up with wild dog."

newborn
Posts: 9
Joined: 2006-12-10 18:31

Post by newborn » 2006-12-11 18:05

imb wrote:I tried at http://www.adchublist.org/?p=addhub using hubaddress:portnumber and adc://hubaddress:portnumber

and got:

The hub in address <hub> didn't answer. Maybe there is no hub or the hub is full. Check the address and try again.
Error 110: Connection timed out

ditto :?

imb
Posts: 99
Joined: 2004-06-15 17:48
Location: England

Post by imb » 2006-12-11 18:55

This is a shambles really. They're promoting ADC, no make that imposing ADC, when ADC isn't sufficiently ready. If you get the hubsoft running, only lord knows how to get on the hublist, this is reflected by the some 6 hubs still on the adchublist.org. As this hublist isn't in the main client it doesn't matter anyway since no one will connect to your hub. and all the while your DC hub decline further and further, 111 users in it at the moment, it used to be more than double that at this time. Shit happens, but these policies are blatantly absurd and are slowly but surely destroying DC.

Enjoy your ADC network with 6 hubs and a bunch of fucked over DC hub owners.
"Every Englishman must have a hobby. Some like to collect the stamp, some like to make the jam, but the most fun is to a kill a little animal with a shotgun or rip them up with wild dog."

imb
Posts: 99
Joined: 2004-06-15 17:48
Location: England

Post by imb » 2006-12-11 18:59

And this problem is further perpetuated by an issue that can easily be solved, by removing the monopoly powers of the default hublists. DC has been at the mercy of hublists since the dawn of DC++, and still the issue hasn't been resolved once and for all. Absolutely pathetic.
"Every Englishman must have a hobby. Some like to collect the stamp, some like to make the jam, but the most fun is to a kill a little animal with a shotgun or rip them up with wild dog."

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2006-12-11 19:21

As a side note, isn't adchublist.org one of the websites that is vying to become popular? It borrows style from hublist.org, but it is not the same. Shouldn't they get at least a share of your vitriol, for making something that caused you more than a minute's worth of work?

imb
Posts: 99
Joined: 2004-06-15 17:48
Location: England

Post by imb » 2006-12-11 19:36

Generally hub owners and users don't care about hublist and dcdev politics, aslong as they have a hublist that works.
"Every Englishman must have a hobby. Some like to collect the stamp, some like to make the jam, but the most fun is to a kill a little animal with a shotgun or rip them up with wild dog."

newborn
Posts: 9
Joined: 2006-12-10 18:31

Post by newborn » 2006-12-11 19:59

well I think they should, its important we all think about whats best for the future and also stand by our morals. Its also good to support the people that spend all this time and effort coding and running services for us. Otherwise we would still be using original NMDC (and most likely have disappeared into obscurity many years ago).

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2006-12-11 21:42

imb wrote:Generally hub owners and users don't care about hublist and dcdev politics, aslong as they have a hublist that works.
adchublist.org failed to register your ADC hub. Isn't that a problem?

imb
Posts: 99
Joined: 2004-06-15 17:48
Location: England

Post by imb » 2006-12-12 14:17

newborn wrote:well I think they should, its important we all think about whats best for the future and also stand by our morals. Its also good to support the people that spend all this time and effort coding and running services for us. Otherwise we would still be using original NMDC (and most likely have disappeared into obscurity many years ago).
Sure there has to be the correct balance between morals and practicalities. But these policies have little to do with morals, more with pushing a protocol forward prematurely and favouritism in terms of which hublists to display. and in terms of non xml hublists apparently it's better to have no hublist than a non xml one.
"Every Englishman must have a hobby. Some like to collect the stamp, some like to make the jam, but the most fun is to a kill a little animal with a shotgun or rip them up with wild dog."

imb
Posts: 99
Joined: 2004-06-15 17:48
Location: England

Post by imb » 2006-12-12 14:33

GargoyleMT wrote:
imb wrote:Generally hub owners and users don't care about hublist and dcdev politics, aslong as they have a hublist that works.
adchublist.org failed to register your ADC hub. Isn't that a problem?
Sorry I don't understand, am I supposed to be some kind of advocate of adchublist.org?
"Every Englishman must have a hobby. Some like to collect the stamp, some like to make the jam, but the most fun is to a kill a little animal with a shotgun or rip them up with wild dog."

Locked