mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-23 16:30:06 -05:00
* unify CONFIG option for DHT stunner
* implement optional (turned off by default) usage of dht stunner to determin external ip (this can be usefull for some corner case setups)
This commit is contained in:
parent
e91d877af2
commit
6f9d875fc6
@ -712,8 +712,10 @@ void p3NetMgrIMPL::netExtCheck()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ALLOW_DHT_STUNNER
|
#ifdef ALLOW_DHT_STUNNER
|
||||||
// (cyril) I disabled this because it's pretty dangerous. The DHT can report a wrong address quite easily
|
// (cyril) I disabled this because it's pretty dangerous. The DHT can report a wrong address quite easily
|
||||||
// if the other DHT peers are not collaborating.
|
// if the other DHT peers are not collaborating.
|
||||||
|
// (sehraf) For the record: The udp stunner uses multiple (as for now: two) peers to ensure that the IP recieved is the correct one, see UdpStunner::locked_checkExternalAddress()
|
||||||
|
// Nevertheless this stays a more risky method to determine the external ip address.
|
||||||
|
|
||||||
/* Next ask the DhtStunner */
|
/* Next ask the DhtStunner */
|
||||||
{
|
{
|
||||||
|
@ -113,9 +113,16 @@ no_bitdht:CONFIG -= bitdht
|
|||||||
|
|
||||||
# The DHT stunner is used to determine the NAT type using other RS DHT peers and the STUN (Session Traversal Utilities for NAT) protocol.
|
# The DHT stunner is used to determine the NAT type using other RS DHT peers and the STUN (Session Traversal Utilities for NAT) protocol.
|
||||||
# To disable DHT stunner append the following assignation to qmake command line
|
# To disable DHT stunner append the following assignation to qmake command line
|
||||||
# "CONFIG+=no_useDhtStunner"
|
# "CONFIG+=no_use_dht_stunner"
|
||||||
CONFIG *= useDhtStunner
|
CONFIG *= use_dht_stunner
|
||||||
no_useDhtStunner:CONFIG -= useDhtStunner
|
no_use_dht_stunner:CONFIG -= use_dht_stunner
|
||||||
|
|
||||||
|
# The DHT stunner can be used to figure out our external IP. As this purely relying on random DHT peers that answer our request, it can easily be abused
|
||||||
|
# Therefore, it is turned off by default.
|
||||||
|
# To enable external ip determination (additionally) based on the dht stunner append the following assignation to qmake
|
||||||
|
# command line "CONFIG+=rs_async_chat"
|
||||||
|
CONFIG *= no_use_dht_stunner_ext_ip
|
||||||
|
use_dht_stunner_ext_ip:CONFIG -= no_use_dht_stunner_ext_ip
|
||||||
|
|
||||||
# To select your MacOsX version append the following assignation to qmake
|
# To select your MacOsX version append the following assignation to qmake
|
||||||
# command line "CONFIG+=rs_macos10.11" where 10.11 depends your version
|
# command line "CONFIG+=rs_macos10.11" where 10.11 depends your version
|
||||||
@ -498,6 +505,14 @@ rs_gxs_trans {
|
|||||||
|
|
||||||
bitdht {
|
bitdht {
|
||||||
DEFINES *= RS_USE_BITDHT
|
DEFINES *= RS_USE_BITDHT
|
||||||
|
|
||||||
|
use_dht_stunner {
|
||||||
|
CONFIG *= useDhtStunner
|
||||||
|
|
||||||
|
use_dht_stunner_ext_ip {
|
||||||
|
DEFINES *= ALLOW_DHT_STUNNER
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
direct_chat {
|
direct_chat {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user