Mac修改Chrome的启动参数,取消chrome对端口号的限制

进入 Chrome.app 目录,执行如下命令

$ cd "/Applications/Google Chrome.app/Contents/MacOS/"
$ sudo mv "Google Chrome" Google.real
$ sudo printf '#!/bin/bash\ncd "/Applications/Google Chrome.app/Contents/MacOS"\n"/Applications/Google Chrome.app/Contents/MacOS/Google.real" --explicitly-allowed-ports=10080,6000 "[email protected]"\n' > Google\ Chrome
sudo chmod u+x "Google Chrome"