Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add command to enable mptcp (backport #4014) #4020

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,40 @@ enable-bbr:
echo "BBR is already enabled."; \
fi
.PHONY: enable-bbr
<<<<<<< HEAD
=======

## enable-mptcp: Enable mptcp over multiple ports (not interfaces). Only works on Linux Kernel 5.6 and above.
enable-mptcp:
@echo "Configuring system to use mptcp..."
@sudo sysctl -w net.mptcp.enabled=1
@sudo sysctl -w net.mptcp.mptcp_path_manager=ndiffports
@sudo sysctl -w net.mptcp.mptcp_ndiffports=16
@echo "Making MPTCP settings persistent across reboots..."
@echo "net.mptcp.enabled=1" | sudo tee -a /etc/sysctl.conf
@echo "net.mptcp.mptcp_path_manager=ndiffports" | sudo tee -a /etc/sysctl.conf
@echo "net.mptcp.mptcp_ndiffports=16" | sudo tee -a /etc/sysctl.conf
@echo "MPTCP configuration complete and persistent!"

.PHONY: enable-mptcp

## disable-mptcp: Disables mptcp over multiple ports. Only works on Linux Kernel 5.6 and above.
disable-mptcp:
@echo "Disabling MPTCP..."
@sudo sysctl -w net.mptcp.enabled=0
@sudo sysctl -w net.mptcp.mptcp_path_manager=default
@echo "Removing MPTCP settings from /etc/sysctl.conf..."
@sudo sed -i '/net.mptcp.enabled=1/d' /etc/sysctl.conf
@sudo sed -i '/net.mptcp.mptcp_path_manager=ndiffports/d' /etc/sysctl.conf
@sudo sed -i '/net.mptcp.mptcp_ndiffports=16/d' /etc/sysctl.conf
@echo "MPTCP configuration reverted!"

.PHONY: disable-mptcp

## debug-version: Print the git tag and version.
debug-version:
@echo "GIT_TAG: $(GIT_TAG)"
@echo "VERSION: $(VERSION)"
.PHONY: debug-version

>>>>>>> 808d0f21 (feat: add command to enable mptcp (#4014))
Loading