enhance custom port management