DMDircthe intelligent IRC client

Viewing Issue Advanced Details

ID 0001602 Category [DMDirc] Plugin - DCC Plugin Severity minor
Reproducibility have not tried Date Submitted 2008-08-09 15:00 Last Update 2008-08-28 12:49
Reporter MD87 Assigned To Dataforce View Status public
Priority normal Status assigned Resolution open
Platform Fixed in Version Target Version 0.6.3
Product Version 0.6a1 Product Build
Summary 0001602: DCC plugin IP determination sucks
Description Straight after connecting: (this transfer works. The IP is 127.0.0.1)

14:44:59 | >> PRIVMSG chris2 :DCC SEND "bridge.sh" 2130706433 60744 313 T
14:45:00 | << :chris2!~chris@194.72.81.141 PRIVMSG chris2 :DCC SEND "bridge.sh" 2130706433 60744 313 T

After joining a channel: (this transfer fails. The IP is 194.72.81.141)

14:45:17 | >> PRIVMSG chris2 :DCC SEND "beastie.png" 3259519373 39111 10469 T
14:45:17 | << :chris2!~chris@194.72.81.141 PRIVMSG chris2 :DCC SEND "beastie.png" 3259519373 39111 10469 T

I assume that it's using the hostname from the JOIN message once it sees one, which seems like a very bad idea (sethosts, bouncer hosts, etc). The behaviour before and after joining a channel should be consistent; the local address should either be figured out externally somehow, or be determined using the USERHOST command.

Using 127.0.0.1 at all seems erroneous, if it's guessing from the available interfaces then it should find the LAN IP address (10.77.80.147) rather than the loopback one.
Needs unit test no

Relationships

Notes

(0003482)
Dataforce (administrator)
2008-08-28 12:49

I assume the only reason the first transfer works for you is cos you were DCCing yourself.

The former won't work to dcc yourself, the latter will work for you or other people if you have port forwards.

Using any local IP (be it LAN or localhost) is totally pointless and won't work for anyone but people on your lan (for which using DCC is pointless).

The IP determination is as designed, It does its best to find your external IP if you havn't specified one manually in the prefs.

An alternative could be to check one of those whatismyip sites. (Maybe have a http://dmdirc.com/IP.php [^] that returns the IP for it to use?)

In the case of bouncers, using the bouncers IP works for some bouncers (which either handle the DCC themselves like psybnc, or proxy the dcc).

Sethosts are problematic and would require either an external source to give the IP, or a forced IP.

Maybe an "IP Address" section of the prefs with radio buttons to select between:
( ) Forced IP [ 123.45.67.89 ]
( ) Use external service [ http://www.dmdirc.com/IP.php [^] ]
(*) Guess based on Hostname
( ) Guess based on local interfaces

?

Add Note

Note

Issue History

Date Modified Username Field Change
2008-08-09 15:00 MD87 New Issue
2008-08-09 15:00 MD87 Status new => assigned
2008-08-09 15:00 MD87 Assigned To => Dataforce
2008-08-28 12:49 Dataforce Note Added: 0003482