mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add UPnP support for Lighthouse (#1587)
This commit was modified by Paul H whilst rebasing master onto v0.3.0-staging Adding UPnP support will help grow the DHT by allowing NAT traversal for peers with UPnP supported routers. Using IGD library: https://docs.rs/igd/0.10.0/igd/ Adding the the libp2p tcp port and discovery udp port. If this fails it simply logs the attempt and moves on Co-authored-by: Age Manning <Age@AgeManning.com>
This commit is contained in:
@@ -507,7 +507,7 @@ pub fn set_network_config(
|
||||
config.enr_address = Some(resolved_addr);
|
||||
}
|
||||
|
||||
if cli_args.is_present("disable_enr_auto_update") {
|
||||
if cli_args.is_present("disable-enr-auto-update") {
|
||||
config.discv5_config.enr_update = false;
|
||||
}
|
||||
|
||||
@@ -516,6 +516,10 @@ pub fn set_network_config(
|
||||
warn!(log, "Discovery is disabled. New peers will not be found");
|
||||
}
|
||||
|
||||
if cli_args.is_present("disable-upnp") {
|
||||
config.upnp_enabled = false;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user