I added some new features to DC++....

Archived discussion about features (predating the use of Bugzilla as a bug and feature tracker)

Moderator: Moderators

Locked
mr_asco
Posts: 3
Joined: 2004-02-19 01:50
Location: FINLAND

I added some new features to DC++....

Post by mr_asco » 2004-02-19 04:17

Hi all.

I added some new features to DC 0.306.

1) New column in public hubs listview, named "Country",
where the hub country is shown. Cause dns resolving
could take some time (about 3000 hub addresses) it is done
asynchronously and list will be updated when all addresses
is done. Hub addresses and countries is cached to
xml-file for future use and faster resolving (so, only first time
it could take some time :))). I added also bool setting to the
advanced tab where the user can select whether to resolve
(show) countries or not.

2) Added "hubs list" combobox to the top of public hubs view,
where user can select which hubs listing to use. it just handy
to switch between different lists directly in hubs view :D

That all...for now :D

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Re: I added some new features to DC++....

Post by Todi » 2004-02-19 05:20

mr_asco wrote:I added some new features to DC 0.306.
Great! Did you mail a patch to Arne yet? =)
mr_asco wrote:1) New column in public hubs listview, named "Country",
where the hub country is shown. Cause dns resolving
could take some time (about 3000 hub addresses) it is done
asynchronously and list will be updated when all addresses
is done. Hub addresses and countries is cached to
xml-file for future use and faster resolving (so, only first time
it could take some time :))). I added also bool setting to the
advanced tab where the user can select whether to resolve
(show) countries or not.
Sounds resource heavy, wouldn't it be easier to just implement hublist.org's XML hublist instead? I'm not sure, but i believe the country codes are already included there. 'Course, that would only work for that list, and not all lists.
mr_asco wrote:2) Added "hubs list" combobox to the top of public hubs view,where user can select which hubs listing to use. it just handy
to switch between different lists directly in hubs view :D
Sounds like a nice feature, keep it up!

mr_asco
Posts: 3
Joined: 2004-02-19 01:50
Location: FINLAND

Post by mr_asco » 2004-02-19 08:00

Sounds resource heavy, wouldn't it be easier to just implement hublist.org's XML hublist instead? I'm not sure, but i believe the country codes are already included there. 'Course, that would only work for that list, and not all lists.
Damn...seems like hublist.org contains countries already. :oops:
Need to improve my code little bit. I mean it would check the hublist
for country code before trying to resolve hub address....

But for other hublists (that contains no country codes) the cache would be nice. Havent checked yet how resource consuming my implementation really is :) Tested in work (NT4 Celeron400 256Mb)
and worked nicely. The only thing what needs to improvement is that resolving algorithm uses sorted array (more than 13000 items :) hard coded to cpp-file and thus the localization is not possible. It increased the exe-size about 100kb....

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

Post by TheParanoidOne » 2004-02-19 12:09

I recommend sending a patch to arne, especially as these seem to be useful functions at first glance. If he doesn't accept it, you'll most likely get feedback on why and what you need to change for it to be accepted.

More of this please! :)
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

Re: I added some new features to DC++....

Post by GargoyleMT » 2004-02-19 12:10

Todi wrote:Great! Did you mail a patch to Arne yet? =)
Seconded, just read compile.txt and send arne a mail in the diff format he wants. =)

As for the XML list, if you decide to use it, please make a new patch, Gadget's patch and modifed DC++ works for his list, but the columns are hard-coded, so any competing xml lists won't be able to easily add/remove columns on their own.

Edit: do you cache each of the hublists in the dropdown? That was my primary concern - causing more loads on the limited number of hublists that are in existence.

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

Post by GargoyleMT » 2004-02-19 12:15

mr_asco wrote:The only thing what needs to improvement is that resolving algorithm uses sorted array (more than 13000 items :) hard coded to cpp-file and thus the localization is not possible. It increased the exe-size about 100kb....
Hmm, so are you doing name lookups, or whois lookups? DNS lookups on names will be a little inaccurate, I'm not sure how to communicate that uncertainty to the user. Also, if you did whois records, you probably could create a new country code XML on the fly...

mr_asco
Posts: 3
Joined: 2004-02-19 01:50
Location: FINLAND

Post by mr_asco » 2004-02-19 13:36

Hmm, so are you doing name lookups, or whois lookups? DNS lookups on names will be a little inaccurate, I'm not sure how to communicate that uncertainty to the user. Also, if you did whois records, you probably could create a new country code XML on the fly...
No, my implementation is based on http://www.ip2nation.com
search database, which they chosen to give away free of charge.
Except that i don´t use database but simple sorted array. Thus
the only time consuming operation is resolving the actual ip-number
from dns-name. So far it seems to work normally (actually i wrote little cmd utility for Linux/windows, called iploc, first :)).
do you cache each of the hublists in the dropdown? That was my primary concern - causing more loads on the limited number of hublists that are in existence.
I wrote simple HubListManager, which parses the list in settings window. This list is shown in combo. HubManager works as usual and loads one list at the time....Is that what you ment ? (sorry my bad anglish :oops: )
Great! Did you mail a patch to Arne yet? =)
Give me just few days, guys and i will... :)
HUHH...

[B]bongretarded
Posts: 47
Joined: 2004-01-27 19:16
Location: Auckland New Zealand
Contact:

Post by [B]bongretarded » 2004-02-19 15:25

hmmm i actially really like this feature about the hublist from certain countrys ;) be good to find all those hidden away new zealand hubs under different names because international bandwidth in new zealand is sooo expensive!!!
A friend indeed is a friend in need a friend with weed is better

[PT]Devilishly
Posts: 96
Joined: 2003-04-18 05:57
Location: Oporto, Portugal
Contact:

Post by [PT]Devilishly » 2004-02-20 14:11

What about adding to user list a new parameter “Country�( or the Country flag), based on user IP ?

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2004-02-20 16:08

[PT]Devilishly wrote:What about adding to user list a new parameter ?Country?( or the Country flag), based on user IP ?
Use a CDM if you need this, imho normal clients shouldn't be finding out other clients IP, unless you're an OP.

[PT]Devilishly
Posts: 96
Joined: 2003-04-18 05:57
Location: Oporto, Portugal
Contact:

Post by [PT]Devilishly » 2004-02-20 20:24

Todi wrote:
[PT]Devilishly wrote:What about adding to user list a new parameter ?Country?( or the Country flag), based on user IP ?
Use a CDM if you need this, imho normal clients shouldn't be finding out other clients IP, unless you're an OP.
Im not suggesting to do so... When we are in public hubs it's interesting to see from where people are(or maybe not...) :roll:

Best regards,
[PT]Devilishly

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

Post by GargoyleMT » 2004-02-21 12:50

mr_asco wrote:I wrote simple HubListManager, which parses the list in settings window. This list is shown in combo. HubManager works as usual and loads one list at the time....Is that what you ment ? (sorry my bad anglish :oops: )
No, that's not quite what I mean. After downloading the hublist, it's stored in HubManager::publicHubs until the user refreshes it or DC++ exits. It would be nice to have each of the public hub lists in the dropdown cached into a similar variable when they're initially loaded. Some users will, no doubt, switch hublists from the dropdown a couple of times during the course of running DC++, so keeping the lists in memory unless they explicitly refresh the displayed one seems to be reasonable.

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

Post by cyberal » 2004-02-21 22:31

Todi wrote:Use a CDM if you need this, imho normal clients shouldn't be finding out other clients IP, unless you're an OP.
imo all clients should know all ips in the hub, that would eliminate the possibility to fake search results or hijack grant slots!
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

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

Post by cyberal » 2004-02-21 22:32

GargoyleMT wrote:keeping the lists in memory unless they explicitly refresh the displayed one seems to be reasonable.
or maybe even a must have! wouldn't wanna kill another hunlist feed!
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

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

Re: I added some new features to DC++....

Post by GargoyleMT » 2004-03-28 15:28

mr_asco wrote:1) New column in public hubs listview, named "Country",
where the hub country is shown.
Someone is asking me about this as I type this... What're you currently up to?

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

Post by Sedulus » 2004-03-28 21:01

cyberal wrote:imo all clients should know all ips in the hub, that would eliminate the possibility to fake search results or hijack grant slots!
eliminating fake udp responses (search results) is only possible if all (many/most) ISPs blocked outbound spoofed source IPs (egress filtering)
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)

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

Post by cyberal » 2004-03-29 00:44

hehe, well yes.. ofcourse you are correct... but faking source IPs is one level higher than just putting someone elses nick in the response..
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

salkku
Posts: 1
Joined: 2004-03-08 09:25

Post by salkku » 2004-03-30 13:13

just a little noob note that if you make it use www.ip2nation.com or any similar page, set the default 'country check' to none, so that the page wont get flooded...

Locked