Electro-magnetic scattering is studied in a waveguide with varying shape and crosssection. Furthermore, an impedance or admittance condition is applied to two of the waveguide walls. Under the condition that variations in geometry or impedance take place in only one plane at the time, the problem can be solved as a two-dimensional wave-scattering problems. By using newly developed numerical conformal mapping techniques, the problem is transformed into a wave-scattering problem in a straight two-dimensional channel. A numerically stable formulation is reached in terms of transmission and reflection operators. Numerical results are given for a slowly varying waveguide with a bend and for one more complex geometry.