China opened various ports and rivers to Japanese trade, and granted Japan the same status regarding trade as various western powers had gained in the aftermath of the First and Second Opium Wars.