linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #06006
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3030: Merge 2 identical active mode settings
------------------------------------------------------------
revno: 3030
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2012-09-03 21:14:25 +0200
message:
Merge 2 identical active mode settings
modified:
changelog.txt
dcpp/ClientManager.cpp
dcpp/ConnectivityManager.cpp
dcpp/MappingManager.cpp
dcpp/SettingsManager.cpp
dcpp/SettingsManager.h
dcpp/version.h
help/settings_connectivity_manual.html
win32/ConnectivityManualPage.cpp
win32/ConnectivityManualPage.h
win32/DCPlusPlus.rc
win32/FavHubGroupsDlg.cpp
win32/FavHubProperties.cpp
win32/HubFrame.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2012-08-25 13:31:50 +0000
+++ changelog.txt 2012-09-03 19:14:25 +0000
@@ -35,6 +35,7 @@
* [L#1032227] Fix a crash when parsing messages with Magnet links (poy)
* [L#1039537] Fix a crash in Windows 8 (poy)
* Update Boost to version 1.51
+* Merge 2 identical active mode settings (poy)
-- 0.799 2012-05-05 --
* Add icons (iceman50)
=== modified file 'dcpp/ClientManager.cpp'
--- dcpp/ClientManager.cpp 2012-07-20 14:03:59 +0000
+++ dcpp/ClientManager.cpp 2012-09-03 19:14:25 +0000
@@ -571,7 +571,7 @@
}
bool ClientManager::isActive() const {
- return CONNSETTING(INCOMING_CONNECTIONS) != SettingsManager::INCOMING_FIREWALL_PASSIVE;
+ return CONNSETTING(INCOMING_CONNECTIONS) != SettingsManager::INCOMING_PASSIVE;
}
const CID& ClientManager::getMyPID() {
=== modified file 'dcpp/ConnectivityManager.cpp'
--- dcpp/ConnectivityManager.cpp 2012-06-21 18:52:47 +0000
+++ dcpp/ConnectivityManager.cpp 2012-09-03 19:14:25 +0000
@@ -94,7 +94,7 @@
SettingsManager::EXTERNAL_IP, SettingsManager::EXTERNAL_IP6, SettingsManager::NO_IP_OVERRIDE,
SettingsManager::BIND_ADDRESS, SettingsManager::BIND_ADDRESS6,
SettingsManager::INCOMING_CONNECTIONS, SettingsManager::OUTGOING_CONNECTIONS };
- std::for_each(settings, settings + sizeof(settings) / sizeof(settings[0]), [this](int setting) {
+ for(auto setting: settings) {
if(setting >= SettingsManager::STR_FIRST && setting < SettingsManager::STR_LAST) {
autoSettings[setting] = SettingsManager::getInstance()->getDefault(static_cast<SettingsManager::StrSetting>(setting));
} else if(setting >= SettingsManager::INT_FIRST && setting < SettingsManager::INT_LAST) {
@@ -104,13 +104,13 @@
} else {
dcassert(0);
}
- });
+ }
log(_("Determining the best connectivity settings..."));
try {
listen();
} catch(const Exception& e) {
- autoSettings[SettingsManager::INCOMING_CONNECTIONS] = SettingsManager::INCOMING_FIREWALL_PASSIVE;
+ autoSettings[SettingsManager::INCOMING_CONNECTIONS] = SettingsManager::INCOMING_PASSIVE;
log(str(F_("Unable to open %1% port(s); connectivity settings must be configured manually") % e.getError()));
fire(ConnectivityManagerListener::Finished());
running = false;
@@ -120,14 +120,14 @@
autoDetected = true;
if(!Util::isPrivateIp(Util::getLocalIp())) {
- autoSettings[SettingsManager::INCOMING_CONNECTIONS] = SettingsManager::INCOMING_DIRECT;
+ autoSettings[SettingsManager::INCOMING_CONNECTIONS] = SettingsManager::INCOMING_ACTIVE;
log(_("Public IP address detected, selecting active mode with direct connection"));
fire(ConnectivityManagerListener::Finished());
running = false;
return;
}
- autoSettings[SettingsManager::INCOMING_CONNECTIONS] = SettingsManager::INCOMING_FIREWALL_UPNP;
+ autoSettings[SettingsManager::INCOMING_CONNECTIONS] = SettingsManager::INCOMING_ACTIVE_UPNP;
log(_("Local network with possible NAT detected, trying to map the ports..."));
startMapping();
@@ -143,11 +143,11 @@
autoSettings.clear();
}
if(autoDetected || settingsChanged) {
- if(settingsChanged || (SETTING(INCOMING_CONNECTIONS) != SettingsManager::INCOMING_FIREWALL_UPNP)) {
+ if(settingsChanged || (SETTING(INCOMING_CONNECTIONS) != SettingsManager::INCOMING_ACTIVE_UPNP)) {
MappingManager::getInstance()->close();
}
startSocket();
- } else if(SETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_FIREWALL_UPNP && !running) {
+ } else if(SETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_ACTIVE_UPNP && !running) {
// previous mappings had failed; try again
startMapping();
}
@@ -184,23 +184,18 @@
string mode;
switch(CONNSETTING(INCOMING_CONNECTIONS)) {
- case SettingsManager::INCOMING_DIRECT:
+ case SettingsManager::INCOMING_ACTIVE:
{
- mode = _("Direct connection to the Internet (no router)");
+ mode = _("Active mode");
break;
}
- case SettingsManager::INCOMING_FIREWALL_UPNP:
+ case SettingsManager::INCOMING_ACTIVE_UPNP:
{
mode = str(F_("Active mode behind a router that %1% can configure; port mapping status: %2%") %
APPNAME % MappingManager::getInstance()->getStatus());
break;
}
- case SettingsManager::INCOMING_FIREWALL_NAT:
- {
- mode = _("Active mode behind a router");
- break;
- }
- case SettingsManager::INCOMING_FIREWALL_PASSIVE:
+ case SettingsManager::INCOMING_PASSIVE:
{
mode = _("Passive mode");
break;
@@ -237,7 +232,7 @@
if(SETTING(AUTO_DETECT_CONNECTION)) {
if(mapper.empty()) {
disconnect();
- autoSettings[SettingsManager::INCOMING_CONNECTIONS] = SettingsManager::INCOMING_FIREWALL_PASSIVE;
+ autoSettings[SettingsManager::INCOMING_CONNECTIONS] = SettingsManager::INCOMING_PASSIVE;
log(_("Active mode could not be achieved; a manual configuration is recommended for better connectivity"));
} else {
SettingsManager::getInstance()->set(SettingsManager::MAPPER, mapper);
@@ -267,7 +262,7 @@
listen();
// must be done after listen calls; otherwise ports won't be set
- if(SETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_FIREWALL_UPNP && !running)
+ if(SETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_ACTIVE_UPNP && !running)
startMapping();
}
}
=== modified file 'dcpp/MappingManager.cpp'
--- dcpp/MappingManager.cpp 2012-03-03 15:19:48 +0000
+++ dcpp/MappingManager.cpp 2012-09-03 19:14:25 +0000
@@ -234,8 +234,9 @@
}
void MappingManager::on(TimerManagerListener::Minute, uint64_t tick) noexcept {
- if(tick >= renewal && !busy.test_and_set())
- start();
+ if(tick >= renewal && !busy.test_and_set()) {
+ try { start(); } catch(const ThreadException&) { busy.clear(); }
+ }
}
} // namespace dcpp
=== modified file 'dcpp/SettingsManager.cpp'
--- dcpp/SettingsManager.cpp 2012-07-20 14:20:19 +0000
+++ dcpp/SettingsManager.cpp 2012-09-03 19:14:25 +0000
@@ -152,7 +152,7 @@
setDefault(TCP_PORT, 0);
setDefault(UDP_PORT, 0);
setDefault(TLS_PORT, 0);
- setDefault(INCOMING_CONNECTIONS, INCOMING_DIRECT);
+ setDefault(INCOMING_CONNECTIONS, INCOMING_ACTIVE);
setDefault(OUTGOING_CONNECTIONS, OUTGOING_DIRECT);
setDefault(AUTO_DETECT_CONNECTION, true);
setDefault(AUTO_FOLLOW, true);
@@ -455,10 +455,22 @@
unset(LOG_FILE_SYSTEM);
}
- if(v <= 0.770 && SETTING(INCOMING_CONNECTIONS) != INCOMING_FIREWALL_PASSIVE) {
+ // previous incoming connection modes, kept here for back-compat.
+ enum { OLD_INCOMING_DIRECT, OLD_INCOMING_UPNP, OLD_INCOMING_NAT, OLD_INCOMING_PASSIVE };
+
+ if(v <= 0.770 && SETTING(INCOMING_CONNECTIONS) != OLD_INCOMING_PASSIVE) {
set(AUTO_DETECT_CONNECTION, false); //Don't touch if it works
}
+ if(v <= 0.799) {
+ // port previous conn settings
+ switch(SETTING(INCOMING_CONNECTIONS)) {
+ case OLD_INCOMING_UPNP: set(INCOMING_CONNECTIONS, INCOMING_ACTIVE_UPNP); break;
+ case OLD_INCOMING_PASSIVE: set(INCOMING_CONNECTIONS, INCOMING_PASSIVE); break;
+ default: set(INCOMING_CONNECTIONS, INCOMING_ACTIVE); break;
+ }
+ }
+
if(v <= 0.782) {
// These were remade completely...
unset(USERSFRAME_ORDER);
@@ -470,7 +482,7 @@
}
if(v <= 0.791) {
- // the meaning of a default away message has changed: it now means "no away message".
+ // the meaning of a blank default away message has changed: it now means "no away message".
if(SETTING(DEFAULT_AWAY_MESSAGE).empty()) {
set(DEFAULT_AWAY_MESSAGE, "I'm away. State your business and I might answer later if you're lucky.");
}
=== modified file 'dcpp/SettingsManager.h'
--- dcpp/SettingsManager.h 2012-07-20 14:20:19 +0000
+++ dcpp/SettingsManager.h 2012-09-03 19:14:25 +0000
@@ -142,9 +142,8 @@
TRANSFERS_PANED_POS = FLOAT_FIRST, QUEUE_PANED_POS, SEARCH_PANED_POS,
FLOAT_LAST, SETTINGS_LAST = FLOAT_LAST };
- enum { INCOMING_DIRECT, INCOMING_FIREWALL_UPNP, INCOMING_FIREWALL_NAT,
- INCOMING_FIREWALL_PASSIVE };
- enum { OUTGOING_DIRECT, OUTGOING_SOCKS5 };
+ enum { INCOMING_ACTIVE, INCOMING_ACTIVE_UPNP, INCOMING_PASSIVE };
+ enum { OUTGOING_DIRECT, OUTGOING_SOCKS5 };
enum {
TAB_STYLE_BUTTONS = 1 << 1,
=== modified file 'dcpp/version.h'
--- dcpp/version.h 2012-05-04 21:20:44 +0000
+++ dcpp/version.h 2012-09-03 19:14:25 +0000
@@ -21,8 +21,8 @@
#define APPNAME "DC++"
// don't forget to update the .rc file as well!
-#define VERSIONSTRING "0.799"
-#define VERSIONFLOAT 0.799
+#define VERSIONSTRING "0.800"
+#define VERSIONFLOAT 0.800
namespace dcpp {
extern const std::string fullVersionString;
=== modified file 'help/settings_connectivity_manual.html'
--- help/settings_connectivity_manual.html 2012-01-16 20:01:29 +0000
+++ help/settings_connectivity_manual.html 2012-09-03 19:14:25 +0000
@@ -9,7 +9,6 @@
<h1>Connectivity<br/>
Manual configuration
</h1>
-<h2 id="connection">Incoming connection settings</h2>
<p>
Use these settings to manually configure DC++ for incoming connections. If unsure about these settings,
you may want to follow the <a href="faq_connection.html">Manual connection setup guide</a>.
@@ -18,118 +17,108 @@
with the meaning of each connection mode and with the <a href="faq_whyactive.html">differences
between active and passive mode and their effect on your ability to search and download from
users</a> of the DC network.</p>
- <h3 style="margin-left: 40px;"><u>Active connection modes</u></h3>
- <p style="margin-left: 40px;">Active mode is highly preferred in the DC network. For more
- information, refer to the <a href="faq_whyactive.html">FAQ that explains the advantages of the active mode</a>.</p>
-<dl style="margin-left: 40px;">
- <dt>My computer is directly connected to the Internet (no router)</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_DIRECT">Select this mode if your computer is connected directly to the
-internet or you plan to connect to hubs in your local network only. <b>Do <u>not</u> select this mode if
-you have a router or any external firewall.</b>
-If your computer is not behind a router all you have to do is to choose this option and usually
-you don't need to alter anything more in the connection settings. However, if you have a software firewall
-installed or built-in Windows firewall enabled, you may need <a href="faq_unblock.html">further configuration
-in the firewall or other security software</a> to allow Internet access for DC++.</dd>
- <dt>Let DC++ configure my router (NAT-PMP / UPnP)</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_FIREWALL_UPNP">
- Select this mode if you are behind a router that supports standard port forwarding methods such
- as NAT-PMP or UPnP. Most routers do support them but they often have to be explicitly enabled
- from the router's configuration page. Thanks to automatic port mapping methods, DC++ is able to
- open the ports it needs and obtain your external IP address as well. For more information, see
- <a href="faq_mapping.html">What is NAT-PMP / UPnP?</a>.
- </dd>
- <dt>Manual port forwarding (I have configured my router by myself)</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_FIREWALL_NAT">Select this mode if you are behind a router and
- have set up the forwarding of the Transfer (TCP), Encrypted transfer (TCP) and Search (UDP) ports by yourself.
- You may need to specify the external IP address of your router in the field below as well (although in most
- cases, hubs you connect to - especially ADC ones - will fill it on your behalf). Use this mode only if the
- previous ones are not options for you. For more information, refer to the
- <a href="faq_portforward.html">Manual port forwarding guide</a>.</dd>
-</dl>
- <h3 style="margin-left: 40px;"><u>Passive connection mode</u></h3>
-<dl style="margin-left: 40px;">
- <dt>Passive mode (last resort - has serious limitations)</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_FIREWALL_PASSIVE">
- Select this mode if none of the previous Active mode options apply. In this mode, DC++ will not
- try to listen for inbound connections; it will only initiate outbound ones. This mode carries
- some serious limitations:
- <ul style="margin-left: 80px;">
- <li>only 5 results per user will be returned in response to searches.</li>
- <li>you may not be able to download / receive search results from passive users.</li>
- <li>you may not be able to fully enjoy certain hubs (because of their regulations).</li>
-</ul>
-Note that DC++ tries NAT Traversal on ADC hubs to allow passive users to connect with each other.
-</dd>
-</dl>
-<h3 style="margin-left: 40px;"><u>Connection mode options</u></h3>
-<dl style="margin-left: 40px;">
-<dt>Ports</dt>
-<dd><p>These settings specify the communication ports DC++ listens on for incoming connections.
-Generally you don't need to add specific ports unless you configured your port forwarding settings
-manually. If port settings are left blank, DC++ will let the operating system generate a random
-port number. Port values are ignored when <a href="settings_connectivity.html#autoconn">Automatic connectivity setup</a> is
-enabled.</p>
-<dl>
- <dt>Transfer port (TCP)</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_PORT_TCP">This is the port that DC++ listens on for
- incoming connections from other peers. If this port is incorrectly forwarded, you won't be able
- to download.</dd>
- <dt>Encrypted transfer port (TCP)</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_PORT_TLS">This is the port that DC++ listens on for
- incoming <a href="settings_certs.html">TLS (encrypted)</a> connections from other peers. If
- this port is incorrectly forwarded, you won't be able to search nor to download on encrypted
- ADC hubs. Note that <b>this port value should be different than the ones used for transfers
- (TCP) and searches (UDP).</b></dd>
- <dt>Search port (UDP)</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_PORT_UDP">This is the port that DC++ listens on for
- incoming search results. If this port is incorrectly forwarded, you won't be able to receive
- search results.</dd>
-</dl>
-</dd>
-<dt id="extip">External / WAN IP</dt>
-<dd cshelp="IDH_SETTINGS_CONNECTIVITY_EXTERNAL_IP">
-This field specifies your external IP address. <i>If you are unsure and use any other connection mode
- option than 'Manual port forwarding (I have configured my router by myself)', then leave this
- field blank.</i> If your computer is directly connected to the internet, your internal and
-external IP will be the same and can easily be automatically detected. Fill this box <b>only</b> if
-you need to override said auto-detection. Ordinarily, only users behind a router (NAT
-device) need to fill in this box. If you put a DNS name here, DC++ will try to resolve it into an
-IP address before use. For additional information like how to determine your external IP address, follow the
-<a href="faq_connection.html">Manual connection setup guide</a>.</dd>
- <dt id="noipoverride">Don't allow hubs/NAT-PMP/UPnP to override</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_OVERRIDE">Enable this to always use the IP address in "External
- / WAN IP", and not let either NAT-PMP, UPnP nor connected hubs change it. If unsure, leave
- this setting disabled.</dd>
-</dl>
-
-<h2 id="prefmap">Preferred port mapping interface</h2>
-<p cshelp="IDH_SETTINGS_CONNECTIVITY_MAPPER">
-DC++ has several interfaces available it can use to try to automatically map the ports it requires
-on the router:
-<ul>
-<li>NAT-PMP: A lightweight protocol that is not widely used by generic routers; but open-source
- firmwares generally implement it.</li>
-<li>MiniUPnP: An open-source UPnP library.</li>
-<li>Windows UPnP: Use Windows discovery services. Note that the DC++ implementation of Windows UPnP
- is partial and prone to random failures. MiniUPnP is recommended instead.</li>
-</ul>
-The interface selected here will be tried first; other available interfaces will then be tried if
-the preferred port mapping interface were to fail.
-</p>
-
-<h2 id="bindaddress">Bind address</h2>
-<p cshelp="IDH_SETTINGS_CONNECTIVITY_BIND_ADDRESS">
-This setting allows binding DC++ network connections to a specific network adapter by its IP address.
-Useful when you have more than one physical or virtual network adapter installed and you want to
-assign a specfic device for all the network traffic generated by DC++.<br/>
-If this setting is empty (it is by default) it means that DC++ is relying on the operating system to
-find the best adapter. In case of the adapter offered by the operating system does not suit you, you can
-override it here by specifying the local IP address of the required adapter. To get the list of
-available network adapters with their IP adresses open up a Command Prompt window and use the 'ipconfig'
-command.<br/>
-If binding with the given IP address fails, it will do so silently and the default value (INADDR_ANY)
-will be used instead. This setting is ignored when <a href="settings_connectivity.html#autoconn">
-Automatic connectivity setup</a> is enabled.
-</p>
+
+<dl style="margin-left: 40px;">
+ <dt>Active mode (no router or manual router configuration)</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_ACTIVE">
+ Select this mode if you are directly connected to the Internet (no router) or if you are
+ willing to manually configure port forwarding rules in your router. Use this mode only if the
+ automatic configuration (via NAT-PMP / UPnP) is not an option for you. For more information,
+ refer to the <a href="faq_portforward.html">Manual port forwarding guide</a>.
+ </dd>
+
+ <dt>Active mode (let DC++ configure my router with NAT-PMP / UPnP)</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_UPNP">
+ Select this mode if you are behind a router that supports standard port forwarding methods such
+ as NAT-PMP or UPnP. Most routers do support them but they often have to be explicitly enabled
+ from the router's configuration page. Thanks to automatic port mapping methods, DC++ is able to
+ open the ports it needs and obtain your external IP address as well. For more information, see
+ <a href="faq_mapping.html">What is NAT-PMP / UPnP?</a>.
+ </dd>
+
+ <dt>Passive mode (last resort - has serious limitations)</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_PASSIVE">
+ Select this mode if you can't get active mode to work. In this mode, DC++ will not try to
+ listen for inbound connections; it will only initiate outbound ones. This mode carries some
+ serious limitations:
+ <ul style="margin-left: 80px;">
+ <li>only 5 results per user will be returned in response to searches.</li>
+ <li>you may not be able to download / receive search results from passive users.</li>
+ <li>you may not be able to fully enjoy certain hubs (because of their regulations).</li>
+ </ul>
+ Note that DC++ tries NAT Traversal on ADC hubs to allow passive users to connect with each other.
+ </dd>
+
+ <dt id="extip">External / WAN IP</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_EXTERNAL_IP">
+ This field specifies your external IP address. <i>Note: most hubs are able to determine your
+ external IP and forward it to your DC++, making a manual configuration of this field
+ unnecessary.</i> If your computer is directly connected to the internet, your internal and
+ external IP will be the same and can easily be automatically detected. Fill this box
+ <b>only</b> if you need to override said auto-detection. Ordinarily, only users behind a router
+ (NAT device) need to fill in this box. If you put a DNS name here, DC++ will try to resolve it
+ into an IP address before use. For additional information like how to determine your external IP
+ address, follow the <a href="faq_connection.html">Manual connection setup guide</a>.</dd>
+
+ <dt id="noipoverride">Don't allow hubs/NAT-PMP/UPnP to override</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_OVERRIDE">
+ Enable this to always use the IP address in "External / WAN IP", and not let either NAT-PMP,
+ UPnP nor connected hubs change it. If unsure, leave this setting disabled.
+ </dd>
+
+ <dt>Ports</dt>
+ <dd><p>These settings specify the communication ports DC++ listens on for incoming connections.
+ Generally you don't need to add specific ports unless you configured your port forwarding settings
+ manually. If port settings are left blank, DC++ will let the operating system generate a random
+ port number. Port values are ignored when
+ <a href="settings_connectivity.html#autoconn">Automatic connectivity setup</a> is enabled.</p>
+ <dl>
+ <dt>Transfer port (TCP)</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_PORT_TCP">This is the port that DC++ listens on for
+ incoming connections from other peers. If this port is incorrectly forwarded, you won't be
+ able to download.</dd>
+ <dt>Encrypted transfer port (TCP)</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_PORT_TLS">This is the port that DC++ listens on for
+ incoming <a href="settings_certs.html">TLS (encrypted)</a> connections from other peers. If
+ this port is incorrectly forwarded, you won't be able to search nor to download on
+ encrypted ADC hubs. Note that <b>this port value should be different than the ones used for
+ transfers (TCP) and searches (UDP).</b></dd>
+ <dt>Search port (UDP)</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_PORT_UDP">This is the port that DC++ listens on for
+ incoming search results. If this port is incorrectly forwarded, you won't be able to
+ receive search results.</dd>
+ </dl>
+ </dd>
+
+ <dt id="prefmap">Preferred port mapping interface</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_MAPPER">
+ DC++ has several interfaces available it can use to try to automatically map the ports it
+ requires on the router:
+ <ul>
+ <li>NAT-PMP: A lightweight protocol that is not widely used by generic routers; but
+ open-source firmwares generally implement it.</li>
+ <li>MiniUPnP: An open-source UPnP library.</li>
+ <li>Windows UPnP: Use Windows discovery services. Note that the DC++ implementation of
+ Windows UPnP is partial and prone to random failures. MiniUPnP is recommended instead.</li>
+ </ul>
+ The interface selected here will be tried first; other available interfaces will then be tried
+ if the preferred port mapping interface were to fail.
+ </dd>
+
+ <dt id="bindaddress">Bind address</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_BIND_ADDRESS">
+ This setting allows binding DC++ network connections to a specific network adapter by its IP
+ address. Useful when you have more than one physical or virtual network adapter installed and
+ you want to assign a specfic device for all the network traffic generated by DC++.<br/>
+ If this setting is empty (it is by default) it means that DC++ is relying on the operating
+ system to find the best adapter. In case of the adapter offered by the operating system does
+ not suit you, you can override it here by specifying the local IP address of the required
+ adapter. To get the list of available network adapters with their IP adresses open up a Command
+ Prompt window and use the 'ipconfig' command.<br/>
+ If binding with the given IP address fails, it will do so silently and the default value
+ (INADDR_ANY) will be used instead. This setting is ignored when
+ <a href="settings_connectivity.html#autoconn">Automatic connectivity setup</a> is enabled.
+ </dd>
+</dl>
</body>
</html>
=== modified file 'win32/ConnectivityManualPage.cpp'
--- win32/ConnectivityManualPage.cpp 2012-06-21 18:52:47 +0000
+++ win32/ConnectivityManualPage.cpp 2012-09-03 19:14:25 +0000
@@ -40,9 +40,8 @@
PropPage(parent, 5, 1),
autoGroup(0),
autoDetect(0),
-directIn(0),
+active(0),
upnp(0),
-manual(0),
passive(0),
mapper(0)
{
@@ -59,21 +58,18 @@
}
{
- auto cur = grid->addChild(GroupBox::Seed())->addChild(Grid::Seed(4, 1));
+ auto cur = grid->addChild(GroupBox::Seed())->addChild(Grid::Seed(3, 1));
cur->column(0).mode = GridInfo::FILL;
cur->setSpacing(grid->getSpacing());
- directIn = cur->addChild(RadioButton::Seed(T_("My computer is directly connected to the Internet (no router)")));
- directIn->setHelpId(IDH_SETTINGS_CONNECTIVITY_DIRECT);
-
- upnp = cur->addChild(RadioButton::Seed(T_("Let DC++ configure my router (NAT-PMP / UPnP)")));
- upnp->setHelpId(IDH_SETTINGS_CONNECTIVITY_FIREWALL_UPNP);
-
- manual = cur->addChild(RadioButton::Seed(T_("Manual port forwarding (I have configured my router by myself)")));
- manual->setHelpId(IDH_SETTINGS_CONNECTIVITY_FIREWALL_NAT);
+ active = cur->addChild(RadioButton::Seed(T_("Active mode (no router or manual router configuration)")));
+ active->setHelpId(IDH_SETTINGS_CONNECTIVITY_ACTIVE);
+
+ upnp = cur->addChild(RadioButton::Seed(T_("Active mode (let DC++ configure my router with NAT-PMP / UPnP)")));
+ upnp->setHelpId(IDH_SETTINGS_CONNECTIVITY_UPNP);
passive = cur->addChild(RadioButton::Seed(T_("Passive mode (last resort - has serious limitations)")));
- passive->setHelpId(IDH_SETTINGS_CONNECTIVITY_FIREWALL_PASSIVE);
+ passive->setHelpId(IDH_SETTINGS_CONNECTIVITY_PASSIVE);
}
{
@@ -142,10 +138,9 @@
PropPage::write(items);
// Set the connection mode
- int c = upnp->getChecked() ? SettingsManager::INCOMING_FIREWALL_UPNP :
- manual->getChecked() ? SettingsManager::INCOMING_FIREWALL_NAT :
- passive->getChecked() ? SettingsManager::INCOMING_FIREWALL_PASSIVE :
- SettingsManager::INCOMING_DIRECT;
+ int c = upnp->getChecked() ? SettingsManager::INCOMING_ACTIVE_UPNP :
+ passive->getChecked() ? SettingsManager::INCOMING_PASSIVE :
+ SettingsManager::INCOMING_ACTIVE;
if(SETTING(INCOMING_CONNECTIONS) != c) {
SettingsManager::getInstance()->set(SettingsManager::INCOMING_CONNECTIONS, c);
}
@@ -173,10 +168,9 @@
void ConnectivityManualPage::read() {
switch(SETTING(INCOMING_CONNECTIONS)) {
- case SettingsManager::INCOMING_FIREWALL_UPNP: upnp->setChecked(); break;
- case SettingsManager::INCOMING_FIREWALL_NAT: manual->setChecked(); break;
- case SettingsManager::INCOMING_FIREWALL_PASSIVE: passive->setChecked(); break;
- default: directIn->setChecked(); break;
+ case SettingsManager::INCOMING_ACTIVE_UPNP: upnp->setChecked(); break;
+ case SettingsManager::INCOMING_PASSIVE: passive->setChecked(); break;
+ default: active->setChecked(); break;
}
PropPage::read(items);
@@ -200,9 +194,8 @@
// reload settings in case they have been changed (eg by the "Edit detected settings" feature).
- directIn->setChecked(false);
+ active->setChecked(false);
upnp->setChecked(false);
- manual->setChecked(false);
passive->setChecked(false);
mapper->clear();
=== modified file 'win32/ConnectivityManualPage.h'
--- win32/ConnectivityManualPage.h 2012-05-23 22:05:22 +0000
+++ win32/ConnectivityManualPage.h 2012-09-03 19:14:25 +0000
@@ -37,9 +37,8 @@
GroupBoxPtr autoGroup;
CheckBoxPtr autoDetect;
- RadioButtonPtr directIn;
+ RadioButtonPtr active;
RadioButtonPtr upnp;
- RadioButtonPtr manual;
RadioButtonPtr passive;
ComboBoxPtr mapper;
=== modified file 'win32/DCPlusPlus.rc'
--- win32/DCPlusPlus.rc 2012-07-20 14:03:59 +0000
+++ win32/DCPlusPlus.rc 2012-09-03 19:14:25 +0000
@@ -99,8 +99,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,7,9,9
- PRODUCTVERSION 0,7,9,9
+ FILEVERSION 0,8,0,0
+ PRODUCTVERSION 0,8,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -117,12 +117,12 @@
BEGIN
VALUE "Comments", "http://dcplusplus.sourceforge.net"
VALUE "FileDescription", "DC++"
- VALUE "FileVersion", "0, 7, 9, 9"
+ VALUE "FileVersion", "0, 8, 0, 0"
VALUE "InternalName", "DC++"
VALUE "LegalCopyright", "Copyright 2001-2012 Jacek Sieka"
VALUE "OriginalFilename", "DCPlusPlus.exe"
VALUE "ProductName", "DC++"
- VALUE "ProductVersion", "0, 7, 9, 9"
+ VALUE "ProductVersion", "0, 8, 0, 0"
END
END
BLOCK "VarFileInfo"
=== modified file 'win32/FavHubGroupsDlg.cpp'
--- win32/FavHubGroupsDlg.cpp 2012-07-11 17:13:42 +0000
+++ win32/FavHubGroupsDlg.cpp 2012-09-03 19:14:25 +0000
@@ -144,7 +144,7 @@
email = cur2->addChild(WinUtil::Seeds::Dialog::textBox);
email->setHelpId(IDH_FAVORITE_HUB_EMAIL);
- cur2->addChild(Label::Seed(T_("External / WAN IP")))->setHelpId(IDH_FAVORITE_HUB_USER_IP);
+ cur2->addChild(Label::Seed(T_("IP")))->setHelpId(IDH_FAVORITE_HUB_USER_IP);
userIp = cur2->addChild(WinUtil::Seeds::Dialog::textBox);
userIp->setHelpId(IDH_FAVORITE_HUB_USER_IP);
WinUtil::preventSpaces(userIp);
=== modified file 'win32/FavHubProperties.cpp'
--- win32/FavHubProperties.cpp 2012-05-30 17:28:37 +0000
+++ win32/FavHubProperties.cpp 2012-09-03 19:14:25 +0000
@@ -121,7 +121,7 @@
email->setText(Text::toT(entry->get(HubSettings::Email)));
email->setHelpId(IDH_FAVORITE_HUB_EMAIL);
- cur->addChild(Label::Seed(T_("External / WAN IP")))->setHelpId(IDH_FAVORITE_HUB_USER_IP);
+ cur->addChild(Label::Seed(T_("IP")))->setHelpId(IDH_FAVORITE_HUB_USER_IP);
userIp = cur->addChild(WinUtil::Seeds::Dialog::textBox);
userIp->setText(Text::toT(entry->get(HubSettings::UserIp)));
userIp->setHelpId(IDH_FAVORITE_HUB_USER_IP);
=== modified file 'win32/HubFrame.cpp'
--- win32/HubFrame.cpp 2012-07-18 02:09:39 +0000
+++ win32/HubFrame.cpp 2012-09-03 19:14:25 +0000
@@ -834,7 +834,7 @@
int image = identity.isBot() ? WinUtil::USER_ICON_BOT : identity.isAway() ? WinUtil::USER_ICON_AWAY : WinUtil::USER_ICON;
image *= WinUtil::USER_ICON_MOD_START * WinUtil::USER_ICON_MOD_START;
- if(CONNSETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_FIREWALL_PASSIVE &&
+ if(CONNSETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_PASSIVE &&
!identity.isBot() && !identity.isTcpActive() && !identity.supports(AdcHub::NAT0_FEATURE))
{
// Users we can't connect to