feat: hard deprecation of IPFS_REUSEPORT

Years passed and we still see it. Time to force users to switch to
LIBP2P_TCP_REUSEPORT.
This commit is contained in:
Marcin Rataj 2021-11-23 20:46:00 +01:00 committed by Adin Schmahmann
parent 52c177ced9
commit 82c1bfa0e6
2 changed files with 7 additions and 3 deletions

View File

@ -559,6 +559,12 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
log.Error("failed to bootstrap (no peers found): consider updating Bootstrap or Peering section of your config")
}
})
}
// Hard deprecation notice if someone still uses IPFS_REUSEPORT
if flag := os.Getenv("IPFS_REUSEPORT"); flag != "" {
log.Fatal("Support for IPFS_REUSEPORT was removed. Use LIBP2P_TCP_REUSEPORT instead.")
}
// collect long-running errors and block for shutdown

View File

@ -1,13 +1,11 @@
# go-ipfs environment variables
## `LIBP2P_TCP_REUSEPORT` (`IPFS_REUSEPORT`)
## `LIBP2P_TCP_REUSEPORT`
go-ipfs tries to reuse the same source port for all connections to improve NAT
traversal. If this is an issue, you can disable it by setting
`LIBP2P_TCP_REUSEPORT` to false.
This variable was previously `IPFS_REUSEPORT`.
Default: true
## `IPFS_PATH`