feat: hard deprecation of IPFS_REUSEPORT
Years passed and we still see it. Time to force users to switch to LIBP2P_TCP_REUSEPORT.
Marcin Rataj committed
Nov 23, 2021 at 20:46 UTC
82c1bfa0e6f57d7c5e4e74eefb4d834274ce817f
2 files changed
+7
-3
cmd/ipfs/daemon.go
+6
@@ -559,6 +559,12 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
559
log.Error("failed to bootstrap (no peers found): consider updating Bootstrap or Peering section of your config")
560
}
561
})
562
+
563
+ }
564
+
565
+ // Hard deprecation notice if someone still uses IPFS_REUSEPORT
566
+ if flag := os.Getenv("IPFS_REUSEPORT"); flag != "" {
567
+ log.Fatal("Support for IPFS_REUSEPORT was removed. Use LIBP2P_TCP_REUSEPORT instead.")
568
}
569
570
// collect long-running errors and block for shutdown
docs/environment-variables.md
+1
-3
@@ -1,13 +1,11 @@
1
# go-ipfs environment variables
2
3
-## `LIBP2P_TCP_REUSEPORT` (`IPFS_REUSEPORT`)
3
+## `LIBP2P_TCP_REUSEPORT`
4
5
go-ipfs tries to reuse the same source port for all connections to improve NAT
6
traversal. If this is an issue, you can disable it by setting
7
`LIBP2P_TCP_REUSEPORT` to false.
8
9
-This variable was previously `IPFS_REUSEPORT`.
10
-
9
Default: true
10
11
## `IPFS_PATH`