We demonstrate an optical diode by building a domain wall with one-dimensional waveguide array. The domain wall can be described by dividing the one-dimensional waveguide array into two equal parts, which have different refractive index, so that the waveguide array exists local potential. A Gaussian beam is kicked moving toward the domain wall and interacts with it. Transmission and reflection during the interaction between the Gaussian beam and the domain wall are found by changing related parameters. The detailed behavior of the Gaussian beam dynamics is analyzed numerically. Transmission of the Gaussian beam in one direction is much bigger than the opposite under certain circumstances and optical nonreciprocity is found in such a model, high transmission ratio of such model up to 300 is obtained. Thus the system can serve as an optical diode.