Tunable single-photon diode by chiral quantum physics