add port switcher, sync lib