Tool to get you IP into your Connection Settings

Know of something that might be useful to the DC community? Post it here! (Still, no advertising)

Moderator: Moderators

Locked
mooq!
Posts: 1
Joined: 2003-07-17 06:35
Contact:

Tool to get you IP into your Connection Settings

Post by mooq! » 2003-07-17 06:41

Hi there, does anybody know if there is a possibility to get your IP into your connection settings for active mode?
This would be really great, because I am behind a router and have to set the IP for active mode everytime I start DC++ to get it working.
I am no programmer, but I think this could be possible to manage... ;-)
hopefully, mooq!

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2003-07-17 07:11

Get a dynamic DNS address. DC++ will accept such an address in the active mode settings.

Do a search for "Dynamic DNS" or "No-ip" or something similar if you want more details.
The world is coming to an end. Please log off.

DC++ Guide | Words

cyberal
Posts: 360
Joined: 2003-05-16 05:42

Post by cyberal » 2003-07-17 07:43

Some hubs don't accept a dns as ip, is it maybe DCH++ ?? anyone?
http://whyrar.omfg.se - Guide to RAR and DC behaviour!
http://bodstrom.omfg.se - Bodströmsamhället, Länksamling om hoten mot vår personliga integritet

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-07-17 08:12

since 0.181 the hostname is converted to an IP by dc++

so hostnames will never get sent...
... this does mean however that you need to restart dc++ whenever your IP changes
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2003-07-17 08:13

DC++ doesn't send DNS addresses. It converts the address to an IP address before sending it to a hub.

Ref: this post and onwards.
The world is coming to an end. Please log off.

DC++ Guide | Words

cyberal
Posts: 360
Joined: 2003-05-16 05:42

Post by cyberal » 2003-07-17 08:59

thanks guys :)
http://whyrar.omfg.se - Guide to RAR and DC behaviour!
http://bodstrom.omfg.se - Bodströmsamhället, Länksamling om hoten mot vår personliga integritet

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2003-07-17 09:09

Almost simultaneous posting. :)
The world is coming to an end. Please log off.

DC++ Guide | Words

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

Post by GargoyleMT » 2003-07-20 10:28

Sedulus wrote:so hostnames will never get sent...
... this does mean however that you need to restart dc++ whenever your IP changes
Sorry, it resolves the value of the SERVER setting (the IP field) a number of times during the run of the application:

Client.h

Code: Select all

	string getLocalIp() { 
		if(!SETTING(SERVER).empty()) {
			return Socket::resolve(SETTING(SERVER));
		}
		if(socket == NULL)
			return Util::getLocalIp();
		string tmp = socket->getLocalIp();
		if(tmp.empty())
			return Util::getLocalIp();
		return tmp;
	}
It actually resolves it every time you issue a $ConnectToMe request, so if your IP changes, connection requests will fail until the DNS updates trickle down. But you shouldn't have to restart DC++... right?

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-07-20 12:11

oops.. my bad

hm.. I think it's rather odd to do it that often, but I guess it's the best way for those using dyndns services
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

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

Post by GargoyleMT » 2003-07-20 12:20

Sedulus wrote:hm.. I think it's rather odd to do it that often, but I guess it's the best way for those using dyndns services
Agreed. Hopefully it's relying on a caching nameserver upstream from the user... Unless windows itself caches?

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-07-20 12:42

ipconfig /help wrote: /flushdns Purges the DNS Resolver cache.
so at least NT boxes do
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

JATT69
Posts: 22
Joined: 2003-07-21 22:24

can anyone help??

Post by JATT69 » 2003-07-23 16:24

when i go to my dc++ settings for connections when i click active mode, my ip thing iz blank, how do i know wat my dc++ connection settings ip is???????

cyberal
Posts: 360
Joined: 2003-05-16 05:42

Post by cyberal » 2003-07-24 00:50

http://whyrar.omfg.se - Guide to RAR and DC behaviour!
http://bodstrom.omfg.se - Bodströmsamhället, Länksamling om hoten mot vår personliga integritet

tsm2
Posts: 15
Joined: 2003-02-17 01:12

Post by tsm2 » 2003-09-12 04:51

Hi,

Look @
https://sourceforge.net/tracker/?func=d ... p_id=40287

it would be included in official release of dc++

i hope that helps everyone :D

jonix
Posts: 2
Joined: 2003-11-09 12:39
Location: Sweden
Contact:

Post by jonix » 2003-11-09 12:45

So is this feature included yet?
The status of the request is still "open" and noone is assigned to it.

I tried to put my hostname in the IP field but it didn't seem to be resolved... So i've put together some code to resolve it and edit the IP field at client startup.

You can download it at: http://www.dtek.chalmers.se/~johnk/setdcip

Please let me know if the resolving feature in DC++ is implemented (and works)!

tsm2
Posts: 15
Joined: 2003-02-17 01:12

Post by tsm2 » 2003-11-25 04:19

Code: Select all

jonix Posted: 2003-11-09 17:45    Post subject:  

--------------------------------------------------------------------------------
 
So is this feature included yet? 
The status of the request is still "open" and noone is assigned to it. 

I tried to put my hostname in the IP field but it didn't seem to be resolved... So i've put together some code to resolve it and edit the IP field at client startup. 

You can download it at: http://www.dtek.chalmers.se/~johnk/setdcip 

Please let me know if the resolving feature in DC++ is implemented (and works)! 
 
You do not need any registered dyndns hostname to use with my patch.
My code just asks some random website what is the ip address of requester (you).
Then, the active ip address field in DC++ is updated accordingly at runtime.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-11-25 07:53

Tsm2, have you submitted a patch to arne in the way mentioned in compile.txt?
Submitting patches

If you think you've done something that more people could use, you can always submit a patch for inclusion in the
original distribution. I will then consider whether I like the patch or not based on things that might seem to be
completely random, which just might be the case. Popular reasons for rejecting a patch include, but are not limited to,
ugly code, abusable features, feature that I don't like that bloat the applications and incompatibility with other
modifications I've already done.
To increase the chances of your patch being accepted, mail them to me ([email protected]) as diffs against the latest
code you can find (for the moment, it should be the cvs repository on sourceforge, but sometimes I forget to
update it, so check the source code distribution of the latest release as well...). You can find a lot of
information about diff and patch by googling for it.
By submitting a patch, you agree to that I get copyright of it. This to avoid stupid situations later on where
the copyright is split out over a million people, each of which could stop further distribution of DC++. If you don't
like this, start your own distribtution, if you're lucky it might become more popular than the original =).

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-11-25 11:08

Also i think you'll have to redo your code a bit, I can't get it to work in dc++ 0.304.

Code: Select all

------ Build started: Project: DCPlusPlus, Configuration: Debug Win32 ------

Compiling...
GetExternalIp.cpp
Linking...
client.lib(DCPlusPlus.obj) : error LNK2019: unresolved external symbol "private: __thiscall CGetExternalIp::CGetExternalIp(void)" (??0CGetExternalIp@@AAE@XZ) referenced in function "public: static void __cdecl Singleton<class CGetExternalIp>::newInstance(void)" (?newInstance@?$Singleton@VCGetExternalIp@@@@SAXXZ)
client.lib(DCPlusPlus.obj) : error LNK2001: unresolved external symbol "protected: static class CGetExternalIp * Singleton<class CGetExternalIp>::instance" (?instance@?$Singleton@VCGetExternalIp@@@@1PAVCGetExternalIp@@A)
.\App/DCPlusPlus.exe : fatal error LNK1120: 2 unresolved externals

Build log was saved at "file://c:\Program Files\DC - sources + include\DC++ source\DCPlusPlus-0.304-src-GetExternalIp_patced\vc7\Debug\windows\\BuildLog.htm"
DCPlusPlus - 3 error(s), 0 warning(s)
To get it compile at all I also had to add

Code: Select all

#include "GetExternalIp.h"
in dcplusplus.h

tsm2
Posts: 15
Joined: 2003-02-17 01:12

Post by tsm2 » 2003-11-28 06:42

joakim_tosteberg
Tsm2, have you submitted a patch to arne in the way mentioned in
since i published the source code in other thread :!:
To get it compile at all I also had to add Code:
#include "GetExternalIp.h"
in dcplusplus.h
Have you read carefully instructions in other thread ? :oops:
i'm not sure... :)
Also i think you'll have to redo your code a bit, I can't get it to work in dc++ 0.304.
What's wrong with 0.304 ? :?:

Hope that helps

tsm2
Posts: 15
Joined: 2003-02-17 01:12

External IP to be integrated in DC++

Post by tsm2 » 2003-11-28 07:07

Last minute from Arne
read this thread
http://dcplusplus.sourceforge.net/forum ... 4896#34896

Be patient :D

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-11-28 09:27

I've seen it, but arne hadn't posted jet then i wrote this.

aragonit
Posts: 2
Joined: 2003-11-25 15:31

Post by aragonit » 2003-12-29 21:00

It's a shame that DC++ needs that, but the way I solve the problem is right after I connect to my ISP I run a shortcut on my desktop containing this:

"C:\Program Files\TextPad 4\TextPad.exe" "C:\Program Files\DC++\DCPlusPlus.xml"

(this is a shortcut to open the DCPlusPlus.xml file with Textpad)
Then I change the last 2 parts of the IP manually. That at LEAST avoids the reaction from Hubs I have on AutoJoin.

I think it should be possible to make a neat javascript for this, but I'm too lazy.

tsm2
Posts: 15
Joined: 2003-02-17 01:12

Post by tsm2 » 2004-01-29 08:35

Hi,

I have a new version compiled with dc++ 0.306:
retry count with timer was added for reliability

If anyone need the source code, just ask me

bye

Locked